Recreated nix files
This commit is contained in:
+302
-327
File diff suppressed because it is too large
Load Diff
+8
-28
@@ -716,14 +716,14 @@ We also add a devshell that makes editing this repository easier in emacs.
|
||||
# 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 ${./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}'
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
@@ -912,26 +912,6 @@ This section describes the main system configuration for the computers that I ha
|
||||
}
|
||||
#+end_src
|
||||
|
||||
** end_script.nix.nix
|
||||
#+begin_src nix :tangle end_script.nix :noweb tangle :mkdirp yes
|
||||
{ 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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
#+end_src
|
||||
|
||||
** Apps section
|
||||
This section describes a way of installing packages, either through nixpkgs or flatpak.
|
||||
What extra apps to install is decided in the files ./assets/conf/apps/packages.conf and flatpaks.conf.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
# Example of how to execute a script
|
||||
# Path to the script to execute
|
||||
COPY_SCRIPT="./assets/scripts/copy_stuff.sh"
|
||||
COPY_SCRIPT="assets/scripts/copy_stuff.sh"
|
||||
# Check if the script exists
|
||||
if [ ! -f "$COPY_SCRIPT" ]; then
|
||||
echo "Error: Script $COPY_SCRIPT does not exist."
|
||||
|
||||
@@ -80,14 +80,14 @@
|
||||
# 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 ${./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}'
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user