blob: c2866c937f9cf00093f669d37f1c1b471818d00f (
plain) (
tree)
|
|
{ inputs }:
{
mkSystem =
{ hostname
, system
}:
inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs system hostname;
};
modules = [
inputs.agenix.nixosModules.age
../hosts/common
../hosts/${hostname}
{
networking.hostName = hostname;
nixpkgs = {
config.allowUnfree = true;
};
# Add each input as a registry
nix.registry = inputs.nixpkgs.lib.mapAttrs'
(n: v:
inputs.nixpkgs.lib.nameValuePair (n) ({ flake = v; }))
inputs;
}
];
};
mkHome =
{ username
, system
, hostname
, desktop ? false
}:
inputs.home-manager.lib.homeManagerConfiguration {
inherit username system;
extraSpecialArgs = {
inherit system hostname desktop;
};
homeDirectory = "/home/${username}";
configuration = ../users/${username};
extraModules = [
# Base configuration
{
nixpkgs = {
config.allowUnfree = true;
overlays = [ inputs.emacs-overlay.overlay ];
};
programs = {
home-manager.enable = true;
git.enable = true;
};
systemd.user.startServices = "sd-switch";
}
];
};
}
|