From 15a39660eb0a36fa6ec1103957dfabb3af2d06b4 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Sat, 5 Jul 2025 00:02:39 +0200 Subject: [PATCH] chore: refactor system modules --- hosts/alys/configuration.nix | 65 ++----- hosts/alys/host.nix | 3 - hosts/gampo/configuration.nix | 95 +++++---- hosts/gampo/services/default.nix | 6 +- hosts/marpa/configuration.nix | 109 ++++++----- hosts/marpa/services/default.nix | 43 ++-- hosts/tilo/configuration.nix | 48 ++--- modules/opentablet.nix | 6 - modules/system.nix | 183 ------------------ programs/steam.nix | 21 -- {modules => system/boot}/boot.nix | 14 +- system/boot/default.nix | 7 + {modules => system/boot}/plymouth.nix | 4 +- system/boot/zram.nix | 21 ++ system/default.nix | 40 ++++ system/desktop/default.nix | 3 + {programs => system/desktop}/hyprland.nix | 4 +- system/desktop/niri.nix | 13 ++ {modules => system/desktop}/xserver.nix | 12 +- system/dev/default.nix | 3 + {modules => system}/dev/docker.nix | 4 +- {modules => system/hardware}/amdgpu.nix | 9 +- system/hardware/bluetooth.nix | 14 ++ system/hardware/corne.nix | 15 ++ system/hardware/default.nix | 10 + system/hardware/ibm-trackpoint.nix | 15 ++ system/hardware/opentablet.nix | 14 ++ {modules => system/hardware}/sound.nix | 20 +- system/i18n/default.nix | 5 + {modules => system/i18n}/locale.nix | 0 system/network/default.nix | 5 + {modules => system/network}/networking.nix | 4 +- {modules => system/packages}/appimage.nix | 4 +- system/packages/default.nix | 15 ++ system/packages/flatpak.nix | 22 +++ {programs => system/packages}/nano.nix | 0 {modules => system/packages}/nix.nix | 19 +- system/packages/steam.nix | 34 ++++ system/security/default.nix | 5 + {modules => system/security}/sops.nix | 2 +- system/services/default.nix | 9 + {modules => system/services}/endlessh.nix | 4 +- system/services/fwupd.nix | 13 ++ system/services/printing.nix | 13 ++ {modules => system/services}/ssh.nix | 6 +- {modules => system/services}/sunshine.nix | 12 +- system/users/default.nix | 5 + {modules => system/users}/keys/id_alys.pub | 2 +- {modules => system/users}/keys/id_gampo.pub | 0 {modules => system/users}/keys/id_marpa.pub | 0 {modules => system/users}/keys/id_opn4.pub | 0 {modules => system/users}/keys/id_tilo.pub | 0 .../users.nix => system/users/phundrak.nix | 11 +- {programs => users/modules}/flatpak.nix | 0 users/phundrak/home.nix | 13 +- users/phundrak/programs.nix | 20 +- 56 files changed, 549 insertions(+), 475 deletions(-) delete mode 100644 hosts/alys/host.nix delete mode 100644 modules/opentablet.nix delete mode 100644 modules/system.nix delete mode 100644 programs/steam.nix rename {modules => system/boot}/boot.nix (89%) create mode 100644 system/boot/default.nix rename {modules => system/boot}/plymouth.nix (82%) create mode 100644 system/boot/zram.nix create mode 100644 system/default.nix create mode 100644 system/desktop/default.nix rename {programs => system/desktop}/hyprland.nix (55%) create mode 100644 system/desktop/niri.nix rename {modules => system/desktop}/xserver.nix (74%) create mode 100644 system/dev/default.nix rename {modules => system}/dev/docker.nix (92%) rename {modules => system/hardware}/amdgpu.nix (53%) create mode 100644 system/hardware/bluetooth.nix create mode 100644 system/hardware/corne.nix create mode 100644 system/hardware/default.nix create mode 100644 system/hardware/ibm-trackpoint.nix create mode 100644 system/hardware/opentablet.nix rename {modules => system/hardware}/sound.nix (59%) create mode 100644 system/i18n/default.nix rename {modules => system/i18n}/locale.nix (100%) create mode 100644 system/network/default.nix rename {modules => system/network}/networking.nix (95%) rename {modules => system/packages}/appimage.nix (53%) create mode 100644 system/packages/default.nix create mode 100644 system/packages/flatpak.nix rename {programs => system/packages}/nano.nix (100%) rename {modules => system/packages}/nix.nix (56%) create mode 100644 system/packages/steam.nix create mode 100644 system/security/default.nix rename {modules => system/security}/sops.nix (90%) create mode 100644 system/services/default.nix rename {modules => system/services}/endlessh.nix (79%) create mode 100644 system/services/fwupd.nix create mode 100644 system/services/printing.nix rename {modules => system/services}/ssh.nix (85%) rename {modules => system/services}/sunshine.nix (52%) create mode 100644 system/users/default.nix rename {modules => system/users}/keys/id_alys.pub (63%) rename {modules => system/users}/keys/id_gampo.pub (100%) rename {modules => system/users}/keys/id_marpa.pub (100%) rename {modules => system/users}/keys/id_opn4.pub (100%) rename {modules => system/users}/keys/id_tilo.pub (100%) rename modules/users.nix => system/users/phundrak.nix (78%) rename {programs => users/modules}/flatpak.nix (100%) diff --git a/hosts/alys/configuration.nix b/hosts/alys/configuration.nix index eb0e6e1..b42a768 100644 --- a/hosts/alys/configuration.nix +++ b/hosts/alys/configuration.nix @@ -1,64 +1,41 @@ -{ - pkgs, - inputs, - ... -}: { +{inputs, ...}: { imports = [ ./hardware-configuration.nix - ./host.nix inputs.home-manager.nixosModules.default - ../../modules/locale.nix - ../../modules/system.nix - ../../modules/ssh.nix - ../../modules/endlessh.nix - ../../programs/nano.nix + ../../system ]; - zramSwap.enable = true; - - # networking.domain = "phundrak.com"; system = { - amdgpu.enable = false; boot = { - kernel = { - hardened = true; - cpuVendor = "amd"; - }; + kernel.hardened = true; systemd-boot = false; - zfs.enable = false; + zram = { + enable = true; + memoryMax = 512; + }; }; + dev.docker.enable = true; networking = { hostname = "alys"; domain = "phundrak.com"; id = "41157110"; - firewall.openPorts = [ - 22 - ]; }; - sound.enable = false; + packages.nix = { + gc.automatic = true; + trusted-users = ["root" "phundrak"]; + }; + services = { + endlessh.enable = true; + ssh = { + enable = true; + allowedUsers = ["phundrak"]; + passwordAuthentication = false; + }; + }; users = { root.disablePassword = true; - phundrak = true; + phundrak.enable = true; }; }; - - modules = { - ssh = { - enable = true; - allowedUsers = ["phundrak"]; - passwordAuthentication = false; - }; - endlessh.enable = false; - }; - - nixpkgs.config.allowUnfree = true; - - environment.systemPackages = [pkgs.openssl]; - - # networking.hostName = "alys"; - # users.users.root.openssh.authorizedKeys.keys = [ - # "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC+b7BE/gHrHVkqNVfHtp2r4OCUDdohst8hb3Bz5tYtx3gvXJQCB1rFc2hgQJf8FsVyQbidS64lnhU1rUIEbFhv7itT5FGGUnfJEYs64W30wKsnPSb5WXdFXzrNi8za48i2oNl9JA9Fj9k6isyvkTup89hB+ELbXIcfz3bM93WaAt2dIgKijXaAMAAA+tHhgWvlrHlvGlU9/KxY3ZOQSoEboPXd7TDyOf1672eAibYyb5h1HIewYZ+xv1X4dxx/c9Arh4K0s8scuB7XTQQkEbRUEYKD2YXKN83Z09jfMlMYuBAKKO8zU4CM2KTbL7kEVgNc/ArY+uCAakmC5+eS7LxMuOt86+Bi4gXTJ6o6dbfUbCGiq751ni8pg44YSfwYiI05vvZ08eIyNkowumD+X4GRW4tu0I3qK8TI7exeEeoQIwlSfLXlYHEdNB8Q3feLyhHMRkxXgUskbXwWIBexLzJyY40tyqQplZWbYGrUEmjxZ7FWmaV+o8ZjnU2GfJ8JoWyCnEYfRc6Z2ILdXNDRzZ9qYOwefMHtuaYaYYximL+zdVVrm4EZuOetmaJ6zblk4ebU3GZjYykB8DmCDFDZO9koKwzPazLKQl0OWzmQqgxVNg7Mg1NZbuRQgVAhKPelnqejaXbf2/IHAYBn5LDR1Jew5+srlstM9XuYG2whEOx84w== Lucien Cartier-Tilet " - # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILw9oiK8tZ5Vpz82RaRLpITU8qeJrT2hjvudGEDQu2QW lucien@phundrak.com" - # ]; system.stateVersion = "23.11"; } diff --git a/hosts/alys/host.nix b/hosts/alys/host.nix deleted file mode 100644 index 942bb71..0000000 --- a/hosts/alys/host.nix +++ /dev/null @@ -1,3 +0,0 @@ -{pkgs, ...}: { - environment.systemPackages = with pkgs; [neofetch vim emacs]; -} diff --git a/hosts/gampo/configuration.nix b/hosts/gampo/configuration.nix index 81cd8c9..4abc38e 100644 --- a/hosts/gampo/configuration.nix +++ b/hosts/gampo/configuration.nix @@ -7,55 +7,72 @@ imports = [ inputs.sops-nix.nixosModules.sops ./hardware-configuration.nix - ./services - ../../modules/opentablet.nix - ../../modules/sops.nix - ../../modules/system.nix - ../../programs/flatpak.nix - ../../programs/hyprland.nix - ../../programs/steam.nix + # ./services + ../../system ]; + system = { + boot = { + plymouth.enable = true; + kernel = { + cpuVendor = "intel"; + package = pkgs.linuxPackages; + modules = ["i915"]; + }; + systemd-boot = true; + }; + desktop = { + hyprland.enable = true; + xserver = { + enable = true; + de = "gnome"; + }; + }; + dev.docker = { + enable = true; + podman.enable = true; + autoprune.enable = true; + }; + hardware = { + bluetooth.enable = true; + corne.allowHidAccess = true; + ibmTrackpoint.disable = true; + opentablet.enable = true; + sound.enable = true; + }; + misc.keymap = "fr-bepo"; + networking = { + hostname = "gampo"; + id = "0630b33f"; + hostFiles = [config.sops.secrets.extraHosts.path]; + }; + packages = { + appimage.enable = true; + flatpak.enable = true; + nix = { + nix-ld.enable = true; + trusted-users = ["root" "phundrak"]; + }; + }; + programs.steam.enable = true; + services = { + fwupd.enable = true; + ssh.enable = true; + }; + users = { + root.disablePassword = true; + phundrak.enable = true; + }; + }; + sops.secrets.extraHosts = { inherit (config.users.users.root) group; owner = config.users.users.phundrak.name; mode = "0440"; }; - boot.initrd.kernelModules = ["i915"]; - - system = { - boot.plymouth.enable = true; - docker = { - enable = true; - autoprune.enable = true; - podman.enable = true; - }; - networking = { - hostname = "gampo"; - id = "0630b33f"; - hostFiles = [config.sops.secrets.extraHosts.path]; - }; - sound.enable = true; - }; - - modules = { - appimage.enable = true; - hyprland.enable = true; - }; - security.rtkit.enable = true; - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - curl - openssl - wget - ]; - - nix.settings.trusted-users = ["root" "phundrak"]; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database # versions on your system were taken. It‘s perfectly fine and diff --git a/hosts/gampo/services/default.nix b/hosts/gampo/services/default.nix index dcca4dd..c2c19c3 100644 --- a/hosts/gampo/services/default.nix +++ b/hosts/gampo/services/default.nix @@ -1,7 +1,7 @@ { - imports = [ - ./gnome.nix - ]; + # imports = [ + # ./gnome.nix + # ]; services = { # Enable CUPS to print documents. diff --git a/hosts/marpa/configuration.nix b/hosts/marpa/configuration.nix index 2c63574..934995c 100644 --- a/hosts/marpa/configuration.nix +++ b/hosts/marpa/configuration.nix @@ -1,42 +1,48 @@ { config, - pkgs, inputs, ... }: { imports = [ inputs.sops-nix.nixosModules.sops ./system/hardware-configuration.nix - ./services - ../../modules/opentablet.nix - ../../modules/sops.nix - ../../modules/system.nix - ../../programs/flatpak.nix - ../../programs/hyprland.nix - ../../programs/steam.nix + ../../system ]; - sops.secrets.extraHosts = { - inherit (config.users.users.root) group; - owner = config.users.users.phundrak.name; - mode = "0440"; - }; - - security.polkit.enable = true; - - fileSystems."/games" = { - device = "/dev/disk/by-uuid/77d32db8-2e85-4593-b6b8-55d4f9d14e1a"; - fsType = "ext4"; - }; - system = { - amdgpu.enable = true; - boot.plymouth.enable = true; - docker = { + boot = { + extraModprobeConfig = '' + options snd_usb_audio vid=0x1235 pid=0x8212 device_setup=1 + ''; + plymouth.enable = true; + kernel.cpuVendor = "amd"; + systemd-boot = true; + }; + desktop = { + hyprland.enable = true; + niri.enable = true; + xserver = { + enable = true; + de = "gnome"; + }; + }; + dev.docker = { enable = true; podman.enable = true; autoprune.enable = true; }; + hardware = { + amdgpu.enable = true; + bluetooth.enable = true; + corne.allowHidAccess = true; + opentablet.enable = true; + sound = { + enable = true; + jack = true; + scarlett.enable = true; + }; + }; + misc.keymap = "fr-bepo"; networking = { hostname = "marpa"; id = "7EA4A111"; @@ -49,34 +55,45 @@ } ]; }; - sound = { - enable = true; - jack = true; + packages = { + appimage.enable = true; + flatpak.enable = true; + nix = { + nix-ld.enable = true; + trusted-users = ["root" "phundrak"]; + }; + }; + programs.steam.enable = true; + services = { + fwupd.enable = true; + printing.enable = true; + ssh.enable = true; + sunshine = { + enable = true; + autostart = true; + }; + }; + users = { + root.disablePassword = true; + phundrak.enable = true; }; }; - modules = { - appimage.enable = true; - hyprland.enable = true; + sops.secrets.extraHosts = { + inherit (config.users.users.root) group; + owner = config.users.users.phundrak.name; + mode = "0440"; }; - security.rtkit.enable = true; + security = { + polkit.enable = true; + rtkit.enable = true; + }; - nix.settings.trusted-users = ["root" "phundrak"]; - - environment.systemPackages = with pkgs; [ - clinfo # AMD - curl - openssl - wget - alsa-scarlett-gui - ]; - - boot.extraModprobeConfig = '' - options snd_usb_audio vid=0x1235 pid=0x8212 device_setup=1 - ''; - - programs.nix-ld.enable = true; + fileSystems."/games" = { + device = "/dev/disk/by-uuid/77d32db8-2e85-4593-b6b8-55d4f9d14e1a"; + fsType = "ext4"; + }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/hosts/marpa/services/default.nix b/hosts/marpa/services/default.nix index 4a279fb..a15e5a1 100644 --- a/hosts/marpa/services/default.nix +++ b/hosts/marpa/services/default.nix @@ -1,25 +1,24 @@ { - imports = [ - ./logind.nix - ../../../modules/ssh.nix - ../../../modules/sunshine.nix - ../../../modules/xserver.nix - ]; + # imports = [ + # ./logind.nix + # ../../../system + # ]; + # imports = [ + # ./logind.nix + # ../../../modules/ssh.nix + # ../../../modules/sunshine.nix + # ]; - modules = { - sunshine = { - enable = true; - autostart = true; - }; - xserver = { - amdgpu.enable = true; - de = "gnome"; - }; - }; - services = { - blueman.enable = true; - fwupd.enable = true; - printing.enable = true; - openssh.enable = true; - }; + # modules = { + # sunshine = { + # enable = true; + # autostart = true; + # }; + # }; + # services = { + # blueman.enable = true; + # fwupd.enable = true; + # printing.enable = true; + # openssh.enable = true; + # }; } diff --git a/hosts/tilo/configuration.nix b/hosts/tilo/configuration.nix index 91a096c..aa5b015 100644 --- a/hosts/tilo/configuration.nix +++ b/hosts/tilo/configuration.nix @@ -1,24 +1,15 @@ # Edit this configuration file to define what should be installed on your # system. Help is available in the configuration.nix(5) man page and in # the NixOS manual (accessible by running ‘nixos-help’). -{ - pkgs, - inputs, - ... -}: { +{inputs, ...}: { imports = [ ./hardware-configuration.nix inputs.home-manager.nixosModules.default - ../../modules/locale.nix - ../../modules/system.nix - ../../modules/ssh.nix - ../../modules/endlessh.nix - ../../programs/nano.nix + ../../system ./services ]; system = { - amdgpu.enable = false; boot = { kernel = { hardened = true; @@ -29,16 +20,15 @@ pools = ["tank"]; }; }; - docker.enable = true; + dev.docker.enable = true; + misc.keymap = "fr-bepo"; networking = { hostname = "tilo"; id = "7110b33f"; firewall = { openPorts = [ - 22 # SSH 80 # HTTP 443 # HTTPS - 2222 # endlessh 25565 # Minecraft ]; extraCommands = '' @@ -47,28 +37,24 @@ ''; }; }; - nix.gc.automatic = true; - sound.enable = false; + packages.nix = { + gc.automatic = true; + trusted-users = ["root" "phundrak"]; + }; + services = { + endlessh.enable = true; + ssh = { + enable = true; + allowedUsers = ["phundrak"]; + passwordAuthentication = false; + }; + }; users = { root.disablePassword = true; - phundrak = true; + phundrak.enable = true; }; - console.keyMap = "fr-bepo"; }; - modules = { - ssh = { - enable = true; - allowedUsers = ["phundrak"]; - passwordAuthentication = false; - }; - endlessh.enable = true; - }; - - nixpkgs.config.allowUnfree = true; - - environment.systemPackages = [pkgs.openssl]; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/modules/opentablet.nix b/modules/opentablet.nix deleted file mode 100644 index d4cae11..0000000 --- a/modules/opentablet.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - hardware.opentabletdriver = { - enable = true; - daemon.enable = true; - }; -} diff --git a/modules/system.nix b/modules/system.nix deleted file mode 100644 index 234d73d..0000000 --- a/modules/system.nix +++ /dev/null @@ -1,183 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -with lib; let - cfg = config.system; -in { - imports = [ - ./amdgpu.nix - ./appimage.nix - ./boot.nix - ./locale.nix - ./networking.nix - ./nix.nix - ./plymouth.nix - ./sound.nix - ./users.nix - ./dev/docker.nix - ]; - - options.system = with types; { - amdgpu.enable = mkEnableOption "Enables AMD GPU support"; - boot = { - kernel = { - package = mkOption { - type = raw; - default = pkgs.linuxPackages_zen; - }; - modules = mkOption { - type = listOf str; - default = []; - }; - cpuVendor = mkOption { - description = "Intel or AMD?"; - type = enum ["intel" "amd"]; - default = "amd"; - }; - v4l2loopback = mkOption { - description = "Enables v4l2loopback"; - type = bool; - default = true; - }; - hardened = mkEnableOption "Enables hardened Linux kernel"; - }; - systemd-boot = mkOption { - type = types.bool; - default = true; - description = "Does the system use systemd-boot?"; - }; - plymouth.enable = mkEnableOption "Enables Plymouth"; - zfs = { - enable = mkEnableOption "Enables ZFS"; - pools = mkOption { - type = listOf str; - default = []; - }; - }; - }; - docker = { - enable = mkEnableOption "Enable Docker"; - podman.enable = mkEnableOption "Enable Podman rather than Docker"; - nvidia.enable = mkEnableOption "Activate Nvidia support"; - autoprune.enable = mkEnableOption "Enable autoprune"; - }; - networking = { - hostname = mkOption { - type = str; - example = "gampo"; - }; - id = mkOption { - type = str; - example = "deadb33f"; - }; - domain = mkOption { - type = nullOr str; - example = "phundrak.com"; - default = null; - }; - hostFiles = mkOption { - type = listOf path; - example = [/path/to/hostFile]; - default = []; - }; - firewall = { - openPorts = mkOption { - type = listOf int; - example = [22 80 443]; - default = []; - }; - openPortRanges = mkOption { - type = listOf (attrsOf port); - default = []; - example = [ - { - from = 8080; - to = 8082; - } - ]; - description = '' - A range of TCP and UDP ports on which incoming connections are - accepted. - ''; - }; - extraCommands = mkOption { - type = nullOr lines; - example = "iptables -A INPUTS -p icmp -j ACCEPT"; - default = null; - }; - }; - }; - nix = { - disableSandbox = mkOption { - type = bool; - default = false; - }; - gc = { - automatic = mkOption { - type = bool; - default = true; - }; - dates = mkOption { - type = str; - default = "Monday 01:00 UTC"; - }; - options = mkOption { - type = str; - default = "--delete-older-than 30d"; - }; - }; - }; - sound = { - enable = mkEnableOption "Whether to enable sounds with Pipewire"; - alsa = mkOption { - type = bool; - example = true; - default = true; - description = "Whether to enable ALSA support with Pipewire"; - }; - jack = mkOption { - type = bool; - example = true; - default = false; - description = "Whether to enable JACK support with Pipewire"; - }; - package = mkOption { - type = package; - example = pkgs.pulseaudio; - default = pkgs.pulseaudioFull; - description = "Which base package to use for PulseAudio"; - }; - }; - users = { - root.disablePassword = mkEnableOption "Disables root password"; - phundrak = mkOption { - type = bool; - default = true; - }; - }; - timezone = mkOption { - type = str; - default = "Europe/Paris"; - }; - console.keyMap = mkOption { - type = str; - default = "fr"; - }; - }; - - config = { - boot.tmp.cleanOnBoot = true; - time.timeZone = cfg.timezone; - console.keyMap = cfg.console.keyMap; - modules = { - boot = { - inherit (cfg) amdgpu; - inherit (cfg.boot) kernel systemd-boot plymouth zfs; - }; - inherit (cfg) sound users networking docker amdgpu; - }; - }; -} diff --git a/programs/steam.nix b/programs/steam.nix deleted file mode 100644 index 2e54553..0000000 --- a/programs/steam.nix +++ /dev/null @@ -1,21 +0,0 @@ -{pkgs, ...}: { - programs = { - steam = { - enable = true; - protontricks.enable = true; - remotePlay.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - gamescopeSession.enable = true; - extraCompatPackages = [pkgs.proton-ge-bin]; - }; - gamescope = { - enable = true; - capSysNice = true; - args = [ - "--rt" - "--expose-wayland" - ]; - }; - }; - hardware.steam-hardware.enable = true; -} diff --git a/modules/boot.nix b/system/boot/boot.nix similarity index 89% rename from modules/boot.nix rename to system/boot/boot.nix index 28b3b1d..ac08b6a 100644 --- a/modules/boot.nix +++ b/system/boot/boot.nix @@ -5,10 +5,16 @@ ... }: with lib; let - cfg = config.modules.boot; + cfg = config.system.boot; in { - options.modules.boot = { - amdgpu.enable = mkEnableOption "Enables an AMD GPU configuration"; + options.system.boot = { + extraModprobeConfig = mkOption { + type = types.lines; + default = ""; + example = '' + options snd_usb_audio vid=0x1235 pid=0x8212 device_setup=1 + ''; + }; kernel = { package = mkOption { type = types.raw; @@ -45,7 +51,7 @@ in { }; config.boot = { - initrd.kernelModules = lists.optional cfg.amdgpu.enable "amdgpu"; + initrd.kernelModules = lists.optional config.system.hardware.amdgpu.enable "amdgpu"; loader = { systemd-boot.enable = cfg.systemd-boot; efi.canTouchEfiVariables = cfg.systemd-boot; diff --git a/system/boot/default.nix b/system/boot/default.nix new file mode 100644 index 0000000..f3b4823 --- /dev/null +++ b/system/boot/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./boot.nix + ./plymouth.nix + ./zram.nix + ]; +} diff --git a/modules/plymouth.nix b/system/boot/plymouth.nix similarity index 82% rename from modules/plymouth.nix rename to system/boot/plymouth.nix index 744665d..84af272 100644 --- a/modules/plymouth.nix +++ b/system/boot/plymouth.nix @@ -5,9 +5,9 @@ ... }: with lib; let - cfg = config.modules.boot.plymouth; + cfg = config.system.boot.plymouth; in { - options.modules.boot.plymouth.enable = mkEnableOption "Enables Plymouth at system boot"; + options.system.boot.plymouth.enable = mkEnableOption "Enables Plymouth at system boot"; config.boot = mkIf cfg.enable { plymouth = { inherit (cfg) enable; diff --git a/system/boot/zram.nix b/system/boot/zram.nix new file mode 100644 index 0000000..23856f0 --- /dev/null +++ b/system/boot/zram.nix @@ -0,0 +1,21 @@ +{ + lib, + config, + ... +}: +with lib; let + cfg = config.system.boot.zram; +in { + options.system.boot.zram = { + enable = mkEnableOption "Enable ZRAM"; + memoryMax = mkOption { + type = types.int; + example = "512"; + description = "Maximum size allocated to ZRAM in MiB"; + }; + }; + config.zramSwap = mkIf cfg.enable { + inherit (cfg) enable; + memoryMax = cfg.memoryMax * 1024 * 1024; + }; +} diff --git a/system/default.nix b/system/default.nix new file mode 100644 index 0000000..99a3608 --- /dev/null +++ b/system/default.nix @@ -0,0 +1,40 @@ +{ + lib, + config, + ... +}: +with lib; let + cfg = config.system.misc; +in { + imports = [ + ./boot + ./desktop + ./dev + ./hardware + ./i18n + ./network + ./packages + ./security + ./services + ./users + ]; + + options.system.misc = { + timezone = mkOption { + type = types.str; + default = "Europe/Paris"; + }; + keymap = mkOption { + type = types.str; + default = "fr"; + example = "fr-bepo"; + description = "Keymap to use in the TTY console"; + }; + }; + + config = { + boot.tmp.cleanOnBoot = true; + time.timeZone = cfg.timezone; + console.keyMap = cfg.keymap; + }; +} diff --git a/system/desktop/default.nix b/system/desktop/default.nix new file mode 100644 index 0000000..4313f86 --- /dev/null +++ b/system/desktop/default.nix @@ -0,0 +1,3 @@ +{ + imports = [./hyprland.nix ./niri.nix ./xserver.nix]; +} diff --git a/programs/hyprland.nix b/system/desktop/hyprland.nix similarity index 55% rename from programs/hyprland.nix rename to system/desktop/hyprland.nix index e4e00ce..b2d5613 100644 --- a/programs/hyprland.nix +++ b/system/desktop/hyprland.nix @@ -4,9 +4,9 @@ ... }: with lib; let - cfg = config.modules.hyprland; + cfg = config.system.desktop.hyprland; in { - options.modules.hyprland.enable = mkEnableOption "Enables Hyprland"; + options.system.desktop.hyprland.enable = mkEnableOption "Enables Hyprland"; config.programs.hyprland = mkIf cfg.enable { inherit (cfg) enable; withUWSM = true; diff --git a/system/desktop/niri.nix b/system/desktop/niri.nix new file mode 100644 index 0000000..d1ccdc6 --- /dev/null +++ b/system/desktop/niri.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.system.desktop.niri; +in { + options.system.desktop.niri.enable = mkEnableOption "Enables Niri"; + config.programs.niri = mkIf cfg.enable { + inherit (cfg) enable; + }; +} diff --git a/modules/xserver.nix b/system/desktop/xserver.nix similarity index 74% rename from modules/xserver.nix rename to system/desktop/xserver.nix index ef635b3..1dabe41 100644 --- a/modules/xserver.nix +++ b/system/desktop/xserver.nix @@ -4,10 +4,10 @@ ... }: with lib; let - cfg = config.modules.xserver; + cfg = config.system.desktop.xserver; in { - options.modules.xserver = { - amdgpu.enable = mkEnableOption "Enables AMD GPU support"; + options.system.desktop.xserver = { + enable = mkEnableOption "Enables xserver"; de = mkOption { type = types.enum ["gnome" "kde"]; default = "gnome"; @@ -15,7 +15,7 @@ in { description = "Which DE to enable"; }; }; - config.services = { + config.services = mkIf cfg.enable { displayManager = { sddm.enable = mkIf (cfg.de == "kde") true; gdm.enable = mkIf (cfg.de == "gnome") true; @@ -34,8 +34,8 @@ in { }; xserver = { - enable = true; - videoDrivers = lists.optional cfg.amdgpu.enable "amdgpu"; + inherit (cfg) enable; + videoDrivers = lists.optional config.system.hardware.amdgpu.enable "amdgpu"; xkb = { layout = "fr"; variant = "bepo_afnor"; diff --git a/system/dev/default.nix b/system/dev/default.nix new file mode 100644 index 0000000..209a9d0 --- /dev/null +++ b/system/dev/default.nix @@ -0,0 +1,3 @@ +{ + imports = [./docker.nix]; +} diff --git a/modules/dev/docker.nix b/system/dev/docker.nix similarity index 92% rename from modules/dev/docker.nix rename to system/dev/docker.nix index 23f42ae..4a058c6 100644 --- a/modules/dev/docker.nix +++ b/system/dev/docker.nix @@ -4,9 +4,9 @@ ... }: with lib; let - cfg = config.modules.docker; + cfg = config.system.dev.docker; in { - options.modules.docker = { + options.system.dev.docker = { enable = mkEnableOption "Enable Docker"; podman.enable = mkEnableOption "Enable Podman rather than Docker"; nvidia.enable = mkEnableOption "Activate Nvidia support"; diff --git a/modules/amdgpu.nix b/system/hardware/amdgpu.nix similarity index 53% rename from modules/amdgpu.nix rename to system/hardware/amdgpu.nix index a2a86a2..8464f13 100644 --- a/modules/amdgpu.nix +++ b/system/hardware/amdgpu.nix @@ -5,13 +5,18 @@ ... }: with lib; let - cfg = config.modules.amdgpu; + cfg = config.system.hardware.amdgpu; in { - options.modules.amdgpu.enable = mkEnableOption "Enables an AMD GPU configuration"; + options.system.hardware.amdgpu.enable = mkEnableOption "Enables an AMD GPU configuration"; config = mkIf cfg.enable { systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ]; hardware.graphics.extraPackages = with pkgs; [rocmPackages.clr.icd]; + environment.systemPackages = with pkgs; [ + clinfo + amdgpu_top + nvtopPackages.amd + ]; }; } diff --git a/system/hardware/bluetooth.nix b/system/hardware/bluetooth.nix new file mode 100644 index 0000000..276410f --- /dev/null +++ b/system/hardware/bluetooth.nix @@ -0,0 +1,14 @@ +{ + lib, + config, + ... +}: +with lib; let + cfg = config.system.hardware.bluetooth; +in { + options.system.hardware.bluetooth.enable = mkEnableOption "Enable bluetooth"; + config = mkIf cfg.enable { + hardware.bluetooth.enable = cfg.enable; + services.blueman.enable = cfg.enable; + }; +} diff --git a/system/hardware/corne.nix b/system/hardware/corne.nix new file mode 100644 index 0000000..4f0e095 --- /dev/null +++ b/system/hardware/corne.nix @@ -0,0 +1,15 @@ +{ + lib, + config, + ... +}: +with lib; let + cfg = config.system.hardware.corne; +in { + options.system.hardware.corne.allowHidAccess = mkEnableOption "Enable HID access to the corne keyboard"; + config.services.udev = mkIf cfg.allowHidAccess { + extraRules = '' + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" + ''; + }; +} diff --git a/system/hardware/default.nix b/system/hardware/default.nix new file mode 100644 index 0000000..eb0bf6d --- /dev/null +++ b/system/hardware/default.nix @@ -0,0 +1,10 @@ +{ + imports = [ + ./amdgpu.nix + ./bluetooth.nix + ./corne.nix + ./ibm-trackpoint.nix + ./opentablet.nix + ./sound.nix + ]; +} diff --git a/system/hardware/ibm-trackpoint.nix b/system/hardware/ibm-trackpoint.nix new file mode 100644 index 0000000..e54887e --- /dev/null +++ b/system/hardware/ibm-trackpoint.nix @@ -0,0 +1,15 @@ +{ + lib, + config, + ... +}: +with lib; let + cfg = config.system.hardware.ibmTrackpoint; +in { + options.system.hardware.ibmTrackpoint.disable = mkEnableOption "Disable IBM’s trackpoint on ThinkPad"; + config.services.udev = mkIf cfg.disable { + extraRules = '' + ATTRS{name}=="*TPPS/2 IBM TrackPoint", ENV{ID_INPUT}="", ENV{ID_INPUT_MOUSE}="", ENV{ID_INPUT_POINTINGSTICK}="" + ''; + }; +} diff --git a/system/hardware/opentablet.nix b/system/hardware/opentablet.nix new file mode 100644 index 0000000..c150118 --- /dev/null +++ b/system/hardware/opentablet.nix @@ -0,0 +1,14 @@ +{ + lib, + config, + ... +}: +with lib; let + cfg = config.system.hardware.opentablet; +in { + options.system.hardware.opentablet.enable = mkEnableOption "Enables OpenTablet drivers"; + config.hardware.opentabletdriver = mkIf cfg.enable { + inherit (cfg) enable; + daemon.enable = true; + }; +} diff --git a/modules/sound.nix b/system/hardware/sound.nix similarity index 59% rename from modules/sound.nix rename to system/hardware/sound.nix index 1d973a7..148b8b7 100644 --- a/modules/sound.nix +++ b/system/hardware/sound.nix @@ -5,10 +5,11 @@ ... }: with lib; let - cfg = config.modules.sound; + cfg = config.system.hardware.sound; in { - options.modules.sound = { + options.system.hardware.sound = { enable = mkEnableOption "Whether to enable sounds with Pipewire"; + scarlett.enable = mkEnableOption "Activate support for Scarlett sound card"; alsa = mkOption { type = types.bool; example = true; @@ -29,12 +30,15 @@ in { }; }; - config.services.pipewire = mkIf cfg.enable { - enable = true; - alsa = mkIf cfg.alsa { - enable = mkDefault true; - support32Bit = mkDefault true; + config = { + environment.systemPackages = mkIf cfg.scarlett.enable [pkgs.alsa-scarlett-gui]; + services.pipewire = mkIf cfg.enable { + enable = true; + alsa = mkIf cfg.alsa { + enable = mkDefault true; + support32Bit = mkDefault true; + }; + jack.enable = mkDefault cfg.jack; }; - jack.enable = mkDefault cfg.jack; }; } diff --git a/system/i18n/default.nix b/system/i18n/default.nix new file mode 100644 index 0000000..68dfb9d --- /dev/null +++ b/system/i18n/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./locale.nix + ]; +} diff --git a/modules/locale.nix b/system/i18n/locale.nix similarity index 100% rename from modules/locale.nix rename to system/i18n/locale.nix diff --git a/system/network/default.nix b/system/network/default.nix new file mode 100644 index 0000000..3bc3069 --- /dev/null +++ b/system/network/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./networking.nix + ]; +} diff --git a/modules/networking.nix b/system/network/networking.nix similarity index 95% rename from modules/networking.nix rename to system/network/networking.nix index 97d8269..dd45906 100644 --- a/modules/networking.nix +++ b/system/network/networking.nix @@ -4,9 +4,9 @@ ... }: with lib; let - cfg = config.modules.networking; + cfg = config.system.networking; in { - options.modules.networking = with types; { + options.system.networking = with types; { hostname = mkOption { type = str; example = "gampo"; diff --git a/modules/appimage.nix b/system/packages/appimage.nix similarity index 53% rename from modules/appimage.nix rename to system/packages/appimage.nix index 3cc4800..b3f4f05 100644 --- a/modules/appimage.nix +++ b/system/packages/appimage.nix @@ -4,9 +4,9 @@ ... }: with lib; let - cfg = config.modules.appimage; + cfg = config.system.packages.appimage; in { - options.modules.appimage.enable = mkEnableOption "Enables AppImage support"; + options.system.packages.appimage.enable = mkEnableOption "Enables AppImage support"; config.programs.appimage = mkIf cfg.enable { inherit (cfg) enable; binfmt = true; diff --git a/system/packages/default.nix b/system/packages/default.nix new file mode 100644 index 0000000..2bfb604 --- /dev/null +++ b/system/packages/default.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + imports = [ + ./appimage.nix + ./flatpak.nix + ./nano.nix + ./nix.nix + ./steam.nix + ]; + + environment.systemPackages = with pkgs; [ + curl + openssl + wget + ]; +} diff --git a/system/packages/flatpak.nix b/system/packages/flatpak.nix new file mode 100644 index 0000000..ebd3efc --- /dev/null +++ b/system/packages/flatpak.nix @@ -0,0 +1,22 @@ +{ + pkgs, + lib, + config, + ... +}: +with lib; let + cfg = config.system.packages.flatpak; +in { + options.system.packages.flatpak = { + enable = mkEnableOption "Enable Flatpak support"; + builder.enable = mkEnableOption "Enable Flatpak builder"; + }; + config = { + services.flatpak = mkIf cfg.enable { + inherit (cfg) enable; + }; + environment.systemPackages = mkIf cfg.builder.enable [ + pkgs.flatpak-buildR + ]; + }; +} diff --git a/programs/nano.nix b/system/packages/nano.nix similarity index 100% rename from programs/nano.nix rename to system/packages/nano.nix diff --git a/modules/nix.nix b/system/packages/nix.nix similarity index 56% rename from modules/nix.nix rename to system/packages/nix.nix index 831e8ee..5413222 100644 --- a/modules/nix.nix +++ b/system/packages/nix.nix @@ -4,10 +4,11 @@ ... }: with lib; let - cfg = config.modules.nix; + cfg = config.system.packages.nix; in { - options.modules.nix = { - disableSandbox = mkEnableOption "Disables Nix sandbox"; + options.system.packages.nix = { + allowUnfree = mkEnableOption "Enable unfree packages"; + disableSandbox = mkEnableOption "Disable Nix sandbox"; gc = { automatic = mkOption { type = types.bool; @@ -22,17 +23,27 @@ in { default = "--delete-older-than 30d"; }; }; + nix-ld.enable = mkEnableOption "Enable unpatched binaries support"; + trusted-users = mkOption { + type = types.listOf types.str; + example = ["alice" "bob"]; + default = []; + }; }; config = { nix = { + inherit (cfg) gc; settings = { + inherit (cfg) trusted-users; sandbox = cfg.disableSandbox; experimental-features = ["nix-command" "flakes"]; auto-optimise-store = true; }; - inherit (cfg) gc; }; nixpkgs.config.allowUnfree = true; + programs = { + inherit (cfg) nix-ld; + }; }; } diff --git a/system/packages/steam.nix b/system/packages/steam.nix new file mode 100644 index 0000000..f63cdf6 --- /dev/null +++ b/system/packages/steam.nix @@ -0,0 +1,34 @@ +{ + pkgs, + lib, + config, + ... +}: +with lib; let + cfg = config.system.programs.steam; +in { + options.system.programs.steam.enable = mkEnableOption "Enables Steam and Steam hardware"; + config = mkIf cfg.enable { + programs = { + steam = { + inherit (cfg) enable; + protontricks.enable = true; + remotePlay.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + gamescopeSession.enable = true; + extraCompatPackages = [pkgs.proton-ge-bin]; + }; + gamescope = { + enable = true; + capSysNice = true; + args = [ + "--rt" + "--expose-wayland" + ]; + }; + }; + hardware.steam-hardware = { + inherit (cfg) enable; + }; + }; +} diff --git a/system/security/default.nix b/system/security/default.nix new file mode 100644 index 0000000..7c110d7 --- /dev/null +++ b/system/security/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./sops.nix + ]; +} diff --git a/modules/sops.nix b/system/security/sops.nix similarity index 90% rename from modules/sops.nix rename to system/security/sops.nix index 4f825ab..34fd996 100644 --- a/modules/sops.nix +++ b/system/security/sops.nix @@ -1,6 +1,6 @@ { sops = { - defaultSopsFile = ../secrets/secrets.yaml; + defaultSopsFile = ../../secrets/secrets.yaml; defaultSopsFormat = "yaml"; age = { # automatically import user SSH keys as age keys diff --git a/system/services/default.nix b/system/services/default.nix new file mode 100644 index 0000000..1b7c892 --- /dev/null +++ b/system/services/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./endlessh.nix + ./fwupd.nix + ./printing.nix + ./ssh.nix + ./sunshine.nix + ]; +} diff --git a/modules/endlessh.nix b/system/services/endlessh.nix similarity index 79% rename from modules/endlessh.nix rename to system/services/endlessh.nix index ceadac6..925606e 100644 --- a/modules/endlessh.nix +++ b/system/services/endlessh.nix @@ -4,9 +4,9 @@ ... }: with lib; let - cfg = config.modules.endlessh; + cfg = config.system.services.endlessh; in { - options.modules.endlessh = { + options.system.services.endlessh = { enable = mkEnableOption "Enables endlessh."; port = mkOption { type = types.port; diff --git a/system/services/fwupd.nix b/system/services/fwupd.nix new file mode 100644 index 0000000..d11d76d --- /dev/null +++ b/system/services/fwupd.nix @@ -0,0 +1,13 @@ +{ + lib, + config, + ... +}: +with lib; let + cfg = config.system.services.fwupd; +in { + options.system.services.fwupd.enable = mkEnableOption "Enable fwupd"; + config.services.fwupd = mkIf cfg.enable { + inherit (cfg) enable; + }; +} diff --git a/system/services/printing.nix b/system/services/printing.nix new file mode 100644 index 0000000..85babd9 --- /dev/null +++ b/system/services/printing.nix @@ -0,0 +1,13 @@ +{ + lib, + config, + ... +}: +with lib; let + cfg = config.system.services.printing; +in { + options.system.services.printing.enable = mkEnableOption "Enable printing with CUPS"; + config.services.printing = mkIf cfg.enable { + inherit (cfg) enable; + }; +} diff --git a/modules/ssh.nix b/system/services/ssh.nix similarity index 85% rename from modules/ssh.nix rename to system/services/ssh.nix index 550c863..264b6f2 100644 --- a/modules/ssh.nix +++ b/system/services/ssh.nix @@ -4,9 +4,9 @@ ... }: with lib; let - cfg = config.modules.ssh; + cfg = config.system.services.ssh; in { - options.modules.ssh = { + options.system.services.ssh = { enable = mkEnableOption "Enables OpenSSH"; allowedUsers = mkOption { type = types.listOf types.str; @@ -20,7 +20,7 @@ in { }; }; config.services.openssh = mkIf cfg.enable { - enable = true; + inherit (cfg) enable; settings = { AllowUsers = cfg.allowedUsers; PermitRootLogin = "no"; diff --git a/modules/sunshine.nix b/system/services/sunshine.nix similarity index 52% rename from modules/sunshine.nix rename to system/services/sunshine.nix index 0d7edef..8e7cd9e 100644 --- a/modules/sunshine.nix +++ b/system/services/sunshine.nix @@ -4,19 +4,17 @@ ... }: with lib; let - cfg = config.modules.sunshine; + cfg = config.system.services.sunshine; in { - options.modules.sunshine = { - enable = mkEnableOption "Enables moonlight"; + options.system.services.sunshine = { + enable = mkEnableOption "Enables Sunshine"; autostart = mkEnableOption "Enables autostart"; }; config.services.sunshine = mkIf cfg.enable { - enable = true; + inherit (cfg) enable; autoStart = cfg.autostart; capSysAdmin = true; openFirewall = true; - settings = { - sunshine_name = "marpa"; - }; + settings.sunshine_name = config.system.networking.hostname; }; } diff --git a/system/users/default.nix b/system/users/default.nix new file mode 100644 index 0000000..5326e0e --- /dev/null +++ b/system/users/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./phundrak.nix + ]; +} diff --git a/modules/keys/id_alys.pub b/system/users/keys/id_alys.pub similarity index 63% rename from modules/keys/id_alys.pub rename to system/users/keys/id_alys.pub index a145236..51469fc 100644 --- a/modules/keys/id_alys.pub +++ b/system/users/keys/id_alys.pub @@ -1 +1 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHTv1lb6d99O84jeh6GdjPm8Gnt/HncSRhGhmoTq7BMK lucien@phundrak.com \ No newline at end of file +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHTv1lb6d99O84jeh6GdjPm8Gnt/HncSRhGhmoTq7BMK lucien@phundrak.com diff --git a/modules/keys/id_gampo.pub b/system/users/keys/id_gampo.pub similarity index 100% rename from modules/keys/id_gampo.pub rename to system/users/keys/id_gampo.pub diff --git a/modules/keys/id_marpa.pub b/system/users/keys/id_marpa.pub similarity index 100% rename from modules/keys/id_marpa.pub rename to system/users/keys/id_marpa.pub diff --git a/modules/keys/id_opn4.pub b/system/users/keys/id_opn4.pub similarity index 100% rename from modules/keys/id_opn4.pub rename to system/users/keys/id_opn4.pub diff --git a/modules/keys/id_tilo.pub b/system/users/keys/id_tilo.pub similarity index 100% rename from modules/keys/id_tilo.pub rename to system/users/keys/id_tilo.pub diff --git a/modules/users.nix b/system/users/phundrak.nix similarity index 78% rename from modules/users.nix rename to system/users/phundrak.nix index f21de52..8d33dca 100644 --- a/modules/users.nix +++ b/system/users/phundrak.nix @@ -5,14 +5,11 @@ ... }: with lib; let - cfg = config.modules.users; + cfg = config.system.users; in { - options.modules.users = { + options.system.users = { root.disablePassword = mkEnableOption "Disables root password"; - phundrak = mkOption { - type = types.bool; - default = true; - }; + phundrak.enable = mkEnableOption "Enables users phundrak"; }; config = { @@ -21,7 +18,7 @@ in { hashedPassword = mkIf cfg.root.disablePassword "*"; shell = pkgs.zsh; }; - phundrak = { + phundrak = mkIf cfg.phundrak.enable { isNormalUser = true; description = "Lucien Cartier-Tilet"; extraGroups = ["networkmanager" "wheel" "docker" "dialout" "podman"]; diff --git a/programs/flatpak.nix b/users/modules/flatpak.nix similarity index 100% rename from programs/flatpak.nix rename to users/modules/flatpak.nix diff --git a/users/phundrak/home.nix b/users/phundrak/home.nix index c2c5b1f..377682f 100644 --- a/users/phundrak/home.nix +++ b/users/phundrak/home.nix @@ -8,18 +8,7 @@ ./light-home.nix ./packages.nix ./email.nix - ../modules/emacs.nix - ../modules/emoji.nix - ../modules/hyprland.nix - ../modules/kdeconnect.nix - ../modules/kitty.nix - ../modules/mbsync.nix - ../modules/mpd.nix - ../modules/mpv.nix - ../modules/ollama.nix - ../modules/qt.nix - ../modules/wofi.nix - ../modules/yt-dlp.nix + ../modules ]; config = let diff --git a/users/phundrak/programs.nix b/users/phundrak/programs.nix index d0aa138..0960f36 100644 --- a/users/phundrak/programs.nix +++ b/users/phundrak/programs.nix @@ -1,12 +1,12 @@ { - imports = [ - ../modules/emacs.nix - ../modules/kdeconnect.nix - ../modules/kitty.nix - ../modules/mbsync.nix - ../modules/mpd.nix - ../modules/mpv.nix - ../modules/wofi.nix - ../modules/yt-dlp.nix - ]; + modules = { + emacs.enable = true; + kdeconnect.enable = true; + kitty.enable = true; + mbsync.enable = true; + mpd.enable = true; + mpv.enable = true; + wofi.enable = true; + yt-dlp.enable = true; + }; }