dotfiles/nix/lib/nixos/default.nix

50 lines
833 B
Nix
Raw Normal View History

{
inputs,
outputs,
2024-09-21 08:58:08 +00:00
nixos-hardware,
2024-06-15 11:52:54 +00:00
pkgs,
self,
username,
}:
{
desktop ? false,
hostname,
2024-11-22 01:18:31 +00:00
modules ? [ ],
}:
2024-03-18 20:33:28 +00:00
let
configuration = import ./configuration.nix {
inherit
outputs
desktop
hostname
2024-11-21 16:31:40 +00:00
username
inputs
self
;
};
2024-02-29 08:26:04 +00:00
hardwareConfiguration = import ./hardware-configuration.nix;
in
inputs.nixpkgs.lib.nixosSystem {
2024-03-18 20:33:28 +00:00
modules = [
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = {
inherit
inputs
desktop
self
username
;
};
2024-03-18 20:33:28 +00:00
useGlobalPkgs = true;
useUserPackages = true;
users."${username}" = import "${self}/nix/home/${username}";
2024-03-18 20:33:28 +00:00
};
}
2024-03-18 20:33:28 +00:00
configuration
hardwareConfiguration
2024-11-22 01:18:31 +00:00
] ++ modules;
2024-03-18 20:33:28 +00:00
}