refactor
This commit is contained in:
parent
66c05f9093
commit
45d6f4b0f3
205 changed files with 9040 additions and 342 deletions
36
modules/nixos/home/default.nix
Normal file
36
modules/nixos/home/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ options, config, pkgs, lib, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.home;
|
||||
in
|
||||
{
|
||||
# imports = with inputs; [
|
||||
# home-manager.nixosModules.home-manager
|
||||
# ];
|
||||
|
||||
options.plusultra.home = with types; {
|
||||
file = mkOpt attrs { }
|
||||
(mdDoc "A set of files to be managed by home-manager's `home.file`.");
|
||||
configFile = mkOpt attrs { }
|
||||
(mdDoc "A set of files to be managed by home-manager's `xdg.configFile`.");
|
||||
extraOptions = mkOpt attrs { } "Options to pass directly to home-manager.";
|
||||
};
|
||||
|
||||
config = {
|
||||
plusultra.home.extraOptions = {
|
||||
home.stateVersion = config.system.stateVersion;
|
||||
home.file = mkAliasDefinitions options.plusultra.home.file;
|
||||
xdg.enable = true;
|
||||
xdg.configFile = mkAliasDefinitions options.plusultra.home.configFile;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
|
||||
users.${config.plusultra.user.name} =
|
||||
mkAliasDefinitions options.plusultra.home.extraOptions;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue