Daniel Siepmann
bfb5e08460
No need for overlays. Instead create own packages and call them via callPackage. That will keep them simpler and allows dependency injection. I can follow existing patterns from nixpkgs, etc.
19 lines
489 B
Nix
19 lines
489 B
Nix
{ writeShellApplication }:
|
|
|
|
writeShellApplication {
|
|
name = "custom-update-system";
|
|
|
|
text = ''
|
|
nix-channel --update
|
|
home-manager switch
|
|
home-manager expire-generations '-30 days'
|
|
nix-env --delete-generations +5
|
|
nix-index
|
|
oldVersion=$(home-manager generations | head -n 2 | tail -n 1 | cut -d' ' -f 7)
|
|
newVersion=$(home-manager generations | head -n 1 | cut -d' ' -f 7)
|
|
nvd diff "$oldVersion" "$newVersion"
|
|
nix store gc
|
|
nix store optimise
|
|
'';
|
|
}
|