Extract Docker and screenkey modules
This commit is contained in:
parent
d0e83937d2
commit
198f2962bd
nix
hosts/lemp11
modules/nixos
|
@ -1,5 +1,9 @@
|
||||||
{
|
{
|
||||||
features = {
|
features = {
|
||||||
|
cli = {
|
||||||
|
docker.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
gaming.enable = true;
|
gaming.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./autorandr.nix
|
./autorandr.nix
|
||||||
./docker.nix
|
./features/cli
|
||||||
|
./features/desktop
|
||||||
./features/gaming.nix
|
./features/gaming.nix
|
||||||
./features/homelab
|
./features/homelab
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
|
@ -9,7 +10,6 @@
|
||||||
./kanata.nix
|
./kanata.nix
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
./rsnapshot.nix
|
./rsnapshot.nix
|
||||||
./screenkey.nix
|
|
||||||
./xbanish.nix
|
./xbanish.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
virtualisation.docker = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
autoPrune = {
|
|
||||||
enable = true;
|
|
||||||
dates = "weekly";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
5
nix/modules/nixos/features/cli/default.nix
Normal file
5
nix/modules/nixos/features/cli/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./docker.nix
|
||||||
|
];
|
||||||
|
}
|
16
nix/modules/nixos/features/cli/docker.nix
Normal file
16
nix/modules/nixos/features/cli/docker.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
3
nix/modules/nixos/features/desktop/default.nix
Normal file
3
nix/modules/nixos/features/desktop/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
imports = [ ./screenkey.nix ];
|
||||||
|
}
|
23
nix/modules/nixos/features/desktop/screenkey.nix
Normal file
23
nix/modules/nixos/features/desktop/screenkey.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,13 +0,0 @@
|
||||||
{ pkgs, username, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue