mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 07:04:17 +00:00
psd: add missing module config options
This commit is contained in:
parent
d7830d0542
commit
8519edda48
1 changed files with 42 additions and 0 deletions
|
@ -4,6 +4,14 @@ let
|
|||
|
||||
cfg = config.services.psd;
|
||||
|
||||
configFile = ''
|
||||
${lib.optionalString (cfg.browsers != [ ]) ''
|
||||
BROWSERS=(${lib.concatStringsSep " " cfg.browsers})
|
||||
''}
|
||||
|
||||
USE_BACKUP="${if cfg.useBackup then "yes" else "no"}"
|
||||
BACKUP_LIMIT=${builtins.toString cfg.backupLimit}
|
||||
'';
|
||||
in {
|
||||
meta.maintainers = [ lib.hm.maintainers.danjujan ];
|
||||
|
||||
|
@ -22,6 +30,34 @@ in {
|
|||
defaults to seconds if omitted.
|
||||
'';
|
||||
};
|
||||
|
||||
browsers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
example = [ "chromium" "firefox" ];
|
||||
description = ''
|
||||
A list of browsers to sync. An empty list will enable all browsers to be managed by profile-sync-daemon.
|
||||
|
||||
Available choices are:
|
||||
chromium chromium-dev conkeror.mozdev.org epiphany falkon firefox firefox-trunk google-chrome google-chrome-beta google-chrome-unstable heftig-aurora icecat inox luakit midori opera opera-beta opera-developer opera-legacy otter-browser qupzilla qutebrowser palemoon rekonq seamonkey surf vivaldi vivaldi-snapshot
|
||||
'';
|
||||
};
|
||||
|
||||
useBackup = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to completly enable or disable the crash recovery feature.
|
||||
'';
|
||||
};
|
||||
|
||||
backupLimit = lib.mkOption {
|
||||
type = lib.types.ints.unsigned;
|
||||
default = 5;
|
||||
description = ''
|
||||
Maximum number of crash recovery snapshots to keep (the oldest ones are deleted first).
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -38,6 +74,10 @@ in {
|
|||
rsync
|
||||
kmod
|
||||
gawk
|
||||
gnugrep
|
||||
gnused
|
||||
coreutils
|
||||
findutils
|
||||
nettools
|
||||
util-linux
|
||||
profile-sync-daemon
|
||||
|
@ -84,5 +124,7 @@ in {
|
|||
Timer = { OnUnitActiveSec = cfg.resyncTimer; };
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."psd/psd.conf".text = configFile;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue