Recreated nix files

This commit is contained in:
2026-03-03 17:25:52 +01:00
parent bf8fd0d4d8
commit 9313d3107f
3 changed files with 322 additions and 308 deletions
+9 -4
View File
@@ -920,16 +920,21 @@ This section describes the main system configuration for the computers that I ha
#+begin_src nix :tangle start_script.nix :noweb tangle :mkdirp yes
{ lib, config, pkgs, ... }:
let
scriptPath = ./assets/scripts/start_script.sh;
scriptExists = builtins.pathExists "${scriptPath}";
script = pkgs.writeShellScriptBin "startScript" ''
#!${pkgs.bash}/bin/bash
set -euo pipefail
TIMESTAMP_FILE="$HOME/timestamp.txt"
date +"%Y-%m-%d %H:%M:%S" > "$TIMESTAMP_FILE"
'';
in
{
system.activationScripts.startScript = lib.mkIf scriptExists {
system.activationScripts.startScript = lib.mkIf (builtins.pathExists "${script}") {
text = ''
${scriptPath}
${script}/bin/startScript
'';
};
}
#+end_src
** end_script.nix.nix