From 93f0dd4871d8358271d8441e64bda68a19c17bd5 Mon Sep 17 00:00:00 2001 From: lucy Date: Tue, 1 Sep 2026 12:22:30 +0200 Subject: [PATCH 1/3] split up config into base and specialized --- flake.lock | 72 ++++++++++++++++++++++++++++ flake.nix | 4 ++ modules/hosts/base/configuration.nix | 67 ++++++++++++++++++++++++++ modules/hosts/nerv/configuration.nix | 59 ++--------------------- modules/hosts/nerv/home.nix | 10 ++++ 5 files changed, 157 insertions(+), 55 deletions(-) create mode 100644 modules/hosts/base/configuration.nix diff --git a/flake.lock b/flake.lock index 2c6a96d..080958f 100644 --- a/flake.lock +++ b/flake.lock @@ -18,6 +18,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -36,6 +52,24 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -52,6 +86,28 @@ "type": "github" } }, + "helium": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1788008499, + "narHash": "sha256-0RfpRmzq2JJdWbiykYxduT1BvMeIzOnljUT775JCHhs=", + "owner": "AlvaroParker", + "repo": "helium-nix", + "rev": "ed54f25251951c8570cca7460132c2c2b46522a8", + "type": "github" + }, + "original": { + "owner": "AlvaroParker", + "repo": "helium-nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": "nixpkgs" @@ -173,6 +229,7 @@ "root": { "inputs": { "base16": "base16", + "helium": "helium", "home-manager": "home-manager", "nixcord": "nixcord", "nixpkgs": "nixpkgs_3", @@ -181,6 +238,21 @@ "tt-terminal": "tt-terminal" } }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 5cd2f6f..4e47082 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,10 @@ base16.url = "github:SenchoPens/base16.nix"; home-manager.url = "github:nix-community/home-manager"; nixcord.url = "github:4evy/nixcord"; + helium = { + url = "github:AlvaroParker/helium-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; tt-schemes = { url = "github:tinted-theming/schemes"; flake = false; diff --git a/modules/hosts/base/configuration.nix b/modules/hosts/base/configuration.nix new file mode 100644 index 0000000..6789cd3 --- /dev/null +++ b/modules/hosts/base/configuration.nix @@ -0,0 +1,67 @@ +{ + config, + inputs, + pkgs, +}: +{ + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + networking.networkmanager.enable = true; + boot.kernelPackages = pkgs.linuxPackages_latest; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + hardware.graphics.enable = true; + time.timeZone = "Europe/Berlin"; + i18n.defaultLocale = "en_US.UTF-8"; + services.desktopManager.gnome.enable = true; + services.displayManager.gdm.enable = true; + programs.niri = { + enable = true; + }; + services.xserver.xkb.layout = "us"; + services.pipewire = { + enable = true; + pulse.enable = true; + }; + nixpkgs.config.allowUnfree = true; + + users.users.lucy = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + packages = [ + inputs.helium.packages.${pkgs.system}.default + ]; + }; + + environment.systemPackages = with pkgs; [ + fastfetch + wget + git + clang + xournalpp + ]; + programs.xppen = { + enable = true; + package = pkgs.xppen_4.overrideAttrs (old: { + src = pkgs.fetchurl { + url = "https://download01.xp-pen.com/file/2026/04/XPPenLinux4.0.15-260422.tar.gz"; + hash = "sha256-Jady+pbqnzmVMuM0Io4/aE5B7dqNlDKPsnRj/Fbln6U="; + }; + buildInputs = (old.buildInputs or [ ]) ++ [ + pkgs.libXtst + pkgs.libXrandr + ]; + }); + }; + fonts.packages = [ + config.theming.fontPackage + pkgs.noto-fonts + pkgs.noto-fonts-cjk-sans + pkgs.noto-fonts-color-emoji + pkgs.nerd-fonts.symbols-only + ]; + system.stateVersion = "26.05"; + +} diff --git a/modules/hosts/nerv/configuration.nix b/modules/hosts/nerv/configuration.nix index 0f1ded7..b525101 100644 --- a/modules/hosts/nerv/configuration.nix +++ b/modules/hosts/nerv/configuration.nix @@ -2,31 +2,16 @@ config, lib, pkgs, + inputs, ... }: { imports = [ ./hardware-configuration.nix + ../base/configuration.nix ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Use latest kernel. - boot.kernelPackages = pkgs.linuxPackages_latest; - - networking.hostName = "nerv"; # Define your hostname. - networking.networkmanager.enable = true; - - # enable flakes - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; - - # use proprietary nvidia drivers - hardware.graphics.enable = true; + networking.hostName = "nerv"; services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia = { modesetting.enable = true; @@ -36,41 +21,5 @@ package = config.boot.kernelPackages.nvidiaPackages.stable; }; - # Set your time zone. - time.timeZone = "Europe/Berlin"; - - i18n.defaultLocale = "en_US.UTF-8"; - services.desktopManager.gnome.enable = true; - services.displayManager.gdm.enable = true; - programs.niri = { - enable = true; - - }; - services.xserver.xkb.layout = "us"; - services.pipewire = { - enable = true; - pulse.enable = true; - }; - nixpkgs.config.allowUnfree = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.lucy = { - isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - google-chrome - ]; - }; - - environment.systemPackages = with pkgs; [ - fastfetch - wget - git - clang - ]; - fonts.packages = [ - config.theming.fontPackage - ]; - system.stateVersion = "26.05"; # Did you read the comment? - + } diff --git a/modules/hosts/nerv/home.nix b/modules/hosts/nerv/home.nix index 77cc7f0..5b1f5bc 100644 --- a/modules/hosts/nerv/home.nix +++ b/modules/hosts/nerv/home.nix @@ -21,6 +21,16 @@ in package = pkgs.apple-cursor; size = 24; }; + services.syncthing = { + enable = true; + settings = { + devices = { + cyberia = { + id = "OOJBAJU-AAIKLHO-BKMMHBU-2NXE75Z-HE64A6V-LET4ZXB-Q2FT2Y4-GZON3AD"; + }; + }; + }; + }; gtk = { enable = true; colorScheme = "dark"; From bb21575ef7bc1cee6513490be62e5f5c1e32b273 Mon Sep 17 00:00:00 2001 From: lucy Date: Tue, 1 Sep 2026 12:24:56 +0200 Subject: [PATCH 2/3] move home.nix to base --- modules/hosts/base/configuration.nix | 3 ++- modules/hosts/{nerv => base}/home.nix | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename modules/hosts/{nerv => base}/home.nix (100%) diff --git a/modules/hosts/base/configuration.nix b/modules/hosts/base/configuration.nix index 6789cd3..28009c2 100644 --- a/modules/hosts/base/configuration.nix +++ b/modules/hosts/base/configuration.nix @@ -2,6 +2,7 @@ config, inputs, pkgs, + ... }: { boot.loader.systemd-boot.enable = true; @@ -31,7 +32,7 @@ isNormalUser = true; extraGroups = [ "wheel" ]; packages = [ - inputs.helium.packages.${pkgs.system}.default + inputs.helium.packages.${pkgs.stdenv.hostPlatform.system}.default ]; }; diff --git a/modules/hosts/nerv/home.nix b/modules/hosts/base/home.nix similarity index 100% rename from modules/hosts/nerv/home.nix rename to modules/hosts/base/home.nix From 20e6d1c729ec4ea49096979bee3b435678c4b769 Mon Sep 17 00:00:00 2001 From: lucy Date: Tue, 1 Sep 2026 12:30:03 +0200 Subject: [PATCH 3/3] fixup repo --- flake.nix | 4 ++-- modules/hosts/base/configuration.nix | 2 +- modules/hosts/nerv/configuration.nix | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 4e47082..a91d097 100644 --- a/flake.nix +++ b/flake.nix @@ -35,8 +35,8 @@ nixosConfigurations.nerv = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ - # set the theme ./modules/themeing + ./modules/hosts/nerv/configuration.nix home-manager.nixosModules.home-manager { @@ -47,7 +47,7 @@ ./modules/themeing ./modules/programs ]; - home-manager.users.lucy = ./modules/hosts/nerv/home.nix; + home-manager.users.lucy = ./modules/hosts/base/home.nix; } ]; }; diff --git a/modules/hosts/base/configuration.nix b/modules/hosts/base/configuration.nix index 28009c2..ded13b7 100644 --- a/modules/hosts/base/configuration.nix +++ b/modules/hosts/base/configuration.nix @@ -26,8 +26,8 @@ enable = true; pulse.enable = true; }; + nixpkgs.config.allowUnfree = true; - users.users.lucy = { isNormalUser = true; extraGroups = [ "wheel" ]; diff --git a/modules/hosts/nerv/configuration.nix b/modules/hosts/nerv/configuration.nix index b525101..543a5d1 100644 --- a/modules/hosts/nerv/configuration.nix +++ b/modules/hosts/nerv/configuration.nix @@ -15,7 +15,7 @@ services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia = { modesetting.enable = true; - powerManagement.enable = false; + powerManagement.enable = true; open = true; nvidiaSettings = true; package = config.boot.kernelPackages.nvidiaPackages.stable;