diff options
Diffstat (limited to 'hosts/eostre/default.nix')
-rw-r--r-- | hosts/eostre/default.nix | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/hosts/eostre/default.nix b/hosts/eostre/default.nix new file mode 100644 index 00000000..4aa6473e --- /dev/null +++ b/hosts/eostre/default.nix | |||
@@ -0,0 +1,104 @@ | |||
1 | { flake, config, pkgs, lib, ... }: | ||
2 | |||
3 | with lib; | ||
4 | |||
5 | { | ||
6 | imports = with flake.nixosModules.systemProfiles; [ | ||
7 | nfsroot | ||
8 | ]; | ||
9 | |||
10 | config = { | ||
11 | nixpkgs = { | ||
12 | system = "x86_64-linux"; | ||
13 | config = { | ||
14 | allowUnfree = true; | ||
15 | }; | ||
16 | }; | ||
17 | |||
18 | boot = { | ||
19 | initrd = { | ||
20 | availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "sd_mod" "sr_mod" ]; | ||
21 | kernelModules = [ "igb" ]; | ||
22 | }; | ||
23 | kernelModules = [ "kvm-amd" ]; | ||
24 | extraModulePackages = [ ]; | ||
25 | |||
26 | plymouth.enable = true; | ||
27 | |||
28 | tmpOnTmpfs = true; | ||
29 | }; | ||
30 | |||
31 | hardware = { | ||
32 | enableRedistributableFirmware = true; | ||
33 | cpu.amd.updateMicrocode = config.hardware.enableRedistributableFirmware; | ||
34 | |||
35 | nvidia = { | ||
36 | modesetting.enable = true; | ||
37 | powerManagement.enable = true; | ||
38 | }; | ||
39 | |||
40 | opengl.enable = true; | ||
41 | }; | ||
42 | |||
43 | environment.etc."machine-id".text = "f457b21333f1491e916521151ff5d468"; | ||
44 | |||
45 | networking = { | ||
46 | hostId = "f457b213"; | ||
47 | |||
48 | domain = "lan.yggdrasil"; | ||
49 | search = [ "lan.yggdrasil" "yggdrasil" ]; | ||
50 | |||
51 | hosts = { | ||
52 | "127.0.0.1" = [ "eostre.lan.yggdrasil" "eostre" ]; | ||
53 | "::1" = [ "eostre.lan.yggdrasil" "eostre" ]; | ||
54 | }; | ||
55 | |||
56 | firewall.enable = false; | ||
57 | nftables = { | ||
58 | enable = true; | ||
59 | rulesetFile = ./ruleset.nft; | ||
60 | }; | ||
61 | }; | ||
62 | |||
63 | services.resolved = { | ||
64 | llmnr = "false"; | ||
65 | }; | ||
66 | |||
67 | zramSwap.enable = true; | ||
68 | |||
69 | system.stateVersion = config.system.nixos.release; # No state | ||
70 | security.sudo.extraConfig = '' | ||
71 | Defaults lecture = never | ||
72 | ''; | ||
73 | |||
74 | |||
75 | time.timeZone = "Europe/Berlin"; | ||
76 | time.hardwareClockInLocalTime = true; | ||
77 | i18n.defaultLocale = "en_DK.UTF-8"; | ||
78 | |||
79 | |||
80 | environment.systemPackages = with pkgs; [ cifs-utils ]; | ||
81 | |||
82 | security.pam.mount = { | ||
83 | enable = true; | ||
84 | extraVolumes = [ | ||
85 | "<volume sgrp=\"users\" fstype=\"cifs\" server=\"vidhar.lan.yggdrasil\" path=\"home-eostre\" mountpoint=\"~\" />" | ||
86 | "<volume sgrp=\"users\" fstype=\"cifs\" server=\"vidhar.lan.yggdrasil\" path=\"%(USER)\" mountpoint=\"/run/media/%(USER)/vidhar\" />" | ||
87 | ]; | ||
88 | }; | ||
89 | |||
90 | |||
91 | services.xserver = { | ||
92 | enable = true; | ||
93 | displayManager.sddm = { | ||
94 | enable = true; | ||
95 | settings = { | ||
96 | Users.HideUsers = "gkleen"; | ||
97 | }; | ||
98 | }; | ||
99 | desktopManager.plasma5.enable = true; | ||
100 | |||
101 | videoDrivers = [ "nvidia" ]; | ||
102 | }; | ||
103 | }; | ||
104 | } | ||