feat(desktop): move firefox config to homes and use home-manager modules
This commit is contained in:
parent
844e6b263e
commit
6897ad63c9
8 changed files with 95 additions and 90 deletions
|
@ -1,25 +0,0 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkOption;
|
||||
inherit (lib.types) listOf str;
|
||||
inherit (lib.lists) allUnique;
|
||||
cfg = config.desktop.browser;
|
||||
in
|
||||
{
|
||||
options.desktop.browser = {
|
||||
firefox = {
|
||||
enable = mkEnableOption "";
|
||||
syncedProfiles = mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config.assertions = [
|
||||
{
|
||||
assertion = allUnique cfg.firefox.syncedProfiles;
|
||||
message = "desktop.browser.firefox.syncedProfiles has duplicate elements.";
|
||||
}
|
||||
];
|
||||
}
|
20
modules/nixos/desktop/browser/firefox/default.nix
Normal file
20
modules/nixos/desktop/browser/firefox/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkIf
|
||||
singleton
|
||||
;
|
||||
cfg = config.desktop.browser.firefox;
|
||||
in
|
||||
{
|
||||
options.desktop.browser.firefox.enable = mkEnableOption "";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.sharedModules = singleton {
|
||||
persistDirs = singleton ".mozilla/firefox";
|
||||
programs.firefox.enable = true;
|
||||
stylix.targets.firefox.colorTheme.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue