1
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
Pratham Patel 7bb9426933
rename NixOS clone script and service 2024-01-21 15:02:01 +05:30
Pratham Patel a243495803
fix ze service autostart issue 2024-01-21 15:00:35 +05:30
1 changed files with 6 additions and 5 deletions

11
iso.nix
View File

@ -52,7 +52,7 @@
};
# all this just because I don't want to clone my NixOS config repo
environment.etc."custom-scripts/clone-nixos-config.sh" = {
environment.etc."custom-scripts/nixos-config-clone.sh" = {
text = ''
#!${pkgs.bash}/bin/bash
set -xeuf -o pipefail
@ -62,15 +62,16 @@
mode = "0777";
};
systemd.services = {
"clone-nixos-config" = {
"nixos-config-clone" = {
serviceConfig = {
Type = "oneshot";
Environment = [ "PATH=\"${pkgs.openssl}/bin\"" ]; # just in case
ExecStart = "${pkgs.sudo}/bin/sudo -i -u nixos ${pkgs.bash}/bin/bash /etc/custom-scripts/clone-nixos-config.sh";
ExecStart = "${pkgs.sudo}/bin/sudo -i -u nixos ${pkgs.bash}/bin/bash /etc/custom-scripts/nixos-config-clone.sh";
# ^^^^^ is the user in the ISO
};
requiredBy = [ "getty-pre.target" ];
requires = [ "network-online.target" ];
requiredBy = [ "multi-user.target" ];
wants = [ "network-online.target" "network.target" "nss-lookup.target" "nss-user-lookup.target" ];
after = [ "network-online.target" "network.target" "nss-lookup.target" "nss-user-lookup.target" ];
};
};