Compare commits
2 Commits
7bdb96b1cd
...
db20c2579e
Author | SHA1 | Date |
---|---|---|
Pratham Patel | db20c2579e | |
Pratham Patel | 04c31e6aca |
28
iso.nix
28
iso.nix
|
@ -53,33 +53,7 @@
|
|||
TERM = "xterm-256color";
|
||||
};
|
||||
|
||||
# all this just because I don't want to clone my NixOS config repo
|
||||
environment.etc."custom-scripts/setup-on-boot.sh" = {
|
||||
text = ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
set -xeuf -o pipefail
|
||||
|
||||
${pkgs.git}/bin/git clone --bare https://gitlab.com/thefossguy/dotfiles.git $HOME/.dotfiles
|
||||
${pkgs.git}/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME checkout -f
|
||||
${pkgs.coreutils}/bin/rm -rf $HOME/.config/nvim
|
||||
|
||||
${pkgs.git}/bin/git clone https://gitlab.com/thefossguy/prathams-nixos.git $HOME/prathams-nixos
|
||||
'';
|
||||
mode = "0777";
|
||||
};
|
||||
systemd.services = {
|
||||
"setup-on-boot" = {
|
||||
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/setup-on-boot.sh";
|
||||
# ^^^^^ is the user in the ISO
|
||||
};
|
||||
requiredBy = [ "getty-pre.target" "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" ];
|
||||
};
|
||||
};
|
||||
isoImage.squashfsCompression = "zstd -Xcompression-level 22";
|
||||
|
||||
# yes, I want docs
|
||||
documentation = {
|
||||
|
|
Loading…
Reference in New Issue