Compare commits
5 Commits
0abab637d1
...
1b34a3e964
Author | SHA1 | Date |
---|---|---|
Pratham Patel | 1b34a3e964 | |
Pratham Patel | 598b10f4ce | |
Pratham Patel | f4c3e13d22 | |
Pratham Patel | 8109790c7e | |
Pratham Patel | 0a5f9f4b61 |
52
iso.nix
52
iso.nix
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue