nix/lib/mkconf.nix
2023-05-06 18:39:50 +01:00

57 lines
1.3 KiB
Nix

name:
{ nixpkgs
, home-manager
, system
, user
, hyprland
, laptop ? false
, work ? false
, displays ? []
, ...
}:
nixpkgs.lib.nixosSystem rec {
inherit system;
modules = [
{
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
}
home-manager.nixosModules.home-manager
{
imports = [
(import ./modules/scripts.nix { inherit user; })
(import ./modules/editor.nix { inherit user; })
(import ./modules/keyboard.nix { inherit user; })
(import ./modules/display.nix { inherit user; })
(import ./modules/work.nix { inherit user; })
];
keyboard.dvorak.enable = laptop;
displays = if laptop then {
enable = true;
displays = [{
name = "eDP-1";
scaling = 1.2;
}];
}
else displays;
roles.work.enable = work;
}
../system/global/system.nix
../system/${name}/system.nix
../system/${name}/hardware.nix
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${user}.imports = [
../system/${name}/home.nix
../system/global/home.nix
hyprland.homeManagerModules.default
];
}
];
}