wip
This commit is contained in:
parent
1231503914
commit
c15ee0a39b
30 changed files with 703 additions and 118 deletions
49
modules/home/default.nix
Normal file
49
modules/home/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.home;
|
||||
in {
|
||||
imports = with inputs; [
|
||||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
options.aa.home = with types; {
|
||||
file = mkOption {
|
||||
type = attrs;
|
||||
default = {};
|
||||
description = "A set of files to be manged by home-manager's <option>home.file</option> option.";
|
||||
};
|
||||
configFile = mkOption {
|
||||
type = attrs;
|
||||
default = {};
|
||||
description = "A set of files to be managed by home-manager's <option>xdf.configFile</option>.";
|
||||
};
|
||||
extraOptions = mkOption {
|
||||
type = attrs;
|
||||
default = {};
|
||||
description = "Options to pass directly to home-manager.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
aa.home.extraOptions = {
|
||||
home.stateVersion = config.system.stateVersion;
|
||||
home.file = mkAliasDefinitions options.aa.home.file;
|
||||
xdg.enable = true;
|
||||
xdg.configFile = mkAliasDefinitions options.aa.home.configFile;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
|
||||
users.${config.aa.user.name} =
|
||||
mkAliasDefinitions options.aa.home.extraOptions;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue