nixos-config/hosts/lenny/default.nix

60 lines
1.6 KiB
Nix
Raw Normal View History

2022-03-07 16:10:35 +00:00
{ config, lib, pkgs, ... }:
2021-11-09 12:55:06 +00:00
{
2022-08-05 17:48:10 +00:00
environment.etc =
{
"machine-id".source = "/var/lib/nixos/machine-id";
"NetworkManager/system-connections".source =
"/var/lib/nixos/network-connections";
};
systemd.tmpfiles.rules = [ "d /var/lib/nixos/network-connections 0700" ];
services.openssh = {
enable = true;
hostKeys = [
{ type = "ed25519"; path = "/var/lib/nixos/ssh_host_ed25519_key"; }
];
2021-11-09 12:55:06 +00:00
};
users.mutableUsers = false;
users.users.root.passwordFile = "/nix/persist/shadow_sean";
users.users.sean.passwordFile = "/nix/persist/shadow_sean";
sconfig = {
gnome = true;
profile = "desktop";
2022-03-03 15:46:24 +00:00
horizon.enable = true;
2022-05-11 15:50:52 +00:00
wg-home.enable = true;
2021-11-09 12:55:06 +00:00
};
2022-05-10 14:06:07 +00:00
zramSwap.memoryPercent = 100;
2022-02-16 05:55:23 +00:00
swapDevices = [{
device = "/dev/disk/by-partuuid/e54894a7-f322-482c-b8f2-8e706f02f316";
randomEncryption.enable = true;
}];
2021-11-09 12:55:06 +00:00
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
2022-07-12 16:36:04 +00:00
initrd.postDeviceCommands = lib.mkAfter ''
zfs rollback lenny/locker/tmproot@blank
'';
2021-11-09 12:55:06 +00:00
};
2022-06-17 17:06:41 +00:00
hardware.cpu.intel.updateMicrocode = true;
hardware.enableRedistributableFirmware = true;
2021-11-09 12:55:06 +00:00
fileSystems = {
2022-08-05 17:48:10 +00:00
"/boot" = { device = "/dev/disk/by-partlabel/_esp"; fsType = "vfat"; };
2022-07-12 16:36:04 +00:00
"/" = { device = "lenny/locker/tmproot"; fsType = "zfs"; };
2021-11-09 12:55:06 +00:00
"/nix" = { device = "lenny/locker/nix"; fsType = "zfs"; };
"/home" = { device = "lenny/locker/home"; fsType = "zfs"; };
2022-08-05 17:48:10 +00:00
"/var/lib" = { device = "lenny/locker/lib"; fsType = "zfs"; };
"/var/log" = { device = "lenny/locker/log"; fsType = "zfs"; };
2021-12-05 00:58:08 +00:00
};
2021-11-09 12:55:06 +00:00
system.stateVersion = "21.11";
}