home: init

This commit is contained in:
blahai 2025-02-17 22:20:48 +02:00
parent 3a57a0dee7
commit d9c7ea6255
Signed by: blahai
SSH key fingerprint: SHA256:ZfCryi+V64yG+vC1ZIIsqgvBCmA31tTi7RJ6M8CvpRc
3 changed files with 58 additions and 0 deletions

56
home/default.nix Normal file
View file

@ -0,0 +1,56 @@
{
lib,
self,
self',
config,
inputs,
inputs',
...
}: let
inherit (lib.modules) mkIf mkDefault;
inherit (lib.attrsets) genAttrs;
inherit (lib.options) mkEnableOption;
in {
options.olympus.system.useHomeManager =
mkEnableOption "Whether to use home-manager or not"
// {
default = true;
};
config = mkIf config.olympus.system.useHomeManager {
home-manager = {
verbose = true;
useUserPackages = true;
useGlobalPkgs = true;
backupFileExtension = "bak";
users = genAttrs config.olympus.system.users (name: ./${name});
extraSpecialArgs = {
inherit
self
self'
inputs
inputs'
;
};
# we should define grauntied common modules here
sharedModules = [
inputs.beapkgs.homeManagerModules.default
(self + /modules/home/default.nix)
{
home.stateVersion = config.system.stateVersion;
# reload system units when changing configs
systemd.user.startServices = mkDefault "sd-switch"; # or "legacy" if "sd-switch" breaks again
# let HM manage itself when in standalone mode
programs.home-manager.enable = true;
}
];
};
};
}

1
home/pingu/default.nix Normal file
View file

@ -0,0 +1 @@
{}

1
modules/home/default.nix Normal file
View file

@ -0,0 +1 @@
{}