diff --git a/flake.nix b/flake.nix index 84f8de8..7548e66 100644 --- a/flake.nix +++ b/flake.nix @@ -15,19 +15,26 @@ }; }; - outputs = { self, nixpkgs, ... }@inputs: - let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - in - { - - nixosConfigurations.default = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/default/configuration.nix - inputs.home-manager.nixosModules.default - ]; - }; + outputs = inputs@{ self, nixpkgs, home-manager, ... }: { + nixosConfigurations = { + default = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./nixos/configuration.nix + + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = {inherit inputs;}; + home-manager.users.crony = { + imports = [ + ./home-manager/home.nix + ]; + }; + } + ]; + }; }; + }; } diff --git a/hosts/default/home.nix b/home-manager/home.nix similarity index 100% rename from hosts/default/home.nix rename to home-manager/home.nix diff --git a/hosts/default/configuration.nix b/nixos/configuration.nix similarity index 96% rename from hosts/default/configuration.nix rename to nixos/configuration.nix index 5f09266..fc9d802 100644 --- a/hosts/default/configuration.nix +++ b/nixos/configuration.nix @@ -1,11 +1,10 @@ -{ config, pkgs, inputs, ... }: +{ config, pkgs, ... }: { # Imports imports = [ ./hardware-configuration.nix - inputs.home-manager.nixosModules.default ]; # Bootloader. @@ -274,15 +273,6 @@ shell = pkgs.zsh; }; - # Enable home manager for my user - home-manager = { - useGlobalPkgs = true; - extraSpecialArgs = {inherit inputs;}; - users = { - "crony" = import ./home.nix; - }; - }; - # Allow appimages to run manually boot.binfmt.registrations.appimage = { wrapInterpreterInShell = false; diff --git a/hosts/default/hardware-configuration.nix b/nixos/hardware-configuration.nix similarity index 100% rename from hosts/default/hardware-configuration.nix rename to nixos/hardware-configuration.nix