Migrate update to own package
This commit is contained in:
parent
2cdb96acc6
commit
000b52cced
1
home.nix
1
home.nix
|
@ -36,6 +36,7 @@
|
|||
pkgs.dmenu
|
||||
pkgs.networkmanager_dmenu
|
||||
pkgs.dmenu-custom-scripts
|
||||
pkgs.custom-update-system
|
||||
pkgs.dunst
|
||||
pkgs.st
|
||||
pkgs.ncdu
|
||||
|
|
21
overlays/custom-update-system/default.nix
Normal file
21
overlays/custom-update-system/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
self: super:
|
||||
|
||||
{
|
||||
custom-update-system = super.pkgs.writeShellApplication {
|
||||
name = "custom-update-system";
|
||||
|
||||
runtimeInputs = [
|
||||
super.pkgs.nix
|
||||
super.pkgs.home-manager
|
||||
];
|
||||
|
||||
text = ''
|
||||
nix-channel --update
|
||||
home-manager switch
|
||||
home-manager expire-generations '-30 days'
|
||||
nix-env --delete-generations +5
|
||||
nix store gc
|
||||
nix store optimise
|
||||
'';
|
||||
};
|
||||
}
|
15
readme.md
15
readme.md
|
@ -65,19 +65,8 @@ It has the following sub folder:
|
|||
Update
|
||||
------
|
||||
|
||||
The following will update the whole system and clean things up:
|
||||
|
||||
nix-channel --update \
|
||||
&& home-manager switch \
|
||||
&& home-manager expire-generations '-30 days' \
|
||||
&& nix-env --delete-generations +5 \
|
||||
&& nix store gc \
|
||||
&& nix store optimise
|
||||
|
||||
This will update the channel (fetch state of nixpkgs).
|
||||
It then will update system.
|
||||
Delete old generations.
|
||||
And run garbage collection.
|
||||
Update can be done via `custom-update-system` package which is available within
|
||||
the overlay.
|
||||
|
||||
Manual changes
|
||||
--------------
|
||||
|
|
Loading…
Reference in a new issue