mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-31 04:04:32 +00:00
apply some review requests
This commit is contained in:
parent
15b4e6d9c9
commit
5bb581f74a
1 changed files with 2 additions and 6 deletions
|
@ -16,7 +16,7 @@ in {
|
|||
enable = mkEnableOption "the browserpass extension host application";
|
||||
|
||||
browsers = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = types.listOf (types.enum (builtins.attrNames browsers));
|
||||
default = builtins.attrNames browsers;
|
||||
example = [ "firefox" ];
|
||||
description = "Which browsers to install browserpass for";
|
||||
|
@ -30,10 +30,6 @@ in {
|
|||
assertion = pkgs.stdenv.is64bit;
|
||||
message = "Only 64-bit is supported";
|
||||
}
|
||||
{
|
||||
assertion = builtins.all (x: builtins.any (y: x == y) (builtins.attrNames browsers)) config.programs.browserpass.browsers;
|
||||
message = "Unsupported browser, must be one of: ${toString (builtins.attrNames browsers)}";
|
||||
}
|
||||
{
|
||||
assertion = (builtins.getEnv "USER") != "root";
|
||||
message = "root install not supported";
|
||||
|
@ -81,7 +77,7 @@ in {
|
|||
mv * $out/
|
||||
'';
|
||||
});
|
||||
in dagEntryBefore ["writeBoundary"] (builtins.concatStringsSep "" (map (browser: ''
|
||||
in dagEntryAfter ["writeBoundary"] (builtins.concatStringsSep "" (map (browser: ''
|
||||
$DRY_RUN_CMD ${browserpass}/install.sh <<EOF
|
||||
${toString browsers.${browser}}
|
||||
EOF
|
||||
|
|
Loading…
Add table
Reference in a new issue