mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-31 04:04:32 +00:00
Apply suggestions from code review
Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
2fde3bcb82
commit
7ae4d6f7c6
1 changed files with 3 additions and 10 deletions
|
@ -25,12 +25,7 @@ in {
|
|||
|
||||
enable = lib.mkEnableOption "Smug session manager";
|
||||
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.smug;
|
||||
defaultText = lib.literalExpression "pkgs.smug";
|
||||
description = "Package providing {command}`smug`.";
|
||||
};
|
||||
package = lib.mkPackageOption pkgs "smug" { nullable = true; };
|
||||
|
||||
projects = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule [{
|
||||
|
@ -118,10 +113,8 @@ in {
|
|||
|
||||
stop = mkOptionCommands
|
||||
"Commands to execute after the tmux-session is destroyed.";
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
]);
|
||||
default = { };
|
||||
description = "List of project configurations.";
|
||||
|
@ -147,7 +140,7 @@ in {
|
|||
});
|
||||
|
||||
in lib.mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
home.file = { } // (mkProjects cleanedProjects);
|
||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||
home.file = mkProjects cleanedProjects;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue