Changes for livedisk
This commit is contained in:
parent
7b889633d8
commit
f6c29f056d
|
@ -23,8 +23,7 @@ in {
|
||||||
kernelModules = [ ];
|
kernelModules = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-intel" ];
|
||||||
kernelPackages = pkgs.linuxPackages.zfs;
|
|
||||||
supportedFilesystems = [ "zfs" ];
|
supportedFilesystems = [ "zfs" ];
|
||||||
|
|
||||||
loader.grub = {
|
loader.grub = {
|
||||||
|
@ -38,11 +37,13 @@ in {
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-label/lambda-boot";
|
device = "/dev/disk/by-label/lambda-boot";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
|
options = [ "noexec" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "lambda/transient/root";
|
device = "none";
|
||||||
fsType = "zfs";
|
fsType = "tmpfs";
|
||||||
|
options = [ "noexec" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/nix" = {
|
"/nix" = {
|
||||||
|
@ -54,29 +55,20 @@ in {
|
||||||
device = "lambda/transient/logs";
|
device = "lambda/transient/logs";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
options = [ "noexec" ];
|
||||||
|
|
||||||
"/home" = {
|
|
||||||
device = "lambda/persistent/home";
|
|
||||||
fsType = "zfs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"/state" = {
|
"/state" = {
|
||||||
device = "lambda/persistent/state";
|
device = "lambda/persistent/state";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
|
options = [ "noexec" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
|
||||||
${pkgs.zfs}/bin/zfs rollback -r lambda/transient/root@blank
|
|
||||||
'';
|
|
||||||
|
|
||||||
swapDevices = [{ device = "/dev/disk/by-label/lambda-swap"; }];
|
swapDevices = [{ device = "/dev/disk/by-label/lambda-swap"; }];
|
||||||
|
|
||||||
nix.maxJobs = lib.mkDefault 12;
|
nix.maxJobs = lib.mkDefault 12;
|
||||||
|
|
||||||
hardware.bluetooth.enable = false;
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostId = substring 0 8 (fileContents /etc/machine-id);
|
hostId = substring 0 8 (fileContents /etc/machine-id);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ in {
|
||||||
enp4s0f0.useDHCP = false;
|
enp4s0f0.useDHCP = false;
|
||||||
enp4s0f1.useDHCP = false;
|
enp4s0f1.useDHCP = false;
|
||||||
|
|
||||||
intif0 = { useDHCP = true; };
|
intif0.useDHCP = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,10 +36,17 @@ in {
|
||||||
"L /root/.ssh/id_rsa - - - - /state/root/ssh/id_rsa"
|
"L /root/.ssh/id_rsa - - - - /state/root/ssh/id_rsa"
|
||||||
"L /root/.ssh/id_rsa.pub - - - - /state/root/ssh/id_rsa.pub"
|
"L /root/.ssh/id_rsa.pub - - - - /state/root/ssh/id_rsa.pub"
|
||||||
"L /root/.ssh/known_hosts - - - - /state/root/ssh/known_hosts"
|
"L /root/.ssh/known_hosts - - - - /state/root/ssh/known_hosts"
|
||||||
"L /etc/ssh/ssh_host_ed25519_key - - - - /state/ssh/ssh_host_ed25519_key"
|
|
||||||
"L /etc/ssh/ssh_host_rsa_key - - - - /state/ssh/ssh_host_rsa_key"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"ssh/ssh_host_rsa_key".source = "/state/ssh/ssh_host_rsa_key";
|
||||||
|
"ssh/ssh_host_rsa_key.pub".source = "/state/ssh/ssh_host_rsa_key.pub";
|
||||||
|
"ssh/ssh_host_ed25519_key".source = "/state/ssh/ssh_host_ed25519_key";
|
||||||
|
"ssh/ssh_host_ed25519_key.pub".source =
|
||||||
|
"/state/ssh/ssh_host_ed25519_key.pub";
|
||||||
|
"machine-id".source = "/state/host/machine-id";
|
||||||
|
};
|
||||||
|
|
||||||
security.sudo.extraConfig = ''
|
security.sudo.extraConfig = ''
|
||||||
# Due to rollback, sudo will lecture after every reboot
|
# Due to rollback, sudo will lecture after every reboot
|
||||||
Defaults lecture = never
|
Defaults lecture = never
|
||||||
|
|
|
@ -15,7 +15,7 @@ let
|
||||||
|
|
||||||
in {
|
in {
|
||||||
environment = {
|
environment = {
|
||||||
etc.current-nixos-config.source = ../../.;
|
etc.nixos-live.source = ../../.;
|
||||||
|
|
||||||
systemPackages = global-packages;
|
systemPackages = global-packages;
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ let
|
||||||
lshw
|
lshw
|
||||||
minecraft
|
minecraft
|
||||||
mkpasswd
|
mkpasswd
|
||||||
|
mplayer
|
||||||
mtr
|
mtr
|
||||||
nixfmt
|
nixfmt
|
||||||
nix-index
|
nix-index
|
||||||
|
|
|
@ -45,6 +45,12 @@ in {
|
||||||
"$6$a1q2Duoe35hd5$IaZGXPfqyGv9uq5DQm7DZq0vIHsUs39sLktBiBBqMiwl/f/Z4jSvNZLJp9DZJYe5u2qGBYh1ca.jsXvQA8FPZ/";
|
"$6$a1q2Duoe35hd5$IaZGXPfqyGv9uq5DQm7DZq0vIHsUs39sLktBiBBqMiwl/f/Z4jSvNZLJp9DZJYe5u2qGBYh1ca.jsXvQA8FPZ/";
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
root = {
|
||||||
|
authorizedKeys.keys = [
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDPwh522lvafTJYA0X2uFdP7Ws+Um1f8gZsARK1Y5nMzf6ZcWBF1jplTOKUVSOl4isMWni0Tu0TnX4zqCcgocWUVbwIwXSIRYqdiCPvVOH+/Ibc97n1/dYxk5JPMtbrsEw6/gWZxVg0qwe0J3dQWldEMiDY7iWhlrmIr7YL+Y3PUd7DOwp3PbfWfNyzTfE1kXcz5YvTeN+txFhbbXT0oS2R2wtc1vYXFZ/KbNstjqd+i8jszAq3ZkbbwL3aNR0RO4n8+GoIILGw8Ya4eP7D6+mYk608IhAoxpGyMrUch2TC2uvOK3rd/rw1hsTxf4AKjAZbrfd/FJaYru9ZeoLjD4bRGMdVp56F1m7pLvRiWRK62pV2Q/fjx+4KjHUrgyPd601eUIP0ayS/Rfuq8ijLpBJgO5/Y/6mFus/kjZIfRR9dXfLM67IMpyEzEITYrc/R2sedWf+YHxSh6eguAZ/kLzioar1nHLR7Wzgeu0tgWkD78WQGjpXGoefAz3xHeBg3Et0="
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# groups = { wheel = { members = [ "niten" ]; }; };
|
# groups = { wheel = { members = [ "niten" ]; }; };
|
||||||
|
|
Loading…
Reference in New Issue