Created
December 21, 2021 15:20
-
-
Save sweenu/a432ff3feb9b55375f328c49a61860db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Sweenu's hosts' setup"; | |
inputs = { | |
nixos.url = "github:nixos/nixpkgs/nixos-unstable"; | |
digga = { | |
url = "github:divnix/digga"; | |
inputs = { | |
nixpkgs.follows = "nixos"; | |
nixlib.follows = "nixos"; | |
home-manager.follows = "home"; | |
}; | |
}; | |
home.url = "github:nix-community/home-manager"; | |
home.inputs.nixpkgs.follows = "nixos"; | |
agenix.url = "github:ryantm/agenix"; | |
agenix.inputs.nixpkgs.follows = "nixos"; | |
bud = { | |
url = "github:divnix/bud"; | |
inputs = { | |
nixpkgs.follows = "nixos"; | |
devshell.follows = "digga/devshell"; | |
}; | |
}; | |
}; | |
outputs = { self, nixos, digga, home, agenix, bud } @ inputs: | |
digga.lib.mkFlake { | |
inherit self inputs; | |
channelsConfig = { allowUnfree = true; }; | |
channels.nixos = { | |
overlays = [ | |
agenix.overlay | |
./pkgs/default.nix | |
]; | |
}; | |
nixos = { | |
hostDefaults = { | |
system = "x86_64-linux"; | |
channelName = "nixos"; | |
imports = [ (digga.lib.importExportableModules ./modules) ]; | |
modules = [ | |
agenix.nixosModules.age | |
bud.nixosModules.bud | |
home.nixosModules.home-manager | |
]; | |
}; | |
imports = [ (digga.lib.importHosts ./hosts) ]; | |
importables = rec { | |
profiles = digga.lib.rakeLeaves ./profiles; | |
suites = with builtins; let explodeAttrs = set: map (a: getAttr a set) (attrNames set); in | |
with profiles; rec { | |
base = (explodeAttrs core) ++ (explodeAttrs develop); | |
desktop = base ++ [ audio ] ++ (explodeAttrs graphical) ++ (explodeAttrs pc) ++ (explodeAttrs hardware); | |
laptop = desktop ++ [ profiles.laptop ]; | |
}; | |
}; | |
}; | |
devshell = ./shell.nix; | |
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment