greenhouse

kore

my public infrastructure monorepo

git clone [email protected]:kore.git

feat(*): new machine 'gomphrena'

commitd162ccf6a2b37387f92298bbb09305754206bc3b
parentb814a8cd582a226b12597131c86751fb9cb0565f
authorlostduk <[email protected]>
date2026-03-26 13:35 +0000
flake.lock38++++++++++++++++++++++++++++++++++++++
flake.nix3+++
home/profiles/default.nix1+
home/profiles/gomphrena.nix33+++++++++++++++++++++++++++++++++
nixos/features/global.nix4++--
nixos/features/kore.nix6+++++-
nixos/hosts/default.nix1+
nixos/hosts/gomphrena.nix41++++++++++++++++++++++++++++++++++++++++
nixos/roles/default.nix3++-
nixos/roles/desktop.nix16++--------------
nixos/roles/home.nix21+++++++++++++++++++++

11 files changed, -18/+149

flake.lock

@@ -42,6 +42,22 @@         "type": "github"       }     },+    "flake-compat": {+      "flake": false,+      "locked": {+        "lastModified": 1767039857,+        "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",+        "owner": "edolstra",+        "repo": "flake-compat",+        "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",+        "type": "github"+      },+      "original": {+        "owner": "edolstra",+        "repo": "flake-compat",+        "type": "github"+      }+    },     "home-manager": {       "inputs": {         "nixpkgs": [@@ -124,6 +140,27 @@         "type": "github"       }     },+    "nixos-wsl": {+      "inputs": {+        "flake-compat": "flake-compat",+        "nixpkgs": [+          "nixpkgs"+        ]+      },+      "locked": {+        "lastModified": 1773882647,+        "narHash": "sha256-VzcOcE0LLpEnyoxLuMuptZ9ZWCkSBn99bTgEQoz5Viw=",+        "owner": "nix-community",+        "repo": "NixOS-WSL",+        "rev": "fd0eae98d1ecee31024271f8d64676250a386ee7",+        "type": "github"+      },+      "original": {+        "owner": "nix-community",+        "repo": "NixOS-WSL",+        "type": "github"+      }+    },     "nixpkgs": {       "locked": {         "lastModified": 1768564909,@@ -162,6 +199,7 @@         "home-manager": "home-manager",         "impermanence": "impermanence",         "llm-agents": "llm-agents",+        "nixos-wsl": "nixos-wsl",         "nixpkgs": "nixpkgs_2"       }     },

flake.nix

@@ -4,6 +4,9 @@     nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";     impermanence.url = "github:nix-community/impermanence"; +    nixos-wsl.url = "github:nix-community/NixOS-WSL";+    nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";+     disko.url = "github:nix-community/disko";     disko.inputs.nixpkgs.follows = "nixpkgs";     

home/profiles/default.nix

@@ -8,4 +8,5 @@ let   }; in {   sunflower = mkProfile "sunflower";+  gomphrena = mkProfile "gomphrena"; }

home/profiles/gomphrena.nix

@@ -0,0 +1,33 @@+{ lib, ... }:++{+  imports = [+    ../features/cli/pi.nix+    ../features/cli/gpg.nix+    ../features/cli/ssh.nix+    ../features/cli/git.nix+    ../features/cli/nvim.nix+    ../features/cli/bash.nix+    ../features/cli/tmux.nix++    ../features/misc/xdg.nix+  ];++  # TMP: neovim suck tbh but it work+  programs.neovim.extraConfig = ''+    let g:clipboard = {+      \   'name': 'WslClipboard',+      \   'copy': {+      \      '+': 'clip.exe',+      \      '*': 'clip.exe',+      \    },+      \   'paste': {+      \      '+': 'powershell.exe -NoLogo -NoProfile -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',+      \      '*': 'powershell.exe -NoLogo -NoProfile -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',+      \   },+      \   'cache_enabled': 0,+      \ }+  '';++  home.persistence."/persist" = lib.mkForce {};+}

nixos/features/global.nix

@@ -128,7 +128,7 @@         btrfs sub cre "$MNTPOINT/@"       )     '';-  in {+  in lib.mkIf (config ? "disko" && config.disko.devices.disk ? "main") ({     supportedFilesystems = [ "btrfs" ];     postDeviceCommands = lib.mkIf (!systemdStage1) (lib.mkBefore script); @@ -144,7 +144,7 @@       };       script = script;     };-  };+  });    fileSystems."/persist".neededForBoot = true; }

nixos/features/kore.nix

@@ -31,7 +31,11 @@ in {       hosts = {         sunflower = {           ipv4 = "0.0.0.0";-          roles = [ "workstation" ];+          roles = [ "home" "workstation" ];+        };+        gomphrena = {+          ipv4 = "0.0.0.0";+          roles = [ "home" ];         };       };       currentHost = config.kore.hosts.${config.networking.hostName};

nixos/hosts/default.nix

@@ -18,4 +18,5 @@ let   }; in {   sunflower = mkSystem "x86_64-linux" "sunflower";+  gomphrena = mkSystem "x86_64-linux" "gomphrena"; }

nixos/hosts/gomphrena.nix

@@ -0,0 +1,41 @@+{ lib, pkgs, inputs, modulesPath, ... }:++{+  imports = [+    inputs.nixos-wsl.nixosModules.default++    ( modulesPath + "/installer/scan/not-detected.nix" )+  ];++  wsl = {+    enable = true;+    defaultUser = "lostduk";+    useWindowsDriver = true;++    usbip = {+      enable = true;+      autoAttach = [ "1-14" ];+    };+  };++  users.users.lostduk = {+    password = "tmp";+    isNormalUser = true;++    extraGroups = [ "wheel" ];+    subUidRanges = [{ startUid = 100000; count = 65536; }];+    subGidRanges = [{ startGid = 100000; count = 65536; }];+  };++  hardware = {+    graphics.enable = true;+    cpu.intel.updateMicrocode = true;+  };++  environment.persistence."/persist" = lib.mkForce {};++  fileSystems."/persist" = {+    enable = lib.mkForce false;+    neededForBoot = lib.mkForce false;+  };+}

nixos/roles/default.nix

@@ -1,5 +1,6 @@ {   imports = [-    ./workstation.nix+    ./home.nix+    ./desktop.nix   ]; }

nixos/roles/workstation.nix → nixos/roles/desktop.nix

@@ -1,22 +1,10 @@-{ inputs, outputs, config, pkgs, lib, ... }:+{ outputs, config, pkgs, lib, ... }:  let-  roleName = "workstation";+  roleName = "desktop";   roleEnabled = lib.elem roleName config.kore.currentHost.roles; in {-  imports = [ inputs.home-manager.nixosModules.home-manager  ];-   config = lib.mkMerge [{} (lib.mkIf roleEnabled {-    home-manager = {-      useGlobalPkgs = true;-      useUserPackages = true;-      extraSpecialArgs = { inherit inputs outputs; };--      users.lostduk = outputs.homeConfigurations.${config.networking.hostName};-    };--    programs.fuse.userAllowOther = true;-     xdg.portal = {       enable = true;       extraPortals = [ pkgs.xdg-desktop-portal-wlr ];

nixos/roles/home.nix

@@ -0,0 +1,21 @@+{ inputs, outputs, config, pkgs, lib, ... }:++let+  roleName = "home";+  roleEnabled = lib.elem roleName config.kore.currentHost.roles;+in {+  imports = [ inputs.home-manager.nixosModules.home-manager  ];++  config = lib.mkMerge [{} (lib.mkIf roleEnabled {+    home-manager = {+      useGlobalPkgs = true;+      useUserPackages = true;+      extraSpecialArgs = { inherit inputs outputs; };++      users.lostduk = outputs.homeConfigurations.${config.networking.hostName};+    };++    programs.fuse.userAllowOther = true;+  })];+}+