diff --git a/flake.nix b/flake.nix index d7fbb47..0b1dbec 100644 --- a/flake.nix +++ b/flake.nix @@ -16,15 +16,20 @@ let lib = nixpkgs.lib; userVars = import ./vars.nix; - in - { - nixosConfigurations = { - nabro = lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit userVars; }; - modules = [ - ./hosts/nabro/configuration.nix + hostsDir = ./hosts; + hostNames = builtins.attrNames ( + lib.filterAttrs (name: type: type == "directory") (builtins.readDir hostsDir) + ); + + nixosConfigurations = lib.genAttrs hostNames (name: + let + hostConfig = import (./hosts + "/${name}"); + in + lib.nixosSystem { + system = hostConfig.system; + specialArgs = { inherit userVars; }; + modules = [ hostConfig.configModule ] ++ [ home-manager.nixosModules.home-manager { home-manager = { @@ -35,7 +40,10 @@ }; } ]; - }; - }; + } + ); + in + { + inherit nixosConfigurations; }; } diff --git a/hosts/nabro/configuration.nix b/hosts/nabro/configuration.nix deleted file mode 100644 index daed822..0000000 --- a/hosts/nabro/configuration.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./hardware-configuration.nix - ../../modules - ]; - - networking.hostName = "nabro"; - - # Enable host-specific feature branches (dendrites) - dotfiles = { - core.enable = true; - user.enable = true; - desktop.enable = true; - dev.enable = true; - shell.enable = true; - }; -} diff --git a/hosts/nabro/default.nix b/hosts/nabro/default.nix new file mode 100644 index 0000000..f99efc5 --- /dev/null +++ b/hosts/nabro/default.nix @@ -0,0 +1,19 @@ +{ + system = "x86_64-linux"; + configModule = { config, lib, pkgs, ... }: { + imports = [ + ./hardware-configuration.nix + ../../modules + ]; + + networking.hostName = "nabro"; + + dotfiles = { + core.enable = true; + user.enable = true; + desktop.enable = true; + dev.enable = true; + shell.enable = true; + }; + }; +} diff --git a/modules/shell.nix b/modules/shell.nix index 9f72b0d..bdbd29b 100644 --- a/modules/shell.nix +++ b/modules/shell.nix @@ -60,9 +60,11 @@ in programs.helix = { enable = true; + defaultEditor = true; settings = { + theme = "ayu_dark"; editor = { - line-numbers = "relative"; + line-number = "relative"; lsp.display-messages = true; }; };