From ac74b85231e911291eabce00a7ed08a0e60cc139 Mon Sep 17 00:00:00 2001 From: aaron Date: Fri, 2 Oct 2026 22:01:56 +0200 Subject: [PATCH 1/3] feature(krypton): add framework 13 pro to the list of hosts --- flake.lock | 21 +++++++++ flake.nix | 5 ++ hosts/krypton/configuration.nix | 35 ++++++++++++++ hosts/krypton/hardware-configuration.nix | 60 ++++++++++++++++++++++++ hosts/krypton/niri.nix | 24 ++++++++++ 5 files changed, 145 insertions(+) create mode 100644 hosts/krypton/configuration.nix create mode 100644 hosts/krypton/hardware-configuration.nix create mode 100644 hosts/krypton/niri.nix diff --git a/flake.lock b/flake.lock index ef154e3..c5ca9f5 100644 --- a/flake.lock +++ b/flake.lock @@ -41,6 +41,26 @@ "type": "github" } }, + "nixos-hardware": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1790948122, + "narHash": "sha256-fDMYyzY1lI5b8RuCMrvoaIgTeRwNnTG4dNk1ucROlQE=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "0953bb1a609df63013176e3463393f8df993d3ef", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1790689126, @@ -102,6 +122,7 @@ "root": { "inputs": { "home-manager": "home-manager", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixvim": "nixvim", "noctalia": "noctalia" diff --git a/flake.nix b/flake.nix index cf7edb1..84bc252 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,10 @@ url = "github:noctalia-dev/noctalia-shell"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixos-hardware = { + url = "github:NixOS/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; @@ -52,6 +56,7 @@ default = mkHost "default"; neon = mkHost "neon"; argon = mkHost "argon"; + krypton = mkHost "krypton"; }; }; } diff --git a/hosts/krypton/configuration.nix b/hosts/krypton/configuration.nix new file mode 100644 index 0000000..a711fe0 --- /dev/null +++ b/hosts/krypton/configuration.nix @@ -0,0 +1,35 @@ +# krypton: framework 13 pro, intel core ultra x7 358H + +{ inputs, ... }: + +{ + imports = [ + inputs.nixos-hardware.nixosModules.framework-intel-core-ultra-series3 + ../../modules/nixos/appimage.nix + ../../modules/nixos/astro.nix + ../../modules/nixos/audio.nix + ../../modules/nixos/bootloader.nix + ../../modules/nixos/certificates.nix + ../../modules/nixos/docker.nix + ../../modules/nixos/gnupg.nix + ../../modules/nixos/locales.nix + ../../modules/nixos/networking.nix + ../../modules/nixos/niri.nix + ../../modules/nixos/noctalia.nix + ../../modules/nixos/openssh.nix + ../../modules/nixos/packages.nix + ../../modules/nixos/protonvpn.nix + ../../modules/nixos/sddm.nix + ../../modules/nixos/services.nix + ../../modules/nixos/settings.nix + ../../modules/nixos/steam.nix + ../../modules/nixos/users.nix + ../../modules/nixos/vial.nix + ]; + + # host-specific niri config (input devices, laptop binds) + home-manager.users.aaron.imports = [ ./niri.nix ]; + + networking.hostName = "krypton"; + system.stateVersion = "26.05"; # don't change +} diff --git a/hosts/krypton/hardware-configuration.nix b/hosts/krypton/hardware-configuration.nix new file mode 100644 index 0000000..7b44bf5 --- /dev/null +++ b/hosts/krypton/hardware-configuration.nix @@ -0,0 +1,60 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + config, + lib, + pkgs, + modulesPath, + ... +}: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "nvme" + "usb_storage" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.initrd.luks.devices."cryptroot" = { + device = "/dev/disk/by-label/nixcrypt"; + allowDiscards = true; + bypassWorkqueues = true; + }; + + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixroot"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-label/nixboot"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; + + fileSystems."/home" = { + device = "/dev/disk/by-label/nixhome"; + fsType = "ext4"; + }; + + swapDevices = [ + { device = "/dev/disk/by-label/nixswap"; } + ]; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/krypton/niri.nix b/hosts/krypton/niri.nix new file mode 100644 index 0000000..29e4b39 --- /dev/null +++ b/hosts/krypton/niri.nix @@ -0,0 +1,24 @@ +# krypton: framework 13 laptop, the built-in display is auto-configured by niri + +{ lib, ... }: + +{ + wayland.windowManager.niri.settings = { + input.touchpad = { + tap = { }; + natural-scroll = { }; + }; + + layout.gaps = lib.mkForce 10; + + binds = { + "Print".screenshot = { }; + "Ctrl+Print".screenshot-screen = { }; + "Mod+Shift+P".power-off-monitors = { }; + + # finer brightness steps + "XF86MonBrightnessUp".spawn-sh = lib.mkForce "brightnessctl --class=backlight set +1%"; + "XF86MonBrightnessDown".spawn-sh = lib.mkForce "brightnessctl --class=backlight set 1%-"; + }; + }; +} From 4845485547da7ff628f26fbcab2fa0d7e5f85074 Mon Sep 17 00:00:00 2001 From: aaron Date: Fri, 2 Oct 2026 22:40:37 +0200 Subject: [PATCH 2/3] fix: add proper hardware-configuration for the host --- hosts/krypton/hardware-configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/krypton/hardware-configuration.nix b/hosts/krypton/hardware-configuration.nix index 7b44bf5..10b7825 100644 --- a/hosts/krypton/hardware-configuration.nix +++ b/hosts/krypton/hardware-configuration.nix @@ -21,7 +21,7 @@ "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.luks.devices."cryptroot" = { device = "/dev/disk/by-label/nixcrypt"; allowDiscards = true; @@ -54,7 +54,7 @@ { device = "/dev/disk/by-label/nixswap"; } ]; - networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.npu.enable = true; } From 645a4163f5cfd7fdeb6e1c2d5afd95ea6cb521e3 Mon Sep 17 00:00:00 2001 From: aaron Date: Fri, 2 Oct 2026 23:28:05 +0200 Subject: [PATCH 3/3] feature(neon): since nixos-hardware was added, add support for the t14g1 as well --- hosts/neon/configuration.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/neon/configuration.nix b/hosts/neon/configuration.nix index 8febcdb..3b1a9bf 100644 --- a/hosts/neon/configuration.nix +++ b/hosts/neon/configuration.nix @@ -1,5 +1,10 @@ +# neon: thinkpad t14 gen1 (intel) + +{ inputs, ... }: + { imports = [ + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-intel-gen1 ../../modules/nixos/appimage.nix ../../modules/nixos/astro.nix ../../modules/nixos/audio.nix