nixos-config/hosts/levi/default.nix

60 lines
1.5 KiB
Nix
Raw Normal View History

2022-10-07 04:58:13 +00:00
{ config, pkgs, ... }:
let
2022-10-26 03:39:52 +00:00
persist = "/nix/persist";
2022-10-07 04:58:13 +00:00
in
{
imports = [
./optimus.nix
];
environment.etc = {
"machine-id".source = "${persist}/machine-id";
};
services.openssh.hostKeys = [
{ type = "ed25519"; path = "${persist}/ssh_host_ed25519_key"; }
];
sconfig = {
gnome = true;
2023-03-27 15:21:48 +00:00
desktop.enable = true;
2022-10-07 04:58:13 +00:00
horizon.enable = true;
2022-10-09 19:02:53 +00:00
wg-home = { enable = true; path = "${persist}/wireguard_home.conf"; };
2022-10-07 04:58:13 +00:00
};
2022-10-26 03:39:52 +00:00
environment.persistence."${persist}/system".directories = [
"/etc/NetworkManager/system-connections"
2022-11-19 22:27:29 +00:00
"/var/lib/bluetooth"
2022-10-26 03:39:52 +00:00
"/var/lib/nixos"
"/var/lib/systemd"
2022-10-26 16:32:15 +00:00
"/var/log/journal"
2022-10-26 03:39:52 +00:00
];
2023-01-17 01:53:05 +00:00
programs.bash.interactiveShellInit = ''
2023-01-20 21:49:07 +00:00
function eco() {
taskset -p ff000 $$
}
2023-01-17 01:53:05 +00:00
'';
2022-10-07 04:58:13 +00:00
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
initrd.availableKernelModules = [ "xhci_pci" "vmd" "nvme" "sd_mod" ];
};
fileSystems = {
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" ]; };
"/boot" = { fsType = "vfat"; device = "/dev/nvme0n1p1"; };
"/nix" = { device = "levi/nix"; fsType = "zfs"; };
"/home" = { device = "levi/home"; fsType = "zfs"; };
};
users.mutableUsers = false;
users.users.sean.passwordFile = "${persist}/shadow_sean";
users.users.root.passwordFile = "${persist}/shadow_sean";
hardware.cpu.intel.updateMicrocode = true;
hardware.enableRedistributableFirmware = true;
system.stateVersion = "22.05";
}