diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-07 16:33:47 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-07 16:33:47 +0100 |
commit | f6ae72071127e92dd82875c850a1e55dd88a9e6d (patch) | |
tree | ec0f1bd9ff576f25d87050a7cb635c1ee070fe38 /infra/libkookie/modules/workstation/ui/i3/default.nix | |
parent | 12e9fa77a6eb944cf0338483becc71aae63e3a75 (diff) |
libkookie: adding initial i3 abstraction
This module (and associated configuration) sets up i3 on a computer,
according to some parameters. At the moment, there is not much to
configure, as the basics can be shared. However, I'll want to be able
to change the tray, and i3bar based on the hardware, which is
supported with this approach.
Diffstat (limited to 'infra/libkookie/modules/workstation/ui/i3/default.nix')
-rw-r--r-- | infra/libkookie/modules/workstation/ui/i3/default.nix | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/infra/libkookie/modules/workstation/ui/i3/default.nix b/infra/libkookie/modules/workstation/ui/i3/default.nix index 1266b652fd64..1967558f1884 100644 --- a/infra/libkookie/modules/workstation/ui/i3/default.nix +++ b/infra/libkookie/modules/workstation/ui/i3/default.nix @@ -7,16 +7,20 @@ * sets up scripts to manage named workspaces */ -{ config, lib, pkgs, home-manager, ... }: +{ config, lib, pkgs, home-manager, ... } @ args: let cfg = config.libkookie.ui.i3; libkookie = config.libkookie; in with lib; -{ +{ options.libkookie.ui.i3 = { enable = mkEnableOption "i3 + xfce display manager"; + + compton = mkEnableOption "window composition with compton"; + + defaultSession = mkEnableOption "i3 as the default login session"; wallpaper = mkOption { type = types.path; @@ -26,16 +30,14 @@ with lib; ''; }; - compton = mkEnableOption "windown composition with compton"; - - screenshotHandling = mkOption { - type = types.bool; - default = false; + fonts = mkOption { + type = with types; listOf str; + default = ["monospace"]; description = '' - Install the gnome-screenshot tool and create a binding to it. + A set of fonts to use by the i3 module for rendering text ''; }; - + modifier = mkOption { type = types.string; default = "Mod4"; @@ -46,13 +48,15 @@ with lib; check the i3 documentation. ''; }; - }; - config = mkIf cfg.enable { - home-manager.users = listToAttrs (map (user: lib.nameValuePair "${user}" ({ ... }: { - imports = [ - ./core.nix - ]; - })) config.libkookie.activeUsers); + videoDrivers = with lib; mkOption { + type = with types; listOf str; + default = []; + description = '' + The set of video drivers to instantiate on a given system + ''; + }; }; + + config = mkIf cfg.enable (import ./core.nix args); } |