diff options
author | Azat Bahawi <azat@bahawi.net> | 2022-12-17 16:39:09 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-12-17 16:39:09 +0300 |
commit | 8f137c28230623259a964484adcf31fe00756594 (patch) | |
tree | 82bce6a13fda125087cf6d9dc80aa91d9230d6c4 /nixosConfigurations | |
parent | 2022-11-20 (diff) |
2022-12-17
Diffstat (limited to '')
-rw-r--r-- | nixosConfigurations/default.nix (renamed from configurations/default.nix) | 17 | ||||
-rw-r--r-- | nixosConfigurations/eonwe/default.nix (renamed from configurations/eonwe/default.nix) | 54 | ||||
-rw-r--r-- | nixosConfigurations/manwe/default.nix (renamed from configurations/manwe/default.nix) | 0 | ||||
-rw-r--r-- | nixosConfigurations/manwe/mailserver.nix (renamed from configurations/manwe/mailserver.nix) | 2 | ||||
-rw-r--r-- | nixosConfigurations/manwe/webserver.nix (renamed from configurations/manwe/webserver.nix) | 2 | ||||
-rw-r--r-- | nixosConfigurations/melian/default.nix (renamed from configurations/melian/default.nix) | 46 | ||||
-rw-r--r-- | nixosConfigurations/test-headful/default.nix (renamed from configurations/test-headful/default.nix) | 0 | ||||
-rw-r--r-- | nixosConfigurations/test-headless/default.nix (renamed from configurations/test-headless/default.nix) | 0 | ||||
-rw-r--r-- | nixosConfigurations/varda/default.nix (renamed from configurations/varda/default.nix) | 0 | ||||
-rw-r--r-- | nixosConfigurations/yavanna/default.nix (renamed from configurations/yavanna/default.nix) | 0 |
10 files changed, 44 insertions, 77 deletions
diff --git a/configurations/default.nix b/nixosConfigurations/default.nix index a488cf1..8ebeda4 100644 --- a/configurations/default.nix +++ b/nixosConfigurations/default.nix @@ -7,14 +7,23 @@ with lib; let modules ? [], configuration ? ./${name}, this ? my.configurations.${name}, + extraSpecialArgs ? { + localUsername = my.username; + localHostname = this.hostname; + }, }: nameValuePair name (nixosSystem { inherit (this) system; modules = - attrValues inputs.self.nixosModules - ++ modules + modules + ++ attrValues inputs.self.modules + ++ attrValues inputs.self.nixosModules ++ optional (configuration != null) (import configuration); - specialArgs = {inherit inputs lib this;}; + specialArgs = + { + inherit inputs lib this; + } + // extraSpecialArgs; }); in mapAttrs' mkConfiguration { @@ -46,7 +55,7 @@ in }; }; - # A beefy desktop PC: 7950x/rx6750xt/128GB. + # A beefy desktop: 7950x/rx6750xt/128GB. eonwe.modules = with inputs; [ nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-gpu-amd diff --git a/configurations/eonwe/default.nix b/nixosConfigurations/eonwe/default.nix index c9af8e5..a867837 100644 --- a/configurations/eonwe/default.nix +++ b/nixosConfigurations/eonwe/default.nix @@ -2,6 +2,7 @@ config, lib, pkgs, + this, ... }: with lib; { @@ -18,6 +19,7 @@ with lib; { }; android.enable = true; bluetooth.enable = true; + discord.enable = true; libvirtd.enable = true; qutebrowser.enable = true; }; @@ -27,41 +29,28 @@ with lib; { mpv.config = { hwdec = "vdpau"; - vo = "vdpau"; + vo = "gpu"; profile = "gpu-hq"; }; }; - networking = { - interfaces = { - eth0.useDHCP = true; - wlan0.useDHCP = true; - }; - - networkmanager = { - enable = true; - wifi.backend = "iwd"; - }; - - wireless = { - enable = false; - iwd.enable = true; - userControlled.enable = true; - allowAuxiliaryImperativeNetworks = true; - }; - }; - boot = { - initrd.availableKernelModules = ["ahci" "nvme" "sd_mod" "usb_storage" "usbhid" "xhci_pci"]; - - loader = { - efi.canTouchEfiVariables = true; + # Silence benign MCE errors: + # ``` + # mce: [Hardware Error]: CPU 1: Machine Check: 0 Bank 29: ffffffffffffffff + # mce: [Hardware Error]: TSC 0 MISC ff1fffffffffffff SYND ffffffffffffffff IPID ffffffffffffffff + # mce: [Hardware Error]: PROCESSOR 2:a60f12 TIME 1669988017 SOCKET 0 APIC 2 microcode a601201 + # ``` + kernelParams = ["mce=nobootlog"]; - systemd-boot = { - enable = true; - configurationLimit = 10; - }; - }; + initrd.availableKernelModules = [ + "ahci" + "nvme" + "sd_mod" + "usb_storage" + "usbhid" + "xhci_pci" + ]; }; fileSystems = { @@ -77,8 +66,7 @@ with lib; { }; }; - zramSwap = { - enable = true; - memoryPercent = 25; - }; + # No swap space is declared here because the system already has 128Gb of RAM. + # I didn't manage to even hit 100Gb mark even when running large + # computations/compiling something big. } diff --git a/configurations/manwe/default.nix b/nixosConfigurations/manwe/default.nix index b8dd324..b8dd324 100644 --- a/configurations/manwe/default.nix +++ b/nixosConfigurations/manwe/default.nix diff --git a/configurations/manwe/mailserver.nix b/nixosConfigurations/manwe/mailserver.nix index 966c21c..a4b552a 100644 --- a/configurations/manwe/mailserver.nix +++ b/nixosConfigurations/manwe/mailserver.nix @@ -91,6 +91,4 @@ with lib; { mode = aggressive ''; }; - - system.extraDependencies = [inputs.simple-nixos-mailserver]; } diff --git a/configurations/manwe/webserver.nix b/nixosConfigurations/manwe/webserver.nix index e1ee425..4dded7e 100644 --- a/configurations/manwe/webserver.nix +++ b/nixosConfigurations/manwe/webserver.nix @@ -20,6 +20,4 @@ with lib; { ${gondor}.locations."/".return = concatStrings [frodo gondor]; ${rohan}.locations."/".return = concatStrings [frodo rohan]; }); - - system.extraDependencies = [inputs.azahi-cc]; } diff --git a/configurations/melian/default.nix b/nixosConfigurations/melian/default.nix index f296546..3ba854c 100644 --- a/configurations/melian/default.nix +++ b/nixosConfigurations/melian/default.nix @@ -15,25 +15,6 @@ with lib; { throttled.enable = true; }; - networking = { - interfaces = { - eth0.useDHCP = true; - wlan0.useDHCP = true; - }; - - networkmanager = { - enable = true; - wifi.backend = "iwd"; - }; - - wireless = { - enable = false; - iwd.enable = true; - userControlled.enable = true; - allowAuxiliaryImperativeNetworks = true; - }; - }; - hardware.trackpoint = { enable = true; speed = 500; @@ -80,13 +61,15 @@ with lib; { }; boot = { - # Speeding up Wi-Fi a bit. - extraModprobeConfig = '' - options iwlwifi 11n_disable=1 - ''; - initrd = { - availableKernelModules = ["ahci" "nvme" "sd_mod" "usb_storage" "usbhid" "xhci_pci"]; + availableKernelModules = [ + "ahci" + "nvme" + "sd_mod" + "usb_storage" + "usbhid" + "xhci_pci" + ]; luks.devices."root" = { device = "/dev/disk/by-uuid/c1b46f24-eec0-47d2-a142-75ddfd7bb218"; @@ -94,15 +77,6 @@ with lib; { bypassWorkqueues = true; }; }; - - loader = { - efi.canTouchEfiVariables = true; - - systemd-boot = { - enable = true; - configurationLimit = 10; - }; - }; }; fileSystems = { @@ -118,8 +92,8 @@ with lib; { }; }; - # NOTE This will make hibernation extremely hard if on an encrypted partition. - # This also could not work on ZFS or Btrfs. + # NOTE This makes hibernation pretty much impossible because the partition is + # encrypted. swapDevices = [ { device = "/swapfile"; diff --git a/configurations/test-headful/default.nix b/nixosConfigurations/test-headful/default.nix index 25db8c7..25db8c7 100644 --- a/configurations/test-headful/default.nix +++ b/nixosConfigurations/test-headful/default.nix diff --git a/configurations/test-headless/default.nix b/nixosConfigurations/test-headless/default.nix index 919a436..919a436 100644 --- a/configurations/test-headless/default.nix +++ b/nixosConfigurations/test-headless/default.nix diff --git a/configurations/varda/default.nix b/nixosConfigurations/varda/default.nix index 5e0914e..5e0914e 100644 --- a/configurations/varda/default.nix +++ b/nixosConfigurations/varda/default.nix diff --git a/configurations/yavanna/default.nix b/nixosConfigurations/yavanna/default.nix index e3172a6..e3172a6 100644 --- a/configurations/yavanna/default.nix +++ b/nixosConfigurations/yavanna/default.nix |