improve flake config formatting a bit
This commit is contained in:
parent
f8b2aed834
commit
be00b40c8f
|
@ -22,22 +22,21 @@
|
||||||
# FIXME replace with your hostname
|
# FIXME replace with your hostname
|
||||||
your-hostname = nixpkgs.lib.nixosSystem {
|
your-hostname = nixpkgs.lib.nixosSystem {
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||||
|
# > Our main nixos configuration file <
|
||||||
modules = [ ./nixos/configuration.nix ];
|
modules = [ ./nixos/configuration.nix ];
|
||||||
# Pass inputs down to our config, so that they can consume flake inputs
|
|
||||||
specialArgs = { inherit inputs; };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
# FIXME replace with your username@hostname
|
# FIXME replace with your username@hostname
|
||||||
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
|
"your-username@your-hostname" =
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
modules = [ ./home-manager/home.nix ];
|
extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||||
# Pass inputs down to our config, so that they can consume flake inputs
|
# > Our main home-manager configuration file <
|
||||||
extraSpecialArgs = { inherit inputs; };
|
modules = [ ./home-manager/home.nix ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,12 +27,9 @@
|
||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
"x86_64-darwin"
|
"x86_64-darwin"
|
||||||
];
|
];
|
||||||
in
|
in rec {
|
||||||
rec {
|
|
||||||
# Your custom packages and modifications
|
# Your custom packages and modifications
|
||||||
overlays = {
|
overlays = { default = import ./overlay { inherit inputs; }; };
|
||||||
default = import ./overlay { inherit inputs; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# Reusable nixos modules you might want to export
|
# Reusable nixos modules you might want to export
|
||||||
# These are usually stuff you would upstream into nixpkgs
|
# These are usually stuff you would upstream into nixpkgs
|
||||||
|
@ -53,38 +50,31 @@
|
||||||
import inputs.nixpkgs {
|
import inputs.nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = builtins.attrValues overlays;
|
overlays = builtins.attrValues overlays;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# FIXME replace with your hostname
|
# FIXME replace with your hostname
|
||||||
your-hostname = nixpkgs.lib.nixosSystem {
|
your-hostname = nixpkgs.lib.nixosSystem {
|
||||||
pkgs = legacyPackages.x86_64-linux;
|
pkgs = legacyPackages.x86_64-linux;
|
||||||
|
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||||
modules = [
|
modules = (builtins.attrValues nixosModules) ++ [
|
||||||
# > Our main nixos configuration file <
|
# > Our main nixos configuration file <
|
||||||
./nixos/configuration.nix
|
./nixos/configuration.nix
|
||||||
] ++ (builtins.attrValues nixosModules); # Import our reusable nixos modules
|
];
|
||||||
|
|
||||||
# Pass inputs down to our config, so that they can consume flake inputs
|
|
||||||
specialArgs = { inherit inputs; };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
# FIXME replace with your username@hostname
|
# FIXME replace with your username@hostname
|
||||||
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
|
"your-username@your-hostname" =
|
||||||
pkgs = legacyPackages.x86_64-linux;
|
home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = legacyPackages.x86_64-linux;
|
||||||
modules = [
|
extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||||
# > Our main home-manager configuration file <
|
modules = (builtins.attrValues homeManagerModules) ++ [
|
||||||
./home-manager/home.nix
|
# > Our main home-manager configuration file <
|
||||||
# Import our reusable home-manager modules
|
./home-manager/home.nix
|
||||||
] ++ (builtins.attrValues homeManagerModules); # Import our reusable home-manager modules
|
];
|
||||||
|
};
|
||||||
# Pass inputs down to our config, so that they can consume flake inputs
|
|
||||||
extraSpecialArgs = { inherit inputs; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue