mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
add a couple of scripts
This commit is contained in:
parent
fb40a057fb
commit
2ff4d6ef8c
1 changed files with 20 additions and 0 deletions
|
|
@ -25,6 +25,8 @@
|
|||
#rosettaPkgs.coq
|
||||
# (rosettaPkgs.haskellPackages.callHackage "agda-language-server" "0.2.1" { })
|
||||
|
||||
# TODO: These should be moved to a separte file?
|
||||
|
||||
# Kill the process with the port open
|
||||
# Used only to kill stale ghc.
|
||||
(pkgs.writeShellApplication {
|
||||
|
|
@ -39,6 +41,24 @@
|
|||
'';
|
||||
})
|
||||
|
||||
# Spit out the nixpkgs rev pinned by the given flake.
|
||||
(pkgs.writeShellApplication {
|
||||
name = "nixpkgs-rev";
|
||||
text = ''
|
||||
NIXPKGS=$(nix flake metadata --json "$1" | jq -r .locks.nodes.root.inputs.nixpkgs)
|
||||
nix flake metadata --json "$1" | \
|
||||
jq -r .locks.nodes."$NIXPKGS".locked.rev
|
||||
'';
|
||||
})
|
||||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "nixpkgs-update-using";
|
||||
text = ''
|
||||
REV=$(nixpkgs-rev "$1")
|
||||
nix flake lock --update-input nixpkgs --override-input nixpkgs github:nixos/nixpkgs/"$REV"
|
||||
'';
|
||||
})
|
||||
|
||||
];
|
||||
|
||||
nix = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue