Change sway config
This commit is contained in:
@@ -17,10 +17,19 @@ in
|
||||
default = false;
|
||||
};
|
||||
|
||||
wm = mkOption {
|
||||
description = "Which window manager to install";
|
||||
type = types.enum [ "sway" ];
|
||||
default = "sway";
|
||||
sway = {
|
||||
enable = mkOption {
|
||||
description = "Install and configure sway window manager";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
desktop = mkOption {
|
||||
description= "Use desktop configuration";
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
terminal = mkOption {
|
||||
@@ -29,6 +38,12 @@ in
|
||||
default = pkgs.alacritty;
|
||||
};
|
||||
|
||||
gtk = mkOption {
|
||||
description = "Whether to configure gtk";
|
||||
type = types.bool;
|
||||
default = cfg.gui.enable;
|
||||
};
|
||||
|
||||
protonmail = mkOption {
|
||||
description = "Whether to install protonmail bridge and mail application";
|
||||
type = types.bool;
|
||||
@@ -46,13 +61,20 @@ in
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
monitors = mkOption {
|
||||
description = "Attribute set of system monitors";
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; with localPackages.x86_64-linux; []
|
||||
++ optionals (cfg.wm == "sway") [
|
||||
++ optionals cfg.sway.enable [
|
||||
wl-clipboard
|
||||
grim
|
||||
slurp
|
||||
@@ -69,8 +91,6 @@ in
|
||||
++ optional cfg.secrets libsecret
|
||||
++ optionals cfg.protonmail [ thunderbird protonmail-bridge ];
|
||||
|
||||
programs.sway.enable = mkIf (cfg.wm == "sway") true;
|
||||
|
||||
programs.dconf.enable = mkIf cfg.secrets true;
|
||||
services.gnome.gnome-keyring.enable = mkIf cfg.secrets true;
|
||||
services.dbus.packages = mkIf cfg.secrets [ pkgs.gnome.seahorse ];
|
||||
|
||||
Reference in New Issue
Block a user