diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
commit | c4625b175f8200f643fd6e11010932ea44c78433 (patch) | |
tree | bce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/modules/workstation/ui/i3/default.nix | |
parent | 49f735974dd103039ddc4cb576bb76555164a9e7 (diff) | |
parent | d661aa56a8843e991261510c1bb28fdc2f6975ae (diff) |
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie
git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7
git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/modules/workstation/ui/i3/default.nix')
-rw-r--r-- | infra/libkookie/modules/workstation/ui/i3/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/infra/libkookie/modules/workstation/ui/i3/default.nix b/infra/libkookie/modules/workstation/ui/i3/default.nix new file mode 100644 index 000000000000..1266b652fd64 --- /dev/null +++ b/infra/libkookie/modules/workstation/ui/i3/default.nix @@ -0,0 +1,58 @@ +/** + * A custom module to configure i3. Provides a simple interface to + * set a wallpaper and certain keybinding overrides. + * + * The special thing about this configuration is the way workspaces + * are handled. Instead of numerical workspaces, this configuration + * sets up scripts to manage named workspaces + */ + +{ config, lib, pkgs, home-manager, ... }: + +let + cfg = config.libkookie.ui.i3; + libkookie = config.libkookie; +in +with lib; +{ + options.libkookie.ui.i3 = { + enable = mkEnableOption "i3 + xfce display manager"; + + wallpaper = mkOption { + type = types.path; + description = '' + Specify the wallpaper to set. Default to the default + NixOS login screen wallpaper. + ''; + }; + + compton = mkEnableOption "windown composition with compton"; + + screenshotHandling = mkOption { + type = types.bool; + default = false; + description = '' + Install the gnome-screenshot tool and create a binding to it. + ''; + }; + + modifier = mkOption { + type = types.string; + default = "Mod4"; + description = '' + The modifier key used by i3. + By default this is Meta (Mod4). + To see which modifier keys you can use alternatively, + check the i3 documentation. + ''; + }; + }; + + config = mkIf cfg.enable { + home-manager.users = listToAttrs (map (user: lib.nameValuePair "${user}" ({ ... }: { + imports = [ + ./core.nix + ]; + })) config.libkookie.activeUsers); + }; +} |