summaryrefslogtreecommitdiff
path: root/hosts/eos/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-10-31 15:15:00 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-10-31 15:15:00 +0100
commitf300ea69b66427bd2a5a92a4c4f0db0aa99392b0 (patch)
tree7cd983c26895bec9ad29f76990ece205a112f53e /hosts/eos/default.nix
parent31832d598650eb17ba24a81680039b1973e80158 (diff)
downloadnixos-f300ea69b66427bd2a5a92a4c4f0db0aa99392b0.tar
nixos-f300ea69b66427bd2a5a92a4c4f0db0aa99392b0.tar.gz
nixos-f300ea69b66427bd2a5a92a4c4f0db0aa99392b0.tar.bz2
nixos-f300ea69b66427bd2a5a92a4c4f0db0aa99392b0.tar.xz
nixos-f300ea69b66427bd2a5a92a4c4f0db0aa99392b0.zip
...
Diffstat (limited to 'hosts/eos/default.nix')
-rw-r--r--hosts/eos/default.nix101
1 files changed, 101 insertions, 0 deletions
diff --git a/hosts/eos/default.nix b/hosts/eos/default.nix
new file mode 100644
index 00000000..1c5347e7
--- /dev/null
+++ b/hosts/eos/default.nix
@@ -0,0 +1,101 @@
1{ flake, config, pkgs, lib, ... }:
2
3with 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 = "asgard.yggdrasil";
49 search = [ "asgard.yggdrasil" "yggdrasil" ];
50
51 hosts = {
52 "127.0.0.1" = [ "eos.asgard.yggdrasil" "eos" ];
53 "::1" = [ "eos.asgard.yggdrasil" "eos" ];
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
71
72 time.timeZone = "Europe/Berlin";
73 time.hardwareClockInLocalTime = true;
74 i18n.defaultLocale = "en_DK.UTF-8";
75
76
77 environment.systemPackages = with pkgs; [ cifs-utils ];
78
79 security.pam.mount = {
80 enable = true;
81 extraVolumes = [
82 "<volume sgrp=\"users\" fstype=\"cifs\" server=\"vidhar.lan.yggdrasil\" path=\"home-eos\" mountpoint=\"~\" />"
83 "<volume sgrp=\"users\" fstype=\"cifs\" server=\"vidhar.lan.yggdrasil\" path=\"%(USER)\" mountpoint=\"/run/media/%(USER)/vidhar\" />"
84 ];
85 };
86
87
88 services.xserver = {
89 enable = true;
90 displayManager.sddm = {
91 enable = true;
92 settings = {
93 Users.HideUsers = "gkleen";
94 };
95 };
96 desktopManager.plasma5.enable = true;
97
98 videoDrivers = [ "nvidia" ];
99 };
100 };
101}