Recreated nix files
This commit is contained in:
+362
-330
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
scriptPath = ./assets/scripts/end_script.sh;
|
||||
scriptExists = lib.fileExists "${scriptPath}";
|
||||
in
|
||||
{
|
||||
systemd.user.services.endScript = lib.mkIf scriptExists {
|
||||
description = "Run end script after Home Manager";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "home-manager-activate.service" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
${scriptPath}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -47,6 +47,10 @@ in
|
||||
name = machine;
|
||||
value = lib.nixosSystem {
|
||||
modules = [
|
||||
# Start_script.nix
|
||||
({ lib, config, pkgs, ... }: {
|
||||
imports = [ ./start_script.nix ];
|
||||
})
|
||||
({ lib, ... }: {
|
||||
nixpkgs.overlays = [ emacs-overlay.overlays.default ];
|
||||
})
|
||||
@@ -71,6 +75,18 @@ in
|
||||
}
|
||||
|
||||
catppuccin.nixosModules.catppuccin # theme
|
||||
|
||||
# end_script as a systemd service
|
||||
({ lib, config, pkgs, ... }: {
|
||||
systemd.user.services.endScript = lib.mkIf (lib.fileExists ./assets/scripts/end_script.sh) {
|
||||
description = "Run end script after Home Manager";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "home-manager-activate.service" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
${./assets/scripts/end_script.sh}
|
||||
'';
|
||||
};
|
||||
];
|
||||
|
||||
specialArgs = {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
scriptPath = ./assets/scripts/start_script.sh;
|
||||
scriptExists = lib.fileExists "${scriptPath}";
|
||||
in
|
||||
{
|
||||
system.activationScripts.startScript = lib.mkIf scriptExists {
|
||||
text = ''
|
||||
${scriptPath}
|
||||
'';
|
||||
defer = false; # Run as early as possible
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user