Extract Docker and screenkey modules

This commit is contained in:
Oliver Davies 2024-11-26 13:00:00 +00:00
parent d0e83937d2
commit 198f2962bd
8 changed files with 53 additions and 25 deletions

View file

@ -0,0 +1,5 @@
{
imports = [
./docker.nix
];
}

View file

@ -0,0 +1,16 @@
{ lib, config, ... }:
{
options.features.cli.docker.enable = lib.mkEnableOption "Enable Docker";
config = lib.mkIf config.features.cli.docker.enable {
virtualisation.docker = {
enable = true;
autoPrune = {
enable = true;
dates = "weekly";
};
};
};
}

View file

@ -0,0 +1,3 @@
{
imports = [ ./screenkey.nix ];
}

View file

@ -0,0 +1,23 @@
{
config,
lib,
pkgs,
username,
...
}:
{
options.features.desktop.screenkey.enable = lib.mkEnableOption "Enable screenkey";
config = lib.mkIf config.features.desktop.screenkey.enable {
environment.systemPackages = with pkgs; [ screenkey ];
home-manager.users.${username}.xdg.configFile."screenkey.json".text = builtins.toJSON {
key_mode = "composed";
mods_mode = "emacs";
persist = true;
size = "small";
timeout = 0.25;
};
};
}