moved files to make more sense and added experimental desktop configuration

This commit is contained in:
Greg Leyda 2022-07-12 16:54:56 -04:00 committed by ISnortPennies
parent 22c5b6f826
commit 50fae0b2eb
38 changed files with 533 additions and 191 deletions

28
modules/scripts.nix Normal file
View 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 ];
}