use home-manager as nixos module

This commit is contained in:
Ivan Kirilov Dimitrov 2024-08-02 20:04:50 +02:00
parent 1b2bbc3a31
commit 09f0ab478d
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294
2 changed files with 40 additions and 25 deletions

View File

@ -24,7 +24,7 @@ let
hardware.cpu.intel.updateMicrocode = lib.mkForce false; hardware.cpu.intel.updateMicrocode = lib.mkForce false;
}; };
}; };
essential = [ hardwareConfigurations.nova inputs.hosts.nixosModule ] ++ (with mods; [ grub base sound wayland security ivand wireless wireguard ]); essential = [ hardwareConfigurations.nova inputs.hosts.nixosModule inputs.home-manager.nixosModules.default ] ++ (with mods; [ grub base sound wayland security ivand wireless wireguard ]);
systemWithModules = modules: withSystem system (ctx@{ config, inputs', pkgs, ... }: inputs.nixpkgs.lib.nixosSystem { systemWithModules = modules: withSystem system (ctx@{ config, inputs', pkgs, ... }: inputs.nixpkgs.lib.nixosSystem {
specialArgs = { specialArgs = {
inherit inputs inputs' pkgs; inherit inputs inputs' pkgs;

View File

@ -118,7 +118,22 @@ top@{ moduleWithSystem, ... }: {
}; };
}; };
}; };
ivand = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: { ivand = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }:
let homeMods = top.config.flake.homeManagerModules; in {
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
users.ivand = { ... }: {
imports = with homeMods; [
base
ivand
shell
util
swayland
web
];
};
};
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ]; fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ];
users = { users = {
users = { users = {