mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
moved files to make more sense and added experimental desktop configuration
This commit is contained in:
parent
22c5b6f826
commit
50fae0b2eb
38 changed files with 533 additions and 191 deletions
28
modules/scripts.nix
Normal file
28
modules/scripts.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
update-system = pkgs.writeScriptBin "update-system" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
nix flake update /etc/nixos/#
|
||||
'';
|
||||
|
||||
clean-store = pkgs.writeScriptBin "clean-store" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
nix-collect-garbage -d
|
||||
nix-store --gc
|
||||
'';
|
||||
|
||||
apply-users = pkgs.writeScriptBin "apply-users" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
nix build /etc/nixos/#homeManagerConfiguration.gerg.activationPackage
|
||||
./result/activate
|
||||
rm -rf ./result
|
||||
'';
|
||||
|
||||
apply-system = pkgs.writeScriptBin "apply-system" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
nixos-rebuild switch --flake /etc/nixos/#
|
||||
'';
|
||||
in {
|
||||
environment.systemPackages = [ update-system clean-store apply-users apply-system ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue