1
0
Fork 0

Compare commits

...

5 Commits

1 changed files with 52 additions and 0 deletions

52
iso.nix
View File

@ -24,13 +24,65 @@
hardwareClockInLocalTime = true;
};
# yes I know that 'programs.<pkg>.enable' exist but this is just an ISO
environment.systemPackages = with pkgs; [
bat
btop
curl
dmidecode
git
htop
iperf
neovim
ripgrep
rsync
tmux
tree
vim
];
environment.variables = {
# for 'sudo -e' || 'sudoedit'
EDITOR = "nvim";
VISUAL = "nvim";
# systemd
SYSTEMD_PAGER = "";
SYSTEMD_EDITOR = "nvim";
TERM = "xterm-256color";
};
# all this just because I don't want to clone my NixOS config repo
environment.etc."custom-scripts/clone-nixos-config.sh" = {
text = ''
#!${pkgs.bash}/bin/bash
set -xeuf -o pipefail
${pkgs.git}/bin/git clone https://gitlab.com/thefossguy/prathams-nixos.git $HOME/prathams-nixos
'';
mode = "0777";
};
systemd.services = {
"clone-nixos-config" = {
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";
# ^^^^^ is the user in the ISO
};
requiredBy = [ "getty-pre.target" ];
requires = [ "network-online.target" ];
};
};
# yes, I want docs
documentation = {
enable = true;
dev.enable = true;
doc.enable = true;
info.enable = true;
man = {
enable = true;
generateCaches = true;
};
};
}