feat: add minimal system option
This commit is contained in:
parent
1bcdb83041
commit
2423081e2a
3 changed files with 32 additions and 25 deletions
|
@ -2,15 +2,31 @@
|
|||
, lib
|
||||
, config
|
||||
, ... }: with lib; let
|
||||
cfg = config.home.util;
|
||||
gui = with config.global.gui; ( enable && session );
|
||||
in {
|
||||
users.home.persist.directories = [
|
||||
".cache/nix-index"
|
||||
] ++
|
||||
optionals gui [
|
||||
".local/share/Mission Planner"
|
||||
".config/ExpressLRS Configurator"
|
||||
".config/betaflight-configurator"
|
||||
".config/inav-configurator"
|
||||
];
|
||||
options.home.util = {
|
||||
minimal = mkEnableOption "minimal system environment with less packages";
|
||||
};
|
||||
|
||||
config = {
|
||||
users.homeModules = [
|
||||
# this module passes util configuration to home-manager
|
||||
{ passthrough.util = cfg; }
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
environment.shells = singleton pkgs.zsh;
|
||||
|
||||
users.home.persist.directories = [ ] ++
|
||||
optionals (!cfg.minimal) [
|
||||
".cache/nix-index"
|
||||
] ++
|
||||
optionals gui [
|
||||
".local/share/Mission Planner"
|
||||
".config/ExpressLRS Configurator"
|
||||
".config/betaflight-configurator"
|
||||
".config/inav-configurator"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue