From f95e8c631c1f45249b716c5cf106c891be7d6c24 Mon Sep 17 00:00:00 2001 From: Mark Nipper Date: Wed, 23 Oct 2024 02:04:51 -0700 Subject: Migrate to more standard flake template --- flake.nix | 101 ++++++++++++++------------------------------------------------ 1 file changed, 22 insertions(+), 79 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 1e1d034..4bd26e6 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "nipsy's NixOS configuration"; + description = "nipsy's NixOS configurations"; inputs = { @@ -35,26 +35,22 @@ }; - outputs = inputs@{ home-manager-stable, home-manager, nixos-hardware, nixpkgs-stable, nixpkgs, nvidia-patch, sops-nix, ... }: { + outputs = { home-manager-stable, home-manager, nixos-hardware, nixpkgs-stable, nixpkgs, nvidia-patch, self, sops-nix, ... } @ inputs: let + inherit (self) outputs; + systems = [ + #"aarch64-linux" + #"i686-linux" + "x86_64-linux" + #"aarch64-darwin" + #"x86_64-darwin" + ]; + forAllSystems = nixpkgs.lib.genAttrs systems; + in { nixosConfigurations = { - arrakis = nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; - - specialArgs = { inherit inputs nvidia-patch; - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - overlays = [(import ./pkgs)]; - }; - - pkgs-stable = import nixpkgs-stable { - inherit system; - config.allowUnfree = true; - }; - }; - + arrakis = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs outputs; }; modules = [ ./hosts/arrakis home-manager.nixosModules.home-manager { @@ -66,22 +62,8 @@ ]; }; - darkstar = nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; - - specialArgs = { - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - overlays = [(import ./pkgs)]; - }; - - pkgs-stable = import nixpkgs-stable { - inherit system; - config.allowUnfree = true; - }; - }; - + darkstar = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs outputs; }; modules = [ ./hosts/darkstar home-manager.nixosModules.home-manager { @@ -93,21 +75,7 @@ }; ginaz = nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; - - specialArgs = { - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - overlays = [(import ./pkgs)]; - }; - - pkgs-stable = import nixpkgs-stable { - inherit system; - config.allowUnfree = true; - }; - }; - + specialArgs = { inherit inputs outputs; }; modules = [ ./hosts/ginaz home-manager.nixosModules.home-manager { @@ -121,21 +89,7 @@ }; kaitain = nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; - - specialArgs = { - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - overlays = [(import ./pkgs)]; - }; - - pkgs-stable = import nixpkgs-stable { - inherit system; - config.allowUnfree = true; - }; - }; - + specialArgs = { inherit inputs outputs; }; modules = [ ./hosts/kaitain home-manager.nixosModules.home-manager { @@ -146,21 +100,7 @@ }; richese = nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; - - specialArgs = { - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - overlays = [(import ./pkgs)]; - }; - - pkgs-stable = import nixpkgs-stable { - inherit system; - config.allowUnfree = true; - }; - }; - + specialArgs = { inherit inputs outputs; }; modules = [ ./hosts/richese home-manager.nixosModules.home-manager { @@ -172,6 +112,9 @@ }; + overlays = import ./overlays {inherit inputs;}; + packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); + }; } -- cgit v1.2.3