1
0
Fork 0

remove the git cloning and use highest zstd compression with squashfs compression

This commit is contained in:
Pratham Patel 2024-03-06 19:35:17 +05:30
parent 7bdb96b1cd
commit 04c31e6aca
Signed by: thefossguy
SSH Key Fingerprint: SHA256:/B3wAg7jnMEBQ2JwkebbS/eXVZANDmqRfnd9QkIhxMI
1 changed files with 1 additions and 27 deletions

28
iso.nix
View File

@ -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 = {