about summary refs log tree commit diff
path: root/configurations
diff options
context:
space:
mode:
Diffstat (limited to 'configurations')
-rw-r--r--configurations/eonwe/default.nix67
-rw-r--r--configurations/eonwe/ollama.nix26
-rw-r--r--configurations/eonwe/vidya.nix44
-rw-r--r--configurations/manwe/default.nix3
-rw-r--r--configurations/yavanna/default.nix50
5 files changed, 89 insertions, 101 deletions
diff --git a/configurations/eonwe/default.nix b/configurations/eonwe/default.nix
index f718135..68cfac4 100644
--- a/configurations/eonwe/default.nix
+++ b/configurations/eonwe/default.nix
@@ -193,34 +193,7 @@ with lib;
     cores = 30;
   };
 
-  # Required[1] for using ZFS kernel modules with "unsupported" kernels.
-  #
-  # [1]: https://github.com/NixOS/nixpkgs/pull/121113#issuecomment-830003344
-  # [1]: https://github.com/NixOS/nixpkgs/pull/230498#issuecomment-1551328615
-  nixpkgs.config.allowBroken = true;
-
   boot = {
-    kernelPackages = pkgs.linuxPackages_xanmod_latest;
-
-    kernelParams = [
-      # 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
-      # ```
-      "mce=nobootlog"
-      # This disables[1] User Mode Instruction Protection (UMIP)[2]. This is
-      # required for some games to run via Wine.
-      #
-      # [1]: https://docs.kernel.org/x86/cpuinfo.html
-      # [2]: https://en.wikichip.org/wiki/x86/umip
-      "clearcpuid=514"
-    ];
-
-    # https://wiki.archlinux.org/title/improving_performance#Watchdogs
-    blacklistedKernelModules = [ "sp5100_tco" ];
-
     # The boot drive is Samsung SSD 980 PRO 2TB.
     initrd.kernelModules = [ "nvme" ];
 
@@ -304,31 +277,28 @@ with lib;
     # [1]: https://github.com/nix-community/impermanence/issues/22
     # [1]: https://github.com/NixOS/nixpkgs/pull/86967#pullrequestreview-667929259
     "/home/${my.username}".neededForBoot = true;
-  };
 
-  systemd.mounts = [
-    {
-      type = "tmpfs";
-      what = "tmpfs";
-      where = "/var/tmp";
-      mountConfig.Options = [
-        "huge=within_size"
-        "mode=1777"
-        "noatime"
-        "nodev"
-        "nosuid"
-        "rw"
-        "size=25%"
+    "/mnt/ydata/music" = {
+      device = "yavanna.shire.net:/export/music";
+      fsType = "nfs";
+      options = [
+        "ro"
+        "noauto"
+        "x-systemd.automount"
+        "x-systemd.idle-timeout=${5 * 60 |> toString}"
       ];
-    }
-  ];
+    };
+  };
 
   zramSwap = {
     enable = true;
-    memoryPercent = 25;
+    memoryPercent = 50;
   };
 
-  my.extraGroups = [ "corectrl" ];
+  my.extraGroups = [
+    "corectrl"
+    config.nixfiles.modules.piracy.group
+  ];
 
   users = {
     users.builder = {
@@ -339,7 +309,12 @@ with lib;
       ];
       useDefaultShell = true;
     };
-    groups.builder = { };
+    groups = {
+      builder = { };
+      piracy = {
+        inherit (config.nixfiles.modules.piracy) gid;
+      };
+    };
   };
 
   nix.settings.trusted-users = [ "builder" ];
diff --git a/configurations/eonwe/ollama.nix b/configurations/eonwe/ollama.nix
index 806885b..45e6179 100644
--- a/configurations/eonwe/ollama.nix
+++ b/configurations/eonwe/ollama.nix
@@ -1,11 +1,11 @@
 {
-  config,
   lib,
   ...
 }:
 {
   ark.directories = [
-    config.services.ollama.home
+    "/var/lib/private/open-webui"
+    "/var/lib/private/ollama"
   ];
 
   hm.programs.firefox.profiles.default.bookmarks = [
@@ -32,9 +32,6 @@
       host = "0.0.0.0";
       port = 11434;
 
-      user = "ollama";
-      group = "ollama";
-
       acceleration = "rocm";
       rocmOverrideGfx = "11.0.0";
 
@@ -75,23 +72,4 @@
       openFirewall = true;
     };
   };
-
-  systemd.services.ollama.serviceConfig = {
-    StateDirectory = lib.mkForce config.services.ollama.home;
-    DynamicUser = lib.mkForce false;
-    User = config.services.ollama.user;
-    Group = config.services.ollama.group;
-  };
-
-  users = {
-    users.ollama = {
-      isSystemUser = true;
-      group = "ollama";
-      inherit (config.services.ollama) home;
-      uid = 241; # Reuses a removed ID from Nixpkgs.
-    };
-    groups.ollama.gid = 241;
-  };
-
-  my.extraGroups = [ "ollama" ];
 }
diff --git a/configurations/eonwe/vidya.nix b/configurations/eonwe/vidya.nix
index a40daa9..0cde57a 100644
--- a/configurations/eonwe/vidya.nix
+++ b/configurations/eonwe/vidya.nix
@@ -10,34 +10,32 @@
 
     games = {
       lutris.enable = true;
-
       steam.enable = true;
-      steam-run.quirks = {
-        blackIsleStudios = true;
-        cryptOfTheNecrodancer = true;
-        mountAndBladeWarband = false;
-      };
-
-      minecraft.client.enable = true;
+      # steam-run.quirks = {
+      #   blackIsleStudios = true;
+      #   cryptOfTheNecrodancer = true;
+      #   mountAndBladeWarband = false;
+      # };
+      # minecraft.client.enable = true;
     };
   };
 
   hm.home.packages = with pkgs; [
-    (crawl.override { tileMode = true; })
-    (dwarf-fortress-packages.dwarf-fortress-full.override {
-      dfVersion = "50.13";
-      theme = "cla";
-      enableIntro = false;
-      enableFPS = true;
-    })
-    fallout-ce
-    fallout2-ce
-    gzdoom
-    openmw
-    openttd
-    qzdl
-    r2modman
+    # (crawl.override { tileMode = true; })
+    # (dwarf-fortress-packages.dwarf-fortress-full.override {
+    #   dfVersion = "50.13";
+    #   theme = "cla";
+    #   enableIntro = false;
+    #   enableFPS = true;
+    # })
+    # fallout-ce
+    # fallout2-ce
+    # gzdoom
+    # openmw
+    # openttd
+    # qzdl
+    # r2modman
+    # xonotic
     vcmi
-    xonotic
   ];
 }
diff --git a/configurations/manwe/default.nix b/configurations/manwe/default.nix
index f9cb2be..89b111a 100644
--- a/configurations/manwe/default.nix
+++ b/configurations/manwe/default.nix
@@ -7,6 +7,9 @@ with lib;
 {
   imports = attrValues (modulesIn ./.);
 
+  # Something is broken there. Not sure why it affects me tho.
+  disabledModules = [ "services/networking/wireguard-networkd.nix" ];
+
   nixfiles.modules = {
     wireguard.server.enable = true;
 
diff --git a/configurations/yavanna/default.nix b/configurations/yavanna/default.nix
index b9de05e..b827dd9 100644
--- a/configurations/yavanna/default.nix
+++ b/configurations/yavanna/default.nix
@@ -1,4 +1,9 @@
-_: {
+{
+  config,
+  lib,
+  ...
+}:
+{
   nixfiles.modules = {
     wireguard.client.enable = true;
 
@@ -6,9 +11,31 @@ _: {
 
     acme.enable = true;
 
-    rtorrent.enable = true;
-    lidarr.enable = true;
-    jackett.enable = true;
+    piracy = {
+      enable = true;
+      lidarr.enable = true;
+      radarr.enable = false;
+      sonarr.enable = false;
+    };
+  };
+
+  services.nfs.server = {
+    enable = true;
+    exports =
+      lib.concatMapStringsSep "\n"
+        (
+          dir:
+          let
+            target = s: "${s}(insecure,ro,no_subtree_check)";
+            v4 = target config.nixfiles.modules.wireguard.ipv4.subnet;
+            v6 = target config.nixfiles.modules.wireguard.ipv6.subnet;
+          in
+          "${dir} ${v4} ${v6}"
+        )
+        [
+          "/export/rtorrent"
+          "/export/music"
+        ];
   };
 
   boot.loader.grub = {
@@ -17,10 +44,17 @@ _: {
     configurationLimit = 5;
   };
 
-  fileSystems."/" = {
-    device = "/dev/sda2";
-    fsType = "ext4";
-    options = [ "noatime" ];
+  fileSystems = {
+    "/" = {
+      device = "/dev/sda2";
+      fsType = "ext4";
+      options = [ "noatime" ];
+    };
+
+    "/export/music" = {
+      device = "/var/lib/lidarr/root";
+      options = [ "bind" ];
+    };
   };
 
   swapDevices = [ { device = "/dev/sda3"; } ];

Consider giving Nix/NixOS a try! <3