about summary refs log tree commit diff
path: root/configurations
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--configurations/default.nix9
-rw-r--r--configurations/eonwe/default.nix42
-rw-r--r--configurations/eonwe/ollama.nix97
-rw-r--r--configurations/eonwe/vidya.nix9
-rw-r--r--configurations/ilmare/default.nix5
-rw-r--r--configurations/manwe/default.nix12
-rw-r--r--configurations/manwe/webserver.nix64
-rw-r--r--configurations/tulkas/default.nix66
-rw-r--r--configurations/varda/default.nix2
9 files changed, 230 insertions, 76 deletions
diff --git a/configurations/default.nix b/configurations/default.nix
index cc160e9..312ca9f 100644
--- a/configurations/default.nix
+++ b/configurations/default.nix
@@ -90,6 +90,15 @@ mapAttrs' mkConfiguration (
       srvos.nixosModules.server
     ];
 
+    tulkas.modules = with inputs; [
+      "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
+      disko.nixosModules.disko
+      nixos-hardware.nixosModules.common-cpu-amd
+      nixos-hardware.nixosModules.common-pc-ssd
+      nixpkgs.nixosModules.notDetected
+      srvos.nixosModules.server
+    ];
+
     yavanna.modules = with inputs; [
       "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
       nixos-hardware.nixosModules.common-cpu-intel
diff --git a/configurations/eonwe/default.nix b/configurations/eonwe/default.nix
index c33c21d..f718135 100644
--- a/configurations/eonwe/default.nix
+++ b/configurations/eonwe/default.nix
@@ -12,6 +12,7 @@ with lib;
     ark.enable = true;
 
     wireguard.client.enable = true;
+    wireguard-ng.client.enable = false;
 
     syncthing.enable = true;
 
@@ -23,10 +24,11 @@ with lib;
     android.enable = true;
     beets.enable = true;
     bluetooth.enable = true;
-    incus.enable = true;
     libvirtd.enable = true;
     mpd.enable = true;
     qutebrowser.enable = true;
+
+    hyprland.enable = true;
   };
 
   hm = {
@@ -37,6 +39,7 @@ with lib;
       paper-plane
       qolibri
       radeontop
+      rocmPackages.rocm-smi
       vial
       wacomtablet
     ];
@@ -50,8 +53,8 @@ with lib;
             mapShaders = map (args: toString (pkgs.fetchurl args));
             cfl-prediction = mapShaders [
               {
-                url = "https://raw.githubusercontent.com/Artoriuz/glsl-chroma-from-luma-prediction/471c65dd3915d39e7ef69957ab63e006125fbb88/CfL_Prediction.glsl";
-                sha256 = "sha256-Mgb1KqF1EPPzR3SCVr9S4XzVmZkYEEFIHSp59RZ9wq8=";
+                url = "https://raw.githubusercontent.com/Artoriuz/glsl-chroma-from-luma-prediction/9fdd0bc68cd8ae42a8072a7d5d098f118daa4293/CfL_Prediction.glsl";
+                sha256 = "sha256-RK3baWkL0mZwcx+utsHfiiX1mY1jxEOg7/kNsNJvEPc=";
               }
             ];
             ravu-lite-ar-r4 = mapShaders [
@@ -62,8 +65,8 @@ with lib;
             ];
             ssimdownscaler = mapShaders [
               {
-                url = "https://gist.githubusercontent.com/igv/36508af3ffc84410fe39761d6969be10/raw/575d13567bbe3caa778310bd3b2a4c516c445039/SSimDownscaler.glsl";
-                sha256 = "sha256-AEq2wv/Nxo9g6Y5e4I9aIin0plTcMqBG43FuOxbnR1w=";
+                url = "https://gist.githubusercontent.com/igv/36508af3ffc84410fe39761d6969be10/raw/38992bce7f9ff844f800820df0908692b65bb74a/SSimDownscaler.glsl";
+                sha256 = "sha256-9G9HEKFi0XBYudgu2GEFiLDATXvgfO9r8qjEB3go+AQ=";
               }
             ];
           in
@@ -149,7 +152,17 @@ with lib;
     };
   };
 
+  programs.corectrl.enable = true;
+
   services = {
+    displayManager = {
+      sddm.enable = lib.mkForce false;
+      ly = {
+        enable = true;
+        settings.animation = "matrix";
+      };
+    };
+
     languagetool = {
       enable = true;
       port = 8081;
@@ -293,11 +306,30 @@ with lib;
     "/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%"
+      ];
+    }
+  ];
+
   zramSwap = {
     enable = true;
     memoryPercent = 25;
   };
 
+  my.extraGroups = [ "corectrl" ];
+
   users = {
     users.builder = {
       isSystemUser = true;
diff --git a/configurations/eonwe/ollama.nix b/configurations/eonwe/ollama.nix
new file mode 100644
index 0000000..806885b
--- /dev/null
+++ b/configurations/eonwe/ollama.nix
@@ -0,0 +1,97 @@
+{
+  config,
+  lib,
+  ...
+}:
+{
+  ark.directories = [
+    config.services.ollama.home
+  ];
+
+  hm.programs.firefox.profiles.default.bookmarks = [
+    {
+      name = "Bookmarks Toolbar";
+      toolbar = true;
+      bookmarks = [
+        {
+          name = "Ollama";
+          url = "http://eonwe.shire.net:11435";
+        }
+        {
+          name = "Open WebUI";
+          url = "http://eonwe.shire.net:11436";
+        }
+      ];
+    }
+  ];
+
+  services = {
+    ollama = {
+      enable = true;
+
+      host = "0.0.0.0";
+      port = 11434;
+
+      user = "ollama";
+      group = "ollama";
+
+      acceleration = "rocm";
+      rocmOverrideGfx = "11.0.0";
+
+      environmentVariables.OLLAMA_ORIGINS = lib.concatStringsSep "," [
+        "http://eonwe.shire.net:11434"
+        "http://eonwe.shire.net:11435"
+        "http://eonwe.shire.net:11436"
+      ];
+
+      openFirewall = true;
+    };
+
+    nextjs-ollama-llm-ui = {
+      enable = true;
+
+      hostname = "0.0.0.0";
+      port = 11435;
+
+      ollamaUrl = "http://eonwe.shire.net:11434";
+    };
+
+    open-webui = {
+      enable = true;
+
+      host = "0.0.0.0";
+      port = 11436;
+
+      environment = {
+        ANONYMIZED_TELEMETRY = "False";
+        DO_NOT_TRACK = "True";
+        ENABLE_SIGNUP = "False";
+        OLLAMA_BASE_URL = "http://eonwe.shire.net:11434";
+        SCARF_NO_ANALYTICS = "True";
+        WEBUI_AUTH = "False";
+        WEBUI_URL = "http://eonwe.shire.net:11436";
+      };
+
+      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 7e10175..a40daa9 100644
--- a/configurations/eonwe/vidya.nix
+++ b/configurations/eonwe/vidya.nix
@@ -3,7 +3,7 @@
   nixfiles.modules = {
     common.nix.allowedUnfreePackages = [
       "cla-theme" # source-available
-      "dwarf-fortress"
+      "dwarf-fortress" # proprietary
       "fallout-ce" # source-available
       "fallout2-ce" # source-available
     ];
@@ -12,7 +12,11 @@
       lutris.enable = true;
 
       steam.enable = true;
-      steam-run.quirks.blackIsleStudios = true;
+      steam-run.quirks = {
+        blackIsleStudios = true;
+        cryptOfTheNecrodancer = true;
+        mountAndBladeWarband = false;
+      };
 
       minecraft.client.enable = true;
     };
@@ -29,7 +33,6 @@
     fallout-ce
     fallout2-ce
     gzdoom
-    nethack
     openmw
     openttd
     qzdl
diff --git a/configurations/ilmare/default.nix b/configurations/ilmare/default.nix
index a1b5007..bb89699 100644
--- a/configurations/ilmare/default.nix
+++ b/configurations/ilmare/default.nix
@@ -1,4 +1,7 @@
-_: {
+{ lib, ... }:
+{
+  imports = lib.attrValues (lib.modulesIn ./.);
+
   nixfiles.modules = {
     wireguard.client.enable = true;
 
diff --git a/configurations/manwe/default.nix b/configurations/manwe/default.nix
index 609d2a8..f9cb2be 100644
--- a/configurations/manwe/default.nix
+++ b/configurations/manwe/default.nix
@@ -1,17 +1,21 @@
-{ config, lib, ... }:
+{
+  config,
+  lib,
+  ...
+}:
 with lib;
 {
   imports = attrValues (modulesIn ./.);
 
   nixfiles.modules = {
+    wireguard.server.enable = true;
+
     nsd = {
       enable = true;
       fqdn = "ns1.${config.networking.domain}";
     };
     unbound.enable = true;
 
-    wireguard.server.enable = true;
-
     acme.enable = true;
 
     monitoring.enable = true;
@@ -38,6 +42,8 @@ with lib;
     vaultwarden.enable = true;
     ntfy.enable = true;
     plausible.enable = true;
+    uptime-kuma.enable = true;
+    thelounge.enable = true;
   };
 
   boot = {
diff --git a/configurations/manwe/webserver.nix b/configurations/manwe/webserver.nix
index 95a0b0b..051ddba 100644
--- a/configurations/manwe/webserver.nix
+++ b/configurations/manwe/webserver.nix
@@ -12,70 +12,6 @@ with lib;
     virtualHosts =
       with my.domain;
       {
-        # TODO Start using this.
-        # "start.local" = {
-        #   root = pkgs.hiccup;
-        #   locations = {
-        #     "/".tryFiles = "$uri $uri/ /index.html";
-        #     "~* ^.+config.json$".extraConfig = let
-        #       config = pkgs.writeText "config.json" (generators.toJSON {} {
-        #         version = "2.0";
-        #         id = "default";
-        #         title = "Demo Config";
-        #         url = "./configs/config.json";
-        #         featured = [
-        #           {
-        #             name = "GitHub";
-        #             background = "/assets/card.png";
-        #             link = "https://github.com/ashwin-pc/hiccup";
-        #           }
-        #         ];
-        #         categories = [
-        #           {
-        #             title = "Category 1";
-        #             links = [
-        #               {
-        #                 name = "Link 1";
-        #                 link = "https://example.com";
-        #               }
-        #             ];
-        #           }
-        #           {
-        #             title = "Category 2";
-        #             links = [
-        #               {
-        #                 name = "Link 1";
-        #                 link = "https://example.com";
-        #               }
-        #             ];
-        #           }
-        #           {
-        #             title = "Category 3";
-        #             links = [
-        #               {
-        #                 name = "Link 1";
-        #                 link = "https://example.com";
-        #               }
-        #             ];
-        #           }
-        #           {
-        #             title = "Category 4";
-        #             links = [
-        #               {
-        #                 name = "Link 1";
-        #                 link = "https://example.com";
-        #               }
-        #             ];
-        #           }
-        #         ];
-        #       });
-        #     in ''
-        #       alias ${config};
-        #     '';
-        #   };
-        #   enableACME = false;
-        #   forceSSL = false;
-        # };
         ${shire}.locations."/".return = "301 https://www.youtube.com/watch?v=dQw4w9WgXcQ";
         "git.${shire}".locations."/".return = "301 https://git.${azahi}";
         "bitwarden.${shire}".locations."/".return = "301 https://vaultwarden.${shire}";
diff --git a/configurations/tulkas/default.nix b/configurations/tulkas/default.nix
new file mode 100644
index 0000000..5946ea8
--- /dev/null
+++ b/configurations/tulkas/default.nix
@@ -0,0 +1,66 @@
+{ lib, this, ... }:
+with lib;
+{
+  imports = attrValues (modulesIn ./.);
+
+  nixfiles.modules = {
+    wireguard.client.enable = true;
+    wireguard-ng.server.enable = true;
+
+    unbound-ng.enable = true;
+    unbound-ng.domain = "shire.local";
+  };
+
+  services.qemuGuest.enable = true;
+
+  systemd.network.networks."40-eth0" = {
+    addresses = [
+      {
+        Address = this.ipv4.address;
+        Broadcast = true;
+      }
+    ];
+    routes = [
+      {
+        Gateway = this.ipv4.gatewayAddress;
+        GatewayOnLink = true;
+      }
+    ];
+  };
+
+  boot.loader.systemd-boot.enable = true;
+
+  disko.devices.disk.vda = {
+    device = "/dev/vda";
+    type = "disk";
+    content = {
+      type = "gpt";
+      partitions = {
+        esp = {
+          name = "ESP";
+          type = "EF00";
+          size = "512M";
+          content = {
+            type = "filesystem";
+            format = "vfat";
+            mountpoint = "/boot";
+          };
+        };
+        root = {
+          size = "100%";
+          content = {
+            type = "filesystem";
+            format = "xfs";
+            mountpoint = "/";
+            mountOptions = [ "noatime" ];
+          };
+        };
+      };
+    };
+  };
+
+  zramSwap = {
+    enable = true;
+    memoryPercent = 50;
+  };
+}
diff --git a/configurations/varda/default.nix b/configurations/varda/default.nix
index 908a3ec..c12c811 100644
--- a/configurations/varda/default.nix
+++ b/configurations/varda/default.nix
@@ -7,6 +7,8 @@ with lib;
     wireguard.client.enable = true;
 
     sing-box.enable = true;
+
+    games.minecraft.server.enable = false;
   };
 
   boot = {

Consider giving Nix/NixOS a try! <3