diff --git a/Droidnix/flake.nix b/Droidnix/flake.nix index 07b213daf..815b1d54a 100644 --- a/Droidnix/flake.nix +++ b/Droidnix/flake.nix @@ -23,71 +23,75 @@ hyprland.url = "github:hyprwm/Hyprland"; }; -outputs = - inputs@{ - self, - nixpkgs, - home-manager, - emacs-overlay, - catppuccin, - zen-browser, - hyprland, - ... - }: - let - lib = nixpkgs.lib; - system = "x86_64-linux"; - user = import ./assets/flake/users/henrov.nix; - machines = [ - "traveldroid" - "maindroid" - ]; - flakeRoot = ./.; # Define flakeRoot here - in - { - nixosConfigurations = lib.genAttrs machines ( - machine: - lib.nixosSystem { - inherit system; - modules = [ + outputs = + inputs@{ + self, + nixpkgs, + home-manager, + emacs-overlay, + catppuccin, + zen-browser, + hyprland, + ... + }: + let + lib = nixpkgs.lib; + system = "x86_64-linux"; + user = import ./assets/flake/users/henrov.nix; + machines = [ + "traveldroid" + "maindroid" + ]; + flakeRoot = ./.; # Define flakeRoot here + in + { + nixosConfigurations = lib.genAttrs machines ( + machine: + lib.nixosSystem { + inherit system; + modules = [ + ( + { config, pkgs, ... }: + { + nixpkgs.overlays = [ + inputs.nerdfonts.overlays.default + ]; + } + ) - nixpkgs.overlays = [ - inputs.nerdfonts.overlays.default + # Import machine-specific configurations + ./assets/flake/machines/traveldroid/top.nix + + # Catppuccin theme module + inputs.catppuccin.nixosModules.catppuccin + + # Anchoring all the other nixes + ./generated/top.nix + + # Home Manager module + inputs.home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit user inputs flakeRoot; }; + } ]; + specialArgs = { inherit user inputs flakeRoot; }; + } + ); - # Import machine-specific configurations - ./assets/flake/machines/traveldroid/top.nix + homeConfigurations = lib.genAttrs (map (machine: "${user.username}@${machine}") machines) ( + userMachine: + home-manager.lib.homeManagerConfiguration { + inherit system; + configuration = import ./user.nix { inherit inputs user flakeRoot; }; + extraSpecialArgs = { inherit user inputs flakeRoot; }; + } + ); - # Catppuccin theme module - inputs.catppuccin.nixosModules.catppuccin - - # Anchoring all the other nixes - ./generated/top.nix - - # Home Manager module - inputs.home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit user inputs flakeRoot; }; - } - ]; - specialArgs = { inherit user inputs flakeRoot; }; - } - ); - - homeConfigurations = lib.genAttrs (map (machine: "${user.username}@${machine}") machines) ( - userMachine: - home-manager.lib.homeManagerConfiguration { - inherit system; - configuration = import ./user.nix { inherit inputs user flakeRoot; }; - extraSpecialArgs = { inherit user inputs flakeRoot; }; - } - ); - - devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix { - inherit (nixpkgs.legacyPackages.${system}) mkShell; + devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix { + inherit (nixpkgs.legacyPackages.${system}) mkShell; + }; }; - }; }