New service for end-script.sh
This commit is contained in:
+17
-13
@@ -713,19 +713,6 @@ We also add a devshell that makes editing this repository easier in emacs.
|
|||||||
<<flake-config-module>>
|
<<flake-config-module>>
|
||||||
<<flake-home-module>>
|
<<flake-home-module>>
|
||||||
catppuccin.nixosModules.catppuccin # theme
|
catppuccin.nixosModules.catppuccin # theme
|
||||||
|
|
||||||
# end_script as a systemd service
|
|
||||||
({ lib, config, pkgs, ... }: {
|
|
||||||
systemd.user.services.endScript = lib.mkIf (builtins.pathExists ./assets/scripts/end_script.sh) {
|
|
||||||
description = "Run end script after Home Manager";
|
|
||||||
wantedBy = [ "default.target" ];
|
|
||||||
after = [ "home-manager-henrov.service" ];
|
|
||||||
serviceConfig.Type = "oneshot";
|
|
||||||
script = ''
|
|
||||||
${pkgs.bash}/bin/bash -c 'cd $HOME && ${./assets/scripts/end_script.sh}'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
hostname = machine;
|
hostname = machine;
|
||||||
@@ -893,6 +880,7 @@ This section describes the main system configuration for the computers that I ha
|
|||||||
./dev/terminal.nix
|
./dev/terminal.nix
|
||||||
./core/boot.nix
|
./core/boot.nix
|
||||||
./services/services.nix
|
./services/services.nix
|
||||||
|
./assets/end_script.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
<<config-system-packages>>
|
<<config-system-packages>>
|
||||||
@@ -1473,8 +1461,24 @@ The configuration is done in the home manager section.
|
|||||||
# Optional; GNOME-specific (keep only if you really use gnome-keyring integration)
|
# Optional; GNOME-specific (keep only if you really use gnome-keyring integration)
|
||||||
security.pam.services.gdm.enableGnomeKeyring = true;
|
security.pam.services.gdm.enableGnomeKeyring = true;
|
||||||
}
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Setting the config
|
||||||
|
#+begin_src nix :tangle assets/end-script.nix :noweb tangle :mkdirp yes
|
||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
systemd.user.services.endScript = lib.mkIf (builtins.pathExists ./assets/scripts/end_script.sh) {
|
||||||
|
description = "Run end script after Home Manager";
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
after = [ "home-manager-henrov.service" ];
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
script = ''
|
||||||
|
${pkgs.bash}/bin/bash -c 'cd $HOME && ${./assets/scripts/end_script.sh}'
|
||||||
|
'';
|
||||||
|
serviceConfig.Restart = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.endScript.enable = true;
|
||||||
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Services
|
** Services
|
||||||
|
|||||||
Reference in New Issue
Block a user