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..a91d097 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; @@ -31,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 { @@ -43,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 new file mode 100644 index 0000000..ded13b7 --- /dev/null +++ b/modules/hosts/base/configuration.nix @@ -0,0 +1,68 @@ +{ + 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.stdenv.hostPlatform.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/home.nix b/modules/hosts/base/home.nix similarity index 92% rename from modules/hosts/nerv/home.nix rename to modules/hosts/base/home.nix index 77cc7f0..5b1f5bc 100644 --- a/modules/hosts/nerv/home.nix +++ b/modules/hosts/base/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"; diff --git a/modules/hosts/nerv/configuration.nix b/modules/hosts/nerv/configuration.nix index 0f1ded7..543a5d1 100644 --- a/modules/hosts/nerv/configuration.nix +++ b/modules/hosts/nerv/configuration.nix @@ -2,75 +2,24 @@ 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; - powerManagement.enable = false; + powerManagement.enable = true; open = true; nvidiaSettings = true; 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? - + }