{ description = "Mr Hedgehog's Nix config with flakes"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixos.url = "github:nixos/nixpkgs/nixos-unstable"; nixos-hardware.url = "github:nixos/nixos-hardware"; agenix.url = "github:ryantm/agenix"; agenix.inputs.nixpkgs.follows = "nixpkgs"; alejandra.url = "github:kamadorueda/alejandra"; alejandra.inputs.nixpkgs.follows = "nixpkgs"; doom-emacs.url = "github:nix-community/nix-doom-emacs"; doom-emacs.inputs.nixpkgs.follows = "nixpkgs"; emacs.url = "github:nix-community/emacs-overlay"; emacs.inputs.nixpkgs.follows = "nixos"; home.url = "github:nix-community/home-manager"; home.inputs.nixpkgs.follows = "nixpkgs"; neovim.url = "github:nix-community/neovim-nightly-overlay"; neovim.inputs.nixpkgs.follows = "nixpkgs"; nur.url = "github:nix-community/nur"; nur.inputs.nixpkgs.follows = "nixpkgs"; statix.url = "github:NerdyPepper/statix"; statix.inputs.nixpkgs.follows = "nixpkgs"; waterfox.url = "github:jcdickinson/nixos-nixpkgs/waterfox-bin"; wayland.url = "github:nix-community/nixpkgs-wayland"; wayland.inputs.nixpkgs.url = "nixpkgs"; }; outputs = inputs @ { self , nixpkgs , nixos , nixos-hardware , agenix , alejandra , doom-emacs , emacs , home , neovim , nur , statix , waterfox , wayland }: let alejandra-overlay = final: prev: { alejandra = alejandra.defaultPackage.${prev.system}; }; waterfox-overlay = final: prev: { waterfox = import waterfox { inherit system; config.allowUnfree = true; }; }; nixos-overlay = final: prev: { nixos = import nixos { inherit system; config.allowUnfree = true; overlays = [ emacs.overlay ]; }; }; system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; config.allowUnfree = true; overlays = [ (import ./pkgs/default.nix { inherit inputs; }) alejandra-overlay nixos-overlay neovim.overlay nur.overlay statix.overlay waterfox-overlay wayland.overlay ]; }; in { nixosConfigurations.zaphod = nixpkgs.lib.nixosSystem { inherit system; specialArgs = inputs; modules = [ # home.nixosModules.home-manager # { # home-manager.useGlobalPkgs = true; # home-manager.useUserPackagess = true; # home-manager.users.mrhedgehog = import ./home.nix; # home-manager.extraSpecialArgs = { inherit pkgs system; }; # } # ({ pkgs, ... }: # let # nur-no-pkgs = import nur { # nurpkgs = import nixpkgs { system = "x86_64-linux"; }; # }; # in { # imports = [ nur-no-pkgs.repos.paul.modules.foo ]; # ... # }) ]; }; homeConfigurations.mrhedgehog = home.lib.homeManagerConfiguration { inherit pkgs system; username = "mrhedgehog"; stateVersion = "22.05"; homeDirectory = "/home/mrhedgehog"; configuration.imports = [ ./home.nix doom-emacs.hmModule ]; }; }; }