Working on modularizing stuff
This commit is contained in:
parent
835faf218d
commit
8349809fec
15 changed files with 256 additions and 41 deletions
59
flake.nix
59
flake.nix
|
@ -12,17 +12,54 @@
|
|||
stylix.url = "github:danth/stylix";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs: {
|
||||
nixosConfigurations = {
|
||||
default = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./hosts/default/configuration.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
outputs = { self, nixpkgs, ... }@inputs: let
|
||||
inherit (lib.my) mapModules mapModules mapHosts;
|
||||
|
||||
};
|
||||
mkPkgs = pkgs: extraOverlays:
|
||||
import pkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = extraOverlays ++ (lib.attrValues self.overlays);
|
||||
};
|
||||
pkgs = mkPkgs nixpkgs [self.overlays.default];
|
||||
pkgs-unstable = mkPkgs nixpkgs-unstable [];
|
||||
|
||||
lib = nixpkgs.lib.extend (final: prev: {
|
||||
my = import ./lib {
|
||||
inherit pkgs inputs;
|
||||
|
||||
lib = final;
|
||||
};
|
||||
});
|
||||
in {
|
||||
lib = lib.my;
|
||||
|
||||
packages."${system}" = mapModules ./paclages (p: pkgs.callPackage p {});
|
||||
|
||||
nixosModules =
|
||||
{
|
||||
chris = import ./.;
|
||||
}
|
||||
// mapModulesRec ./modules import;
|
||||
|
||||
nixosConfigurations = mapHosts ./hosts {};
|
||||
|
||||
devShells."${system}".default = import ./shell.nix { inherit lib pkgs; };
|
||||
|
||||
|
||||
|
||||
# nixosConfigurations = {
|
||||
# pc = nixpkgs.lib.nixosSystem {
|
||||
# specialArgs = {inherit inputs;};
|
||||
# modules = [
|
||||
# ./hosts/pc/default.nix
|
||||
# inputs.home-manager.nixosModules.default
|
||||
# inputs.stylix.nixosModules.stylix
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue