From 4360fbed688121653e76ffed51393d1664f0969f Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:40:36 +0100 Subject: [PATCH 01/34] feature(flake): simplyfi the flake and add a module system --- flake.nix | 79 ++++++++++++++++++++++--------------------------------- 1 file changed, 32 insertions(+), 47 deletions(-) diff --git a/flake.nix b/flake.nix index 84a902f..abe0e6e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,74 +1,59 @@ { description = "0x29a ecosystem NixOS flake"; - + inputs = { - # the main nix package collection - nixpkgs = { - url = "github:nixos/nixpkgs/nixos-unstable"; - }; - # home manager for dotfiles + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - # noctalia shell noctalia = { url = "github:noctalia-dev/noctalia-shell"; inputs.nixpkgs.follows = "nixpkgs"; }; - # nixvim nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - - outputs = inputs@{self, nixpkgs, home-manager, nixvim, ... }: let - lib = nixpkgs.lib; - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - in { + + outputs = { self, nixpkgs, home-manager, nixvim, ... }@inputs: { nixosConfigurations = { - # default config - default = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { - inherit inputs; - }; - modules = [ - # import host specific configs - ./hosts/default/configuration.nix - # import host specific hardware configs - ./hosts/default/hardware-configuration.nix - ]; - }; - # laptop neon - neon = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { - inherit inputs; - }; + default = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; modules = [ - # import host specific configs - ./hosts/neon/configuration.nix - # import host specific hardware configs - ./hosts/neon/hardware-configuration.nix - # import noctalia shell configs - ./hosts/neon/noctalia.nix - # import home-manager as a module + ./hosts/default/hardware-configuration.nix + ./hosts/default/configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit inputs; }; - # User specific inputs - home-manager.users.aaron = { - imports = [ - nixvim.homeModules.nixvim - ./hosts/neon/home.nix - ]; - }; + home-manager.users.aaron.imports = [ + nixvim.homeModules.nixvim + ./users/aaron/home.nix + ]; + } + ]; + }; + + neon = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/neon/hardware-configuration.nix + ./hosts/neon/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit inputs; }; + home-manager.users.aaron.imports = [ + nixvim.homeModules.nixvim + ./users/aaron/home.nix + ]; } ]; }; From b4c3ddd300f89086ed97115b29b0630b7dad422f Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:44:21 +0100 Subject: [PATCH 02/34] feature(bootloader): add bootloader module with systemd-boot and plymouth --- modules/nixos/bootloader.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 modules/nixos/bootloader.nix diff --git a/modules/nixos/bootloader.nix b/modules/nixos/bootloader.nix new file mode 100644 index 0000000..f77c457 --- /dev/null +++ b/modules/nixos/bootloader.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +{ + # set bootloader to systemd + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + # enable systemd initrd + boot.initrd.systemd.enable = true; + + # plymouth + boot.plymouth = { + enable = true; + theme = "spinner"; + }; + + # kernel options + boot.kernelParams = [ "quiet" "loglevel=2" ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + + # Add boot-related packages + environment.systemPackages = with pkgs; [ + efibootmgr + ]; +} From 64dee7a59fee0ac633bfa6f518c21c4791f718d2 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:44:56 +0100 Subject: [PATCH 03/34] feature(audio): add audio module that handles pipewire --- modules/nixos/audio.nix | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 modules/nixos/audio.nix diff --git a/modules/nixos/audio.nix b/modules/nixos/audio.nix new file mode 100644 index 0000000..99627e2 --- /dev/null +++ b/modules/nixos/audio.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: + +{ + # enable sound through pipewire + services.pipewire = { + enable = true; + pulse.enable = true; + }; +} From 6a9ba7082b6e2beb7dcc513c81b41bfa7c2ffb50 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:45:54 +0100 Subject: [PATCH 04/34] feature(localization): add locales module that handles timezone and locale settings --- modules/nixos/locales.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 modules/nixos/locales.nix diff --git a/modules/nixos/locales.nix b/modules/nixos/locales.nix new file mode 100644 index 0000000..9b0a076 --- /dev/null +++ b/modules/nixos/locales.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +{ + # set the time zone + time.timeZone = "Europe/Zurich"; + + # set internationalisation properties + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; +} From d06ab6d54b37a07dec10468272a07c616801939e Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:46:27 +0100 Subject: [PATCH 05/34] feature(networking): add networking module for firewall and network settings --- modules/nixos/networking.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/nixos/networking.nix diff --git a/modules/nixos/networking.nix b/modules/nixos/networking.nix new file mode 100644 index 0000000..f82d1cb --- /dev/null +++ b/modules/nixos/networking.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +{ + # set hostnname + networking.hostName = "neon"; + + # user networkmanager + networking.networkmanager.enable = true; + + # firewall default configs + networking.firewall.allowedTCPPorts = [ ]; + networking.firewall.allowedUDPPorts = [ ]; + + # enable bluetooth + hardware.bluetooth.enable = true; + + # Add network-related packages + environment.systemPackages = with pkgs; [ + wireguard-tools + ]; +} From 3c18029b951e1fd3188c84773bbd052e0d6c8a44 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:47:12 +0100 Subject: [PATCH 06/34] feature(openssh): add modules for openssh and openpgp --- modules/nixos/gnupg.nix | 9 +++++++++ modules/nixos/openssh.nix | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 modules/nixos/gnupg.nix create mode 100644 modules/nixos/openssh.nix diff --git a/modules/nixos/gnupg.nix b/modules/nixos/gnupg.nix new file mode 100644 index 0000000..5770783 --- /dev/null +++ b/modules/nixos/gnupg.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: + +{ + # enable gnupg agent + services.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; +} diff --git a/modules/nixos/openssh.nix b/modules/nixos/openssh.nix new file mode 100644 index 0000000..d6cf556 --- /dev/null +++ b/modules/nixos/openssh.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: + +{ + # enable the openssh daemon + services.openssh = { + enable = true; + openFirewall = true; + }; +} From a045ca7d94770dcbf978323bb265c5f7a9f4d46f Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:47:40 +0100 Subject: [PATCH 07/34] feature(sddm): add sddm module for theming and session management --- modules/nixos/sddm.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 modules/nixos/sddm.nix diff --git a/modules/nixos/sddm.nix b/modules/nixos/sddm.nix new file mode 100644 index 0000000..8ca7b7f --- /dev/null +++ b/modules/nixos/sddm.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +{ + # enable sddm and use astronaut theme + services.displayManager.sddm = { + enable = true; + wayland.enable = true; + autoNumlock = true; + enableHidpi = true; + theme = "sddm-astronaut-theme"; + settings = { + Theme = { + Current = "sddm-astronaut-theme"; + }; + }; + extraPackages = with pkgs; [ + sddm-astronaut + ]; + }; +} From 9cde74486a47dc39230eb8e0e950bcc631ffc6fe Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:48:11 +0100 Subject: [PATCH 08/34] feature(serivces): add services module that handles various enabled services --- modules/nixos/services.nix | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 modules/nixos/services.nix diff --git a/modules/nixos/services.nix b/modules/nixos/services.nix new file mode 100644 index 0000000..545072b --- /dev/null +++ b/modules/nixos/services.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, ... }: + +{ + services = { + tuned.enable = true; + upower.enable = true; + }; +} From 7f57f89a7762d50d2a3ffc5aee28d48bf9923e4e Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:48:43 +0100 Subject: [PATCH 09/34] feature(steam): add steam module for all things around steam on wayland --- modules/nixos/steam.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 modules/nixos/steam.nix diff --git a/modules/nixos/steam.nix b/modules/nixos/steam.nix new file mode 100644 index 0000000..afb49e2 --- /dev/null +++ b/modules/nixos/steam.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +{ + # allow unfree to install steam + nixpkgs.config.allowUnfree = true; + + # enable steam and open firewall + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + }; + + # fix black screen in steam when using xwayland-satellite + programs.steam.package = pkgs.steam.override { + extraArgs = "-system-composer"; + }; +} From 2cdd02b0240f4877fd693fcd91c1ad7445344e0a Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:49:10 +0100 Subject: [PATCH 10/34] feature(users): add module that handles users and their shell --- modules/nixos/users.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 modules/nixos/users.nix diff --git a/modules/nixos/users.nix b/modules/nixos/users.nix new file mode 100644 index 0000000..ea8630d --- /dev/null +++ b/modules/nixos/users.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +{ + # create users + users.users.aaron = { + isNormalUser = true; + group = "users"; + extraGroups = [ "wheel" "networkmanager" ]; + shell = pkgs.zsh; + }; + + # add default zsh config + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestions.enable = true; + ohMyZsh = { + enable = true; + plugins = [ "git" "sudo" ]; + theme = "gentoo"; + }; + }; +} From 6d437c290f674935925ff4c1db3a87cdd2290281 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 18:53:31 +0100 Subject: [PATCH 11/34] feature(locales): add keymap and console font to locales module --- modules/nixos/locales.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/nixos/locales.nix b/modules/nixos/locales.nix index 9b0a076..5c91d2d 100644 --- a/modules/nixos/locales.nix +++ b/modules/nixos/locales.nix @@ -17,4 +17,10 @@ LC_TELEPHONE = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8"; }; + + # set console font and keymap + console = { + font = "Lat2-Terminus16"; + keyMap = "de_CH-latin1"; + }; } From 31c4834a2d8d05963aab6f2a8fadd1c6a9d4556e Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 19:21:16 +0100 Subject: [PATCH 12/34] feature(niri): add module for niri wayland compositor --- modules/nixos/compositor.nix | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 modules/nixos/compositor.nix diff --git a/modules/nixos/compositor.nix b/modules/nixos/compositor.nix new file mode 100644 index 0000000..1098419 --- /dev/null +++ b/modules/nixos/compositor.nix @@ -0,0 +1,6 @@ +{ config, lib, pkgs, ... }: + +{ + # just enable and install niri + programs.niri.enable = true; +} From edd73ddf534484843aa9d364fca2eb4507e05ded Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 19:25:37 +0100 Subject: [PATCH 13/34] refactor(configuration): remove everything unnecessary from configuration.nix --- hosts/neon/configuration.nix | 209 +++-------------------------------- 1 file changed, 16 insertions(+), 193 deletions(-) diff --git a/hosts/neon/configuration.nix b/hosts/neon/configuration.nix index e354be7..258f8fd 100644 --- a/hosts/neon/configuration.nix +++ b/hosts/neon/configuration.nix @@ -1,200 +1,23 @@ -{ pkgs, lib, inputs, ... }: +{ config, pkgs, inputs, ... }: { - imports = - [ - ./hardware-configuration.nix - ]; - - # use flakes - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - # configure bootloader - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # plymouth boot eye candy - boot.initrd.systemd.enable = true; - boot.kernelParams = [ "quiet" "loglevel=2" ]; - boot.plymouth.enable = true; - boot.plymouth.theme = "spinner"; - - # use latest kernel - boot.kernelPackages = pkgs.linuxPackages_latest; - - # networking - networking.hostName = "neon"; - networking.networkmanager.enable = true; - - # bluetooth - hardware.bluetooth.enable = true; - - # time zone. - time.timeZone = "Europe/Amsterdam"; - - # select internationalisation properties - i18n.defaultLocale = "en_US.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - console = { - font = "Lat2-Terminus16"; - keyMap = "de_CH-latin1"; - }; - - # set up niri as window manager - programs.niri.enable = true; - # set up sddm ad display manager - services.displayManager.sddm = { - enable = true; - wayland = { - enable = true; - }; - autoNumlock = true; - enableHidpi = true; - theme = "sddm-astronaut-theme"; - settings = { - Theme = { - Current = "sddm-astronaut-theme"; - }; - }; - extraPackages = with pkgs; [ - sddm-astronaut - ]; - }; - - services.tuned.enable = true; - services.upower.enable = true; - - environment.pathsToLink = [ "/libexec" ]; - environment.variables.EDITOR = "vim"; - - # enable sound - services.pipewire = { - enable = true; - pulse.enable = true; - }; - - # define a user account - users.users.aaron = { - isNormalUser = true; - group = "users"; - extraGroups = [ "wheel" ]; - shell = pkgs.zsh; - }; - - # browser - programs.firefox.enable = true; - - # zsh config - programs.zsh = { - enable = true; - enableCompletion = true; - autosuggestions.enable = true; - ohMyZsh = { - enable = true; - plugins = [ "git" "sudo" ]; - theme = "gentoo"; - }; - }; - - # system packages - environment.systemPackages = with pkgs; [ - alacritty - btop - cowsay - dnsutils - efibootmgr - ethtool - file - ghostty - git - gnupg - iftop - imagemagick - imv - iotop - iperf3 - jq - kdePackages.qtmultimedia - kitty - ldns - lm_sensors - lsof - ltrace - mtr - neovim - nh - nix-output-monitor - nmap - nvd - p7zip - pciutils - sddm-astronaut - socat - strace - sysstat - tree - unzip - usbutils - vim - wget - which - xwayland-satellite - xz - zip - zstd + imports = [ + ../../modules/nixos/bootloader.nix + ../../modules/nixos/audio.nix + ../../modules/nixos/compositor.nix + ../../modules/nixos/gnupg.nix + ../../modules/nixos/locales.nix + ../../modules/nixos/networking.nix + ../../modules/nixos/noctalia.nix + ../../modules/nixos/openssh.nix + ../../modules/nixos/packages.nix + ../../modules/nixos/sddm.nix + ../../modules/nixos/services.nix + ../../modules/nixos/settings.nix + ../../modules/nixos/steam.nix + ../../modules/nixos/users.nix ]; - # Some programs need SUID wrappers - programs.mtr.enable = true; - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - - # enable steam on this machine - nixpkgs.config.allowUnfree = true; - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - }; - - # fix black screen in steam on xwayland-satellite - programs.steam.package = pkgs.steam.override { - extraArgs = "-system-composer"; - }; - - # enable the OpenSSH daemon - services.openssh = { - enable = true; - openFirewall = true; - }; - - # firewall configs - networking.firewall.allowedTCPPorts = [ ]; - networking.firewall.allowedUDPPorts = [ ]; - - # enable home-manager globally - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.backupFileExtension = "backup"; - - # add flake env variable for nh - environment.sessionVariables = { - NH_FLAKE = "/home/aaron/git/nixconfig"; - }; - # install state version system.stateVersion = "25.11"; # Don't change } From 01f6137eed1b6b9e21b989283ca4576d238da68c Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 19:26:13 +0100 Subject: [PATCH 14/34] refactor(noctalia): move noctalia configs to modules --- {hosts/neon => modules/nixos}/noctalia.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) rename {hosts/neon => modules/nixos}/noctalia.nix (80%) diff --git a/hosts/neon/noctalia.nix b/modules/nixos/noctalia.nix similarity index 80% rename from hosts/neon/noctalia.nix rename to modules/nixos/noctalia.nix index 82c2382..f280cd8 100644 --- a/hosts/neon/noctalia.nix +++ b/modules/nixos/noctalia.nix @@ -1,10 +1,8 @@ -{ pkgs, inputs, ... }: +{ config, lib, pkgs, inputs, ... }: { # install noctalia and helper packages environment.systemPackages = with pkgs; [ inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default - #kdePackages.qt6ct - #nwg-look adw-gtk3 adwaita-qt adwaita-qt6 From 520eadd6fb32eec2265e45e0c0737c36bc3a7a5f Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 19:26:44 +0100 Subject: [PATCH 15/34] feature(compositor): add a module for the wayland compositor --- modules/nixos/compositor.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nixos/compositor.nix b/modules/nixos/compositor.nix index 1098419..844c002 100644 --- a/modules/nixos/compositor.nix +++ b/modules/nixos/compositor.nix @@ -3,4 +3,9 @@ { # just enable and install niri programs.niri.enable = true; + + # Add compositor-related packages + environment.systemPackages = with pkgs; [ + xwayland-satellite + ]; } From f3678a13c594ef46b7c1ddd4981d9b80fb1ca003 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 19:27:14 +0100 Subject: [PATCH 16/34] feature(services): add services to module files --- modules/nixos/services.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nixos/services.nix b/modules/nixos/services.nix index 545072b..8933225 100644 --- a/modules/nixos/services.nix +++ b/modules/nixos/services.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: { + # list of enabled services on the system services = { tuned.enable = true; upower.enable = true; From c125409336f5d5bc47de1b5b11d0db46e75084d2 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 19:27:47 +0100 Subject: [PATCH 17/34] refactor(home): move home settings to user namespace --- {hosts/neon => user/aaron}/home.nix | 5 +++++ 1 file changed, 5 insertions(+) rename {hosts/neon => user/aaron}/home.nix (97%) diff --git a/hosts/neon/home.nix b/user/aaron/home.nix similarity index 97% rename from hosts/neon/home.nix rename to user/aaron/home.nix index 802fb2f..f542003 100644 --- a/hosts/neon/home.nix +++ b/user/aaron/home.nix @@ -142,6 +142,11 @@ EDITOR = "vim"; }; + # add flake env variable for nh + environment.sessionVariables = { + NH_FLAKE = "/home/aaron/git/nixconfig"; + }; + # enable syncthing for user services.syncthing.enable = true; # enable home manager From 3a95182d3ab2d6c864eb22e57ad5b3292aef5673 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 19:28:10 +0100 Subject: [PATCH 18/34] feature(settings): add settings module --- modules/nixos/settings.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 modules/nixos/settings.nix diff --git a/modules/nixos/settings.nix b/modules/nixos/settings.nix new file mode 100644 index 0000000..732b060 --- /dev/null +++ b/modules/nixos/settings.nix @@ -0,0 +1,16 @@ +{ config, lib, pkgs, ... }: + +{ + # use flakes and nix command + nix.settings.experimental-feature = [ "nix-command" "flakes" ]; + + # links /libexec from derivations to /run/current-system/sw + environment.pathsToLink = [ "/libexec" ]; + # set the default editor to vim + environment.variables.EDITOR = "vim"; + + # enable home-manager globally + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.backupFileExtension = "backup"; +} From 0fccd2d54bcdd07491451a8139812a5174c6a156 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 19:28:28 +0100 Subject: [PATCH 19/34] feature(packages): add system packages module --- modules/nixos/packages.nix | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 modules/nixos/packages.nix diff --git a/modules/nixos/packages.nix b/modules/nixos/packages.nix new file mode 100644 index 0000000..bb5f2d0 --- /dev/null +++ b/modules/nixos/packages.nix @@ -0,0 +1,50 @@ +{ config, lib, pkgs, ... }: + +{ + # system packges + environment.systemPackages = with pkgs; [ + alacritty + btop + cowsay + dnsutils + ethtool + file + ghostty + git + gnupg + imagemagick + imv + iperf3 + jq + kdePackages.qtmultimedia + kitty + ldns + lm_sensors + lsof + ltrace + mtr + neovim + nh + nix-output-monitor + nmap + nvd + p7zip + pciutils + sddm-astronaut + socat + strace + sysstat + tree + unzip + usbutils + vim + wget + which + xz + zip + zstd + ]; + + # browser + programs.firefox.enable = true; +} From 0509b11c00624661c5780c8b8340e54f21156b77 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 19:58:22 +0100 Subject: [PATCH 20/34] fix(gnupg): fix typo and add pinentry-ncurses --- modules/nixos/gnupg.nix | 8 +++++++- modules/nixos/packages.nix | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/nixos/gnupg.nix b/modules/nixos/gnupg.nix index 5770783..1e1f380 100644 --- a/modules/nixos/gnupg.nix +++ b/modules/nixos/gnupg.nix @@ -2,8 +2,14 @@ { # enable gnupg agent - services.gnupg.agent = { + programs.gnupg.agent = { enable = true; enableSSHSupport = true; + pinentryPackage = pkgs.pinentry-curses; }; + + environment.systemPackages = with pkgs; [ + gnupg + pinentry-curses + ]; } diff --git a/modules/nixos/packages.nix b/modules/nixos/packages.nix index bb5f2d0..cb7a0cf 100644 --- a/modules/nixos/packages.nix +++ b/modules/nixos/packages.nix @@ -11,7 +11,6 @@ file ghostty git - gnupg imagemagick imv iperf3 From a535f00e548d37d3329837283c34686625fabf09 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 20:15:13 +0100 Subject: [PATCH 21/34] fix(home): fix folder naming --- {user => users}/aaron/home.nix | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {user => users}/aaron/home.nix (100%) diff --git a/user/aaron/home.nix b/users/aaron/home.nix similarity index 100% rename from user/aaron/home.nix rename to users/aaron/home.nix From d913c6cc02459aef503968649945d409719f5c47 Mon Sep 17 00:00:00 2001 From: aaron Date: Sun, 28 Dec 2025 20:19:37 +0100 Subject: [PATCH 22/34] fix(home): set correct namespace for environment variable --- modules/nixos/settings.nix | 2 +- users/aaron/home.nix | 19 +++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/modules/nixos/settings.nix b/modules/nixos/settings.nix index 732b060..b7b6102 100644 --- a/modules/nixos/settings.nix +++ b/modules/nixos/settings.nix @@ -2,7 +2,7 @@ { # use flakes and nix command - nix.settings.experimental-feature = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; # links /libexec from derivations to /run/current-system/sw environment.pathsToLink = [ "/libexec" ]; diff --git a/users/aaron/home.nix b/users/aaron/home.nix index f542003..f81df79 100644 --- a/users/aaron/home.nix +++ b/users/aaron/home.nix @@ -4,6 +4,13 @@ # user config home.username = "aaron"; home.homeDirectory = "/home/aaron"; + # set env vars + home.sessionVariables = { + EDITOR = "vim"; + NH_FLAKE = "/home/aaron/git/nixconfig"; + }; + # don't change + home.stateVersion = "25.11"; # nixvim config programs.nixvim = { @@ -137,20 +144,8 @@ }; }; - # set env vars - home.sessionVariables = { - EDITOR = "vim"; - }; - - # add flake env variable for nh - environment.sessionVariables = { - NH_FLAKE = "/home/aaron/git/nixconfig"; - }; - # enable syncthing for user services.syncthing.enable = true; # enable home manager programs.home-manager.enable = true; - # don't change - home.stateVersion = "25.11"; } From 656dfe4b937adb1c3701d2a9e6f81f9b9365f8f0 Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 14:18:14 +0100 Subject: [PATCH 23/34] feature(git): add git home-manager module --- modules/home-manager/git.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 modules/home-manager/git.nix diff --git a/modules/home-manager/git.nix b/modules/home-manager/git.nix new file mode 100644 index 0000000..db23f88 --- /dev/null +++ b/modules/home-manager/git.nix @@ -0,0 +1,18 @@ +{ config, pkgs, inputs, ... }: + +{ + programs.git = { + enable = true; + settings = { + push = { autoSetupRemote = true; }; + user = { + name = "aaron"; + email = "aaron@0x29a.ch"; + }; + }; + signing = { + key = "7A830180A05DAC59CDE43B0677D2F5DB48184456"; + signByDefault = true; + }; + }; +} From 1f7e9f6eef8f324013615b982b4adb7a81b9cc33 Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 14:18:43 +0100 Subject: [PATCH 24/34] feature(nixvim): add nixvim home-manager module --- modules/home-manager/nixvim.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 modules/home-manager/nixvim.nix diff --git a/modules/home-manager/nixvim.nix b/modules/home-manager/nixvim.nix new file mode 100644 index 0000000..0d4007d --- /dev/null +++ b/modules/home-manager/nixvim.nix @@ -0,0 +1,26 @@ +{ config, pkgs, inputs, ... }: + +{ + programs.nixvim = { + globals.mapleader = " "; + enable = true; + viAlias = false; + vimAlias = true; + opts = { + number = true; + relativenumber = true; + shiftwidth = 2; + tabstop = 2; + expandtab = true; + incsearch = true; + }; + colorschemes.nord.enable = true; + plugins.lualine.enable = true; + plugins.nix.enable = true; + plugins.nvim-tree.enable = true; + plugins.treesitter.enable = true; + plugins.telescope.enable = true; + plugins.web-devicons.enable = true; + plugins.indent-blankline.enable = true; + }; +} From c419f052a3979ff1db5d808601f75659d8810ddd Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 14:19:05 +0100 Subject: [PATCH 25/34] feature(shell): add zsh home-manager module --- modules/home-manager/shell.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 modules/home-manager/shell.nix diff --git a/modules/home-manager/shell.nix b/modules/home-manager/shell.nix new file mode 100644 index 0000000..4ca04ec --- /dev/null +++ b/modules/home-manager/shell.nix @@ -0,0 +1,20 @@ +{ config, pkgs, inputs, ... }: + +{ + programs.zsh = { + enable = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + oh-my-zsh = { + enable = true; + theme = "agnoster"; + #plugins = [ "git" "ssh-agent" ]; + }; + }; + + # set important env vars + home.sessionVariables = { + EDITOR = "vim"; + NH_FLAKE = "/home/aaron/git/nixconfig"; + }; +} From d0eb6f614d66832805dd19e868d4f19842a5773c Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 14:19:24 +0100 Subject: [PATCH 26/34] feature(tmux): add tmux home-manager module --- modules/home-manager/tmux.nix | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 modules/home-manager/tmux.nix diff --git a/modules/home-manager/tmux.nix b/modules/home-manager/tmux.nix new file mode 100644 index 0000000..723bb6d --- /dev/null +++ b/modules/home-manager/tmux.nix @@ -0,0 +1,56 @@ +{ config, pkgs, inputs, ... }: + +{ + programs.tmux = { + enable = true; + prefix = "C-a"; + keyMode = "vi"; + mouse = true; + terminal = "screen-256color"; + extraConfig = '' + # Status keys + set -g status-keys vi + # Status bar options + set -g status-interval 1 + set -g status on + set -g status-justify left + # Clock mode + setw -g clock-mode-colour cyan + # Colors + set -g status-bg black + set -g status-fg white + # Key bindings + # Reload configuration + bind r source-file ~/.config/tmux/tmux.conf + # Panel split and selection + unbind % + unbind '"' + bind v split-window -v + bind c split-window -h + bind i new-window + bind b previous-window + bind n next-window + # Move around panes with hjkl + bind h select-pane -L + bind j select-pane -D + bind k select-pane -U + bind l select-pane -R + # Resize panes + bind H resize-pane -L 5 + bind J resize-pane -D 5 + bind K resize-pane -U 5 + bind L resize-pane -R 5 + # Kill commands + bind q kill-window + bind Q kill-session + # Bars + set -g status-left "#[fg=black,bg=blue,bold] #S#[fg=blue,bg=black,nobold,noitalics,nounderscore]" + set -g status-left "#[fg=black,bg=blue,bold] #S #[fg=blue,bg=black,nobold,noitalics,nounderscore]" + set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H " + # Windows + set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]" + set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]" + set -g window-status-separator "" + ''; + }; +} From 724db8a25227b15a09a8d76ab83e4b66d522acb8 Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 14:19:55 +0100 Subject: [PATCH 27/34] feature(style): move qt and gtk settings to their own hm-module --- modules/home-manager/styling.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modules/home-manager/styling.nix diff --git a/modules/home-manager/styling.nix b/modules/home-manager/styling.nix new file mode 100644 index 0000000..4452328 --- /dev/null +++ b/modules/home-manager/styling.nix @@ -0,0 +1,30 @@ +{ config, pkgs, inputs, ... }: + +{ + # set gtk theme + gtk = { + enable = true; + theme = { + name = "Adwaita-dark"; + package = pkgs.gnome-themes-extra; + }; + gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; + gtk4.extraConfig.gtk-application-prefer-dark-theme = 1; + }; + + # set qt theme + qt = { + enable = true; + platformTheme.name = "qt6"; + style = { + name = "adwaita-dark"; + package = pkgs.adwaita-qt; + }; + }; + + # ensure packages are installed + home.packages = with pkgs; [ + gnome-themes-extra + adwaita-qt + ] +} From 894c113607949cc55789406e67d96768be00c6f9 Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 14:20:24 +0100 Subject: [PATCH 28/34] feature(programs): add a hm-module to specify user programs --- modules/home-manager/programs.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 modules/home-manager/programs.nix diff --git a/modules/home-manager/programs.nix b/modules/home-manager/programs.nix new file mode 100644 index 0000000..c592d55 --- /dev/null +++ b/modules/home-manager/programs.nix @@ -0,0 +1,18 @@ +{ config, pkgs, inputs, ... }: + +{ + # user packages + home.packages = with pkgs; [ + discord + fastfetch + keepassxc + nerd-fonts.sauce-code-pro + powerline-fonts + powerline-symbols + screenfetch + ]; + + # services and other software + services.syncthing.enable = true; + programs.home-manager.enable = true; +} From 55bb23cf0702df53524945a016da1bcec2cdd4f2 Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 14:20:59 +0100 Subject: [PATCH 29/34] feature(home): cleanup home-manager imports --- users/aaron/home.nix | 157 ++++--------------------------------------- 1 file changed, 12 insertions(+), 145 deletions(-) diff --git a/users/aaron/home.nix b/users/aaron/home.nix index f81df79..0ea8dde 100644 --- a/users/aaron/home.nix +++ b/users/aaron/home.nix @@ -1,151 +1,18 @@ -{ config, pkgs, inputs, ... }: +{ config, pkgs, ... }: { - # user config - home.username = "aaron"; - home.homeDirectory = "/home/aaron"; - # set env vars - home.sessionVariables = { - EDITOR = "vim"; - NH_FLAKE = "/home/aaron/git/nixconfig"; - }; - # don't change - home.stateVersion = "25.11"; - - # nixvim config - programs.nixvim = { - globals.mapleader = " "; - enable = true; - viAlias = false; - vimAlias = true; - opts = { - number = true; - relativenumber = true; - shiftwidth = 2; - tabstop = 2; - expandtab = true; - incsearch = true; - }; - colorschemes.nord.enable = true; - plugins.lualine.enable = true; - plugins.nix.enable = true; - plugins.nvim-tree.enable = true; - plugins.treesitter.enable = true; - plugins.telescope.enable = true; - plugins.web-devicons.enable = true; - plugins.indent-blankline.enable = true; - }; - - # tmux config - programs.tmux = { - enable = true; - # Basic options - prefix = "C-a"; - keyMode = "vi"; - mouse = true; - # Terminal settings - terminal = "screen-256color"; - # Extra configuration - extraConfig = '' - # Status keys - set -g status-keys vi - # Status bar options - set -g status-interval 1 - set -g status on - set -g status-justify left - # Clock mode - setw -g clock-mode-colour cyan - # Colors - set -g status-bg black - set -g status-fg white - # Key bindings - # Reload configuration - bind r source-file ~/.config/tmux/tmux.conf - # Panel split and selection - unbind % - unbind '"' - bind v split-window -v - bind c split-window -h - bind i new-window - bind b previous-window - bind n next-window - # Move around panes with hjkl - bind h select-pane -L - bind j select-pane -D - bind k select-pane -U - bind l select-pane -R - # Resize panes - bind H resize-pane -L 5 - bind J resize-pane -D 5 - bind K resize-pane -U 5 - bind L resize-pane -R 5 - # Kill commands - bind q kill-window - bind Q kill-session - # Bars - set -g status-left "#[fg=black,bg=blue,bold] #S#[fg=blue,bg=black,nobold,noitalics,nounderscore]" - set -g status-left "#[fg=black,bg=blue,bold] #S #[fg=blue,bg=black,nobold,noitalics,nounderscore]" - set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H " - # Windows - set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]" - set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]" - set -g window-status-separator "" - ''; - }; - - # user packages - home.packages = with pkgs; [ - discord - fastfetch - keepassxc - nerd-fonts.sauce-code-pro - powerline-fonts - powerline-symbols - screenfetch + imports = [ + ../../modules/home-manager/git.nix + ../../modules/home-manager/nvim.nix + ../../modules/home-manager/programs.nix + ../../modules/home-manager/shell.nix + ../../modules/home-manager/styling.nix + ../../modules/home-manager/tmux.nix ]; - - # configure git - programs.git.settings = { - enable = true; - userName = "aaron"; - userEmail = "aaron@0x29a.ch"; - }; - # configure zsh theme - programs.zsh = { - enable = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - oh-my-zsh = { - enable = true; - theme = "agnoster"; - #plugins = [ "git" "ssh-agent" ]; - }; + home = { + username = "aaron"; + homeDirectory = "/home/aaron"; + stateVersion = "25.11"; }; - - # set gtk theme - gtk = { - enable = true; - theme = { - name = "Adwaita-dark"; - package = pkgs.gnome-themes-extra; - }; - gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; - gtk4.extraConfig.gtk-application-prefer-dark-theme = 1; - }; - - # set qt theme - qt = { - enable = true; - platformTheme.name = "qt6"; - style = { - name = "adwaita-dark"; - package = pkgs.adwaita-qt; - }; - }; - - # enable syncthing for user - services.syncthing.enable = true; - # enable home manager - programs.home-manager.enable = true; } From 989f676ce780718941af56887e9e45f0c2849615 Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 14:26:12 +0100 Subject: [PATCH 30/34] refactor: cleanup old configuration --- hosts/neon/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/neon/configuration.nix b/hosts/neon/configuration.nix index 258f8fd..eb174de 100644 --- a/hosts/neon/configuration.nix +++ b/hosts/neon/configuration.nix @@ -2,8 +2,8 @@ { imports = [ - ../../modules/nixos/bootloader.nix ../../modules/nixos/audio.nix + ../../modules/nixos/bootloader.nix ../../modules/nixos/compositor.nix ../../modules/nixos/gnupg.nix ../../modules/nixos/locales.nix From 859d524f4a187f5ac4586c1e571dd0d9af6753a6 Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 14:26:40 +0100 Subject: [PATCH 31/34] fix(styling): fix syntax error --- modules/home-manager/styling.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home-manager/styling.nix b/modules/home-manager/styling.nix index 4452328..0c12744 100644 --- a/modules/home-manager/styling.nix +++ b/modules/home-manager/styling.nix @@ -26,5 +26,5 @@ home.packages = with pkgs; [ gnome-themes-extra adwaita-qt - ] + ]; } From 8fa948b0be85bd3935ad7e6d7c20006d0fe40c12 Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 14:27:17 +0100 Subject: [PATCH 32/34] fix(home): set correct name for nixvim config --- users/aaron/home.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/aaron/home.nix b/users/aaron/home.nix index 0ea8dde..50bcb09 100644 --- a/users/aaron/home.nix +++ b/users/aaron/home.nix @@ -3,7 +3,7 @@ { imports = [ ../../modules/home-manager/git.nix - ../../modules/home-manager/nvim.nix + ../../modules/home-manager/nixvim.nix ../../modules/home-manager/programs.nix ../../modules/home-manager/shell.nix ../../modules/home-manager/styling.nix From b87d88125898acf2f373db4151010610377ff9b7 Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 18:49:25 +0100 Subject: [PATCH 33/34] feature(flake): update flake file and update all packages --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 964f485..306b33a 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ ] }, "locked": { - "lastModified": 1766282146, - "narHash": "sha256-0V/nKU93KdYGi+5LB/MVo355obBJw/2z9b2xS3bPJxY=", + "lastModified": 1767048910, + "narHash": "sha256-KLFTeA/xquN+F3XHLAXcserk0L0nijbhzuldxNDF1eE=", "owner": "nix-community", "repo": "home-manager", - "rev": "61fcc9de76b88e55578eb5d79fc80f2b236df707", + "rev": "d99b4ca5debaa082c7d76015aa2b7f3fc7e8b5f7", "type": "github" }, "original": { @@ -43,11 +43,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1766070988, - "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", + "lastModified": 1766902085, + "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c6245e83d836d0433170a16eb185cefe0572f8b8", + "rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4", "type": "github" }, "original": { @@ -66,11 +66,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1766273987, - "narHash": "sha256-Y8hL2zGyt7xn5J1V806GJ9tMEk6NgVlU7xe4dS4fThE=", + "lastModified": 1767002962, + "narHash": "sha256-HGFRwMRUwt56E+SiVX9YQOzpOwHy0/rtEqMoEbkF8Yg=", "owner": "nix-community", "repo": "nixvim", - "rev": "ff00fe1512dfcb31b01d770738de9299b434449b", + "rev": "63c957603751f0a107c4d9c2cbaff1c8749fc9f1", "type": "github" }, "original": { @@ -86,11 +86,11 @@ ] }, "locked": { - "lastModified": 1766317205, - "narHash": "sha256-PYlMsenwZCG5TrxQSyTraPw8WQwk4FGnbyFdFMuAeYA=", + "lastModified": 1767099893, + "narHash": "sha256-Z39jG7z4XD+H2KPSgWR0rQS3di1mTblRI5kyqcL3g7w=", "owner": "noctalia-dev", "repo": "noctalia-shell", - "rev": "51aa9fe16b0cc0dc4daa7c447843b36923434f2e", + "rev": "015ff66fbd85abda4573d864466ecf9fc64f233b", "type": "github" }, "original": { From 2e1c2524fc80ca6b3adda598db412077862416d1 Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Dec 2025 18:50:30 +0100 Subject: [PATCH 34/34] refactor(readme): update the readme with a nix-helper section. --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44499a1..db6c1a6 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # 0x29a nixos config -My personal nixos configuration files. +My personal nixos configuration files for different environments. ## basic system installation -- The installations in this repository are always luks encrypted +- The installations presented in this repository are always luks encrypted - For simplicity I'm using device labels rather than uuids 1. the partitioning layout should look somewhat like this after the installation @@ -111,8 +111,24 @@ $ sudo nixos-rebuild --install-bootloader switch --flake .#host_name $ cd /path/to/repo $ sudo nix flake update $ sudo nixos-rebuild switch --flake .#host_name +$ sudo nix-collect-garbage ``` +## how to use nix-helper + +The tool nix-helper is installed by this configuration. It simplifies administrating nixos and adds more output to the rebuild command. It also features a diff after a successful build. The command uses the `NH_FLAKE` environment variable to be able to run from whatever directory. + +Basic commands with a set `NH_FLAKE` variable are: + +```bash +$ nh os switch +$ nh os build +$ nh os test +$ nh clean all --keep 5 +``` + +There is also the option to interface with home-manager by using `nh home switch`but this isn't necessary since home-manager is imported as a module in this config. + ## author aaron