From 3ff532f9e55bb6141ec4c5f5f21703bc8e89d262 Mon Sep 17 00:00:00 2001 From: moons-14 Date: Sat, 30 May 2026 23:37:40 +0900 Subject: [PATCH] fix --- modules/applications/default.nix | 3 +- modules/applications/java.nix | 21 ------------ modules/applications/java/default.nix | 25 ++++++++++++++ modules/applications/java/home.nix | 23 +++++++++++++ modules/applications/java/system.nix | 27 +++++++++++++++ modules/applications/slack.nix | 26 ++++++++++++++ modules/default.nix | 1 + modules/features/application/browser.nix | 13 +++++++ .../features/application/communication.nix | 17 ++++++++++ modules/features/application/default.nix | 6 ++++ modules/features/boot/default.nix | 7 ++++ modules/features/boot/power.nix | 13 +++++++ modules/features/boot/secure-boot.nix | 13 +++++++ modules/features/boot/uefi.nix | 13 +++++++ modules/features/cli/base.nix | 34 +++++++++++++++++++ modules/features/cli/default.nix | 7 ++++ modules/features/cli/interactive.nix | 25 ++++++++++++++ modules/features/cli/shell.nix | 13 +++++++ modules/features/connect/bluetooth.nix | 13 +++++++ modules/features/connect/default.nix | 6 ++++ modules/features/connect/wifi.nix | 13 +++++++ modules/features/default.nix | 14 ++++++++ modules/features/dev/agent.nix | 13 +++++++ modules/features/dev/bun.nix | 20 +++++++++++ modules/features/dev/default.nix | 9 +++++ modules/features/dev/java.nix | 13 +++++++ modules/features/dev/nix.nix | 20 +++++++++++ modules/features/dev/python.nix | 21 ++++++++++++ modules/features/gui/audio.nix | 13 +++++++ modules/features/gui/camera.nix | 13 +++++++ modules/features/gui/capture.nix | 22 ++++++++++++ modules/features/gui/default.nix | 13 +++++++ modules/features/gui/desktop.nix | 25 ++++++++++++++ modules/features/gui/editor.nix | 13 +++++++ modules/features/gui/file-manager.nix | 13 +++++++ modules/features/gui/graphic.nix | 13 +++++++ modules/features/gui/jp-input.nix | 13 +++++++ modules/features/gui/terminal.nix | 22 ++++++++++++ modules/features/identity/default.nix | 6 ++++ modules/features/identity/fingerprint.nix | 13 +++++++ modules/features/identity/ssh-default-key.nix | 31 +++++++++++++++++ modules/features/network/default.nix | 5 +++ modules/features/network/tailscale.nix | 31 +++++++++++++++++ modules/features/services/container.nix | 13 +++++++ modules/features/services/default.nix | 6 ++++ modules/features/services/kde.nix | 13 +++++++ modules/features/storage/default.nix | 5 +++ modules/features/storage/nfs-client.nix | 13 +++++++ modules/system/secure-boot.nix | 5 +++ profiles/cli-minimal.nix | 7 ---- profiles/gui.nix | 7 ---- profiles/interfaces/cli-interactive.nix | 0 profiles/interfaces/cli-minimal.nix | 0 profiles/interfaces/gui.nix | 0 profiles/platforms/desktop.nix | 0 profiles/platforms/laptop.nix | 0 profiles/platforms/thinkpad.nix | 0 profiles/platforms/vm.nix | 0 profiles/workloads/dev.nix | 0 profiles/workloads/ops.nix | 0 profiles/workloads/srv.nix | 0 61 files changed, 708 insertions(+), 36 deletions(-) delete mode 100644 modules/applications/java.nix create mode 100644 modules/applications/java/default.nix create mode 100644 modules/applications/java/home.nix create mode 100644 modules/applications/java/system.nix create mode 100644 modules/applications/slack.nix create mode 100644 modules/features/application/browser.nix create mode 100644 modules/features/application/communication.nix create mode 100644 modules/features/application/default.nix create mode 100644 modules/features/boot/default.nix create mode 100644 modules/features/boot/power.nix create mode 100644 modules/features/boot/secure-boot.nix create mode 100644 modules/features/boot/uefi.nix create mode 100644 modules/features/cli/base.nix create mode 100644 modules/features/cli/default.nix create mode 100644 modules/features/cli/interactive.nix create mode 100644 modules/features/cli/shell.nix create mode 100644 modules/features/connect/bluetooth.nix create mode 100644 modules/features/connect/default.nix create mode 100644 modules/features/connect/wifi.nix create mode 100644 modules/features/default.nix create mode 100644 modules/features/dev/agent.nix create mode 100644 modules/features/dev/bun.nix create mode 100644 modules/features/dev/default.nix create mode 100644 modules/features/dev/java.nix create mode 100644 modules/features/dev/nix.nix create mode 100644 modules/features/dev/python.nix create mode 100644 modules/features/gui/audio.nix create mode 100644 modules/features/gui/camera.nix create mode 100644 modules/features/gui/capture.nix create mode 100644 modules/features/gui/default.nix create mode 100644 modules/features/gui/desktop.nix create mode 100644 modules/features/gui/editor.nix create mode 100644 modules/features/gui/file-manager.nix create mode 100644 modules/features/gui/graphic.nix create mode 100644 modules/features/gui/jp-input.nix create mode 100644 modules/features/gui/terminal.nix create mode 100644 modules/features/identity/default.nix create mode 100644 modules/features/identity/fingerprint.nix create mode 100644 modules/features/identity/ssh-default-key.nix create mode 100644 modules/features/network/default.nix create mode 100644 modules/features/network/tailscale.nix create mode 100644 modules/features/services/container.nix create mode 100644 modules/features/services/default.nix create mode 100644 modules/features/services/kde.nix create mode 100644 modules/features/storage/default.nix create mode 100644 modules/features/storage/nfs-client.nix create mode 100644 profiles/interfaces/cli-interactive.nix create mode 100644 profiles/interfaces/cli-minimal.nix create mode 100644 profiles/interfaces/gui.nix create mode 100644 profiles/platforms/desktop.nix create mode 100644 profiles/platforms/laptop.nix create mode 100644 profiles/platforms/thinkpad.nix create mode 100644 profiles/platforms/vm.nix create mode 100644 profiles/workloads/dev.nix create mode 100644 profiles/workloads/ops.nix create mode 100644 profiles/workloads/srv.nix diff --git a/modules/applications/default.nix b/modules/applications/default.nix index 3e55634..2815c76 100644 --- a/modules/applications/default.nix +++ b/modules/applications/default.nix @@ -12,12 +12,13 @@ ./gnupg.nix ./greetd.nix ./gtk - ./java.nix + ./java ./kde.nix ./nautilus.nix ./niri ./noctalia ./openssh.nix + ./slack.nix ./ssh ./swayidle.nix ./tailscale.nix diff --git a/modules/applications/java.nix b/modules/applications/java.nix deleted file mode 100644 index d59d018..0000000 --- a/modules/applications/java.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -let - cfg = config.my.applications.java; -in -{ - options.my.applications.java = { - enable = lib.mkEnableOption "Java runtime"; - }; - - config = lib.mkIf cfg.enable { - programs.java = { - enable = true; - package = pkgs.jdk25; - }; - }; -} diff --git a/modules/applications/java/default.nix b/modules/applications/java/default.nix new file mode 100644 index 0000000..253a984 --- /dev/null +++ b/modules/applications/java/default.nix @@ -0,0 +1,25 @@ +{ + lib, + config, + ... +}: +let + cfg = config.my.applications.java; +in +{ + imports = [ + ./home.nix + ./system.nix + ]; + + options.my.applications.java = { + enable = lib.mkEnableOption "Java runtime"; + system.enable = lib.mkEnableOption "Java system configuration"; + homeManager.enable = lib.mkEnableOption "Java home-manager configuration"; + }; + + config = lib.mkIf cfg.enable { + my.applications.java.system.enable = lib.mkDefault true; + my.applications.java.homeManager.enable = lib.mkDefault true; + }; +} diff --git a/modules/applications/java/home.nix b/modules/applications/java/home.nix new file mode 100644 index 0000000..3661470 --- /dev/null +++ b/modules/applications/java/home.nix @@ -0,0 +1,23 @@ +{ + lib, + config, + ... +}: +let + cfg = config.my.applications.java.homeManager; +in +{ + options.my.applications.java.homeManager = { + enable = lib.mkEnableOption "Java home-manager configuration"; + }; + + config.home-manager.sharedModules = [ + { + config = lib.mkIf cfg.enable { + programs.java = { + enable = true; + }; + }; + } + ]; +} diff --git a/modules/applications/java/system.nix b/modules/applications/java/system.nix new file mode 100644 index 0000000..ec6f1b8 --- /dev/null +++ b/modules/applications/java/system.nix @@ -0,0 +1,27 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.applications.java.system; +in +{ + options.my.applications.java.system = { + enable = lib.mkEnableOption "Java system configuration"; + }; + + config = lib.mkIf cfg.enable { + programs.java = { + enable = true; + package = pkgs.jdk25; + }; + + environment.systemPackages = with pkgs; [ + jdk25 # Java Development Kit 25 + maven # Java Build Tool + gradle # Java Build Tool + ]; + }; +} diff --git a/modules/applications/slack.nix b/modules/applications/slack.nix new file mode 100644 index 0000000..703e417 --- /dev/null +++ b/modules/applications/slack.nix @@ -0,0 +1,26 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.applications.slack; +in +{ + options.my.applications.slack = { + enable = lib.mkEnableOption "Slack messaging client"; + }; + + config = lib.mkIf cfg.enable { + nixpkgs.config.allowUnfreePredicate = pkg: lib.getName pkg == "slack"; + + home-manager.sharedModules = [ + { + home.packages = with pkgs; [ + slack # Team messaging and collaboration platform + ]; + } + ]; + }; +} diff --git a/modules/default.nix b/modules/default.nix index 8030ff0..b8ff541 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -2,6 +2,7 @@ imports = [ ./applications ./drivers + ./features ./integrations ./system ]; diff --git a/modules/features/application/browser.nix b/modules/features/application/browser.nix new file mode 100644 index 0000000..221de91 --- /dev/null +++ b/modules/features/application/browser.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.application.browser; +in +{ + options.my.features.application.browser = { + enable = lib.mkEnableOption "Web browser (Chrome)"; + }; + + config = lib.mkIf cfg.enable { + my.applications.chrome.enable = true; + }; +} diff --git a/modules/features/application/communication.nix b/modules/features/application/communication.nix new file mode 100644 index 0000000..edd2036 --- /dev/null +++ b/modules/features/application/communication.nix @@ -0,0 +1,17 @@ +{ lib, config, ... }: +let + cfg = config.my.features.application.communication; +in +{ + options.my.features.application.communication = { + enable = lib.mkEnableOption "Communication applications (Discord, Zoom, Slack)"; + }; + + config = lib.mkIf cfg.enable { + my.applications = { + discord.enable = true; + zoom.enable = true; + slack.enable = true; + }; + }; +} diff --git a/modules/features/application/default.nix b/modules/features/application/default.nix new file mode 100644 index 0000000..3e2d7e0 --- /dev/null +++ b/modules/features/application/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./browser.nix + ./communication.nix + ]; +} diff --git a/modules/features/boot/default.nix b/modules/features/boot/default.nix new file mode 100644 index 0000000..57d2608 --- /dev/null +++ b/modules/features/boot/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./power.nix + ./secure-boot.nix + ./uefi.nix + ]; +} diff --git a/modules/features/boot/power.nix b/modules/features/boot/power.nix new file mode 100644 index 0000000..7cc0a83 --- /dev/null +++ b/modules/features/boot/power.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.boot.power; +in +{ + options.my.features.boot.power = { + enable = lib.mkEnableOption "Power management"; + }; + + config = lib.mkIf cfg.enable { + my.system.power.enable = true; + }; +} diff --git a/modules/features/boot/secure-boot.nix b/modules/features/boot/secure-boot.nix new file mode 100644 index 0000000..28f90cd --- /dev/null +++ b/modules/features/boot/secure-boot.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.boot.secureBoot; +in +{ + options.my.features.boot.secureBoot = { + enable = lib.mkEnableOption "Secure boot (lanzaboote)"; + }; + + config = lib.mkIf cfg.enable { + my.system.secure-boot.enable = true; + }; +} diff --git a/modules/features/boot/uefi.nix b/modules/features/boot/uefi.nix new file mode 100644 index 0000000..b12c228 --- /dev/null +++ b/modules/features/boot/uefi.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.boot.uefi; +in +{ + options.my.features.boot.uefi = { + enable = lib.mkEnableOption "UEFI boot support"; + }; + + config = lib.mkIf cfg.enable { + my.system.boot.uefi.enable = true; + }; +} diff --git a/modules/features/cli/base.nix b/modules/features/cli/base.nix new file mode 100644 index 0000000..a119e47 --- /dev/null +++ b/modules/features/cli/base.nix @@ -0,0 +1,34 @@ +{ + lib, + config, + pkgs, + ... +}: +let + cfg = config.my.features.cli.base; +in +{ + options.my.features.cli.base = { + enable = lib.mkEnableOption "Base CLI configuration"; + sshServer = lib.mkEnableOption "OpenSSH server"; + }; + + config = lib.mkIf cfg.enable { + my.applications = { + btop.enable = true; + git.enable = true; + ssh.enable = true; + direnv.enable = true; + gnupg.enable = true; + openssh.enable = cfg.sshServer; + }; + + environment.systemPackages = with pkgs; [ + htop # Interactive Process Viewer + curl # Tool For Fetching Files With Links + wget # Tool For Fetching Files With Links + unzip # Tool For Handling .zip Files + unrar # Tool For Handling .rar Files + ]; + }; +} diff --git a/modules/features/cli/default.nix b/modules/features/cli/default.nix new file mode 100644 index 0000000..1a2a937 --- /dev/null +++ b/modules/features/cli/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./base.nix + ./interactive.nix + ./shell.nix + ]; +} diff --git a/modules/features/cli/interactive.nix b/modules/features/cli/interactive.nix new file mode 100644 index 0000000..0aa5699 --- /dev/null +++ b/modules/features/cli/interactive.nix @@ -0,0 +1,25 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.features.cli.interactive; +in +{ + options.my.features.cli.interactive = { + enable = lib.mkEnableOption "Interactive CLI tools (vim, btop, zellij)"; + }; + + config = lib.mkIf cfg.enable { + my.applications = { + vim.enable = true; + zellij.enable = true; + }; + + environment.systemPackages = with pkgs; [ + tio # A Simple TTY Terminal I/O Application + ]; + }; +} diff --git a/modules/features/cli/shell.nix b/modules/features/cli/shell.nix new file mode 100644 index 0000000..533c0e9 --- /dev/null +++ b/modules/features/cli/shell.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.cli.shell; +in +{ + options.my.features.cli.shell = { + enable = lib.mkEnableOption "Shell configuration (zsh)"; + }; + + config = lib.mkIf cfg.enable { + my.applications.zsh.enable = true; + }; +} diff --git a/modules/features/connect/bluetooth.nix b/modules/features/connect/bluetooth.nix new file mode 100644 index 0000000..f0f5cfd --- /dev/null +++ b/modules/features/connect/bluetooth.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.connect.bluetooth; +in +{ + options.my.features.connect.bluetooth = { + enable = lib.mkEnableOption "Bluetooth support"; + }; + + config = lib.mkIf cfg.enable { + my.system.hardware.bluetooth.enable = true; + }; +} diff --git a/modules/features/connect/default.nix b/modules/features/connect/default.nix new file mode 100644 index 0000000..412300c --- /dev/null +++ b/modules/features/connect/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./bluetooth.nix + ./wifi.nix + ]; +} diff --git a/modules/features/connect/wifi.nix b/modules/features/connect/wifi.nix new file mode 100644 index 0000000..e78e9aa --- /dev/null +++ b/modules/features/connect/wifi.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.connect.wifi; +in +{ + options.my.features.connect.wifi = { + enable = lib.mkEnableOption "WiFi (NetworkManager) support"; + }; + + config = lib.mkIf cfg.enable { + my.system.network.wifi.enable = true; + }; +} diff --git a/modules/features/default.nix b/modules/features/default.nix new file mode 100644 index 0000000..b3aa070 --- /dev/null +++ b/modules/features/default.nix @@ -0,0 +1,14 @@ +{ + imports = [ + ./application + ./boot + ./cli + ./connect + ./dev + ./gui + ./identity + ./network + ./services + ./storage + ]; +} diff --git a/modules/features/dev/agent.nix b/modules/features/dev/agent.nix new file mode 100644 index 0000000..a273de0 --- /dev/null +++ b/modules/features/dev/agent.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.dev.agent; +in +{ + options.my.features.dev.agent = { + enable = lib.mkEnableOption "AI coding agents (Claude Code)"; + }; + + config = lib.mkIf cfg.enable { + my.applications.claude.enable = true; + }; +} diff --git a/modules/features/dev/bun.nix b/modules/features/dev/bun.nix new file mode 100644 index 0000000..706e021 --- /dev/null +++ b/modules/features/dev/bun.nix @@ -0,0 +1,20 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.features.dev.bun; +in +{ + options.my.features.dev.bun = { + enable = lib.mkEnableOption "Bun JavaScript runtime"; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + bun # A Fast JavaScript Runtime Like Node.js And Deno + ]; + }; +} diff --git a/modules/features/dev/default.nix b/modules/features/dev/default.nix new file mode 100644 index 0000000..c0875f3 --- /dev/null +++ b/modules/features/dev/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./agent.nix + ./bun.nix + ./java.nix + ./nix.nix + ./python.nix + ]; +} diff --git a/modules/features/dev/java.nix b/modules/features/dev/java.nix new file mode 100644 index 0000000..2b532e9 --- /dev/null +++ b/modules/features/dev/java.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.dev.java; +in +{ + options.my.features.dev.java = { + enable = lib.mkEnableOption "Java development environment"; + }; + + config = lib.mkIf cfg.enable { + my.applications.java.enable = true; + }; +} diff --git a/modules/features/dev/nix.nix b/modules/features/dev/nix.nix new file mode 100644 index 0000000..195670a --- /dev/null +++ b/modules/features/dev/nix.nix @@ -0,0 +1,20 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.features.dev.nix; +in +{ + options.my.features.dev.nix = { + enable = lib.mkEnableOption "Nix development tools (nil language server)"; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + nil # Nix Language Server + ]; + }; +} diff --git a/modules/features/dev/python.nix b/modules/features/dev/python.nix new file mode 100644 index 0000000..47e06ce --- /dev/null +++ b/modules/features/dev/python.nix @@ -0,0 +1,21 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.features.dev.python; +in +{ + options.my.features.dev.python = { + enable = lib.mkEnableOption "Python development environment"; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + python312 # Python 3.12 + uv # Universal Virtual Environment Manager For Python + ]; + }; +} diff --git a/modules/features/gui/audio.nix b/modules/features/gui/audio.nix new file mode 100644 index 0000000..d966cd8 --- /dev/null +++ b/modules/features/gui/audio.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.gui.audio; +in +{ + options.my.features.gui.audio = { + enable = lib.mkEnableOption "Audio support (PipeWire)"; + }; + + config = lib.mkIf cfg.enable { + my.system.audio.enable = true; + }; +} diff --git a/modules/features/gui/camera.nix b/modules/features/gui/camera.nix new file mode 100644 index 0000000..3236dd9 --- /dev/null +++ b/modules/features/gui/camera.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.gui.camera; +in +{ + options.my.features.gui.camera = { + enable = lib.mkEnableOption "Camera support"; + }; + + config = lib.mkIf cfg.enable { + my.system.camera.enable = true; + }; +} diff --git a/modules/features/gui/capture.nix b/modules/features/gui/capture.nix new file mode 100644 index 0000000..c0377dc --- /dev/null +++ b/modules/features/gui/capture.nix @@ -0,0 +1,22 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.features.gui.capture; +in +{ + options.my.features.gui.capture = { + enable = lib.mkEnableOption "Screen capture tools (slurp, grim, wf-recorder)"; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + slurp # Tool for selecting a region of the screen + grim # Screenshot tool for Wayland + wf-recorder # Screen recorder for Wayland + ]; + }; +} diff --git a/modules/features/gui/default.nix b/modules/features/gui/default.nix new file mode 100644 index 0000000..63b1199 --- /dev/null +++ b/modules/features/gui/default.nix @@ -0,0 +1,13 @@ +{ + imports = [ + ./audio.nix + ./camera.nix + ./capture.nix + ./desktop.nix + ./editor.nix + ./file-manager.nix + ./graphic.nix + ./jp-input.nix + ./terminal.nix + ]; +} diff --git a/modules/features/gui/desktop.nix b/modules/features/gui/desktop.nix new file mode 100644 index 0000000..7787d27 --- /dev/null +++ b/modules/features/gui/desktop.nix @@ -0,0 +1,25 @@ +{ + lib, + config, + ... +}: +let + cfg = config.my.features.gui.desktop; +in +{ + options.my.features.gui.desktop = { + enable = lib.mkEnableOption "Niri Wayland compositor environment"; + }; + + config = lib.mkIf cfg.enable { + my.applications = { + gtk.enable = true; + niri.enable = true; + wayland.enable = true; + greetd.enable = true; + noctalia.enable = true; + swayidle.enable = true; + vicinae.enable = true; + }; + }; +} diff --git a/modules/features/gui/editor.nix b/modules/features/gui/editor.nix new file mode 100644 index 0000000..e10c20d --- /dev/null +++ b/modules/features/gui/editor.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.gui.editor; +in +{ + options.my.features.gui.editor = { + enable = lib.mkEnableOption "GUI code editor (VSCode)"; + }; + + config = lib.mkIf cfg.enable { + my.applications.vscode.enable = true; + }; +} diff --git a/modules/features/gui/file-manager.nix b/modules/features/gui/file-manager.nix new file mode 100644 index 0000000..50996cd --- /dev/null +++ b/modules/features/gui/file-manager.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.gui.fileManager; +in +{ + options.my.features.gui.fileManager = { + enable = lib.mkEnableOption "File manager (Nautilus)"; + }; + + config = lib.mkIf cfg.enable { + my.applications.nautilus.enable = true; + }; +} diff --git a/modules/features/gui/graphic.nix b/modules/features/gui/graphic.nix new file mode 100644 index 0000000..28eaecd --- /dev/null +++ b/modules/features/gui/graphic.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.gui.graphic; +in +{ + options.my.features.gui.graphic = { + enable = lib.mkEnableOption "GPU/graphics hardware acceleration"; + }; + + config = lib.mkIf cfg.enable { + my.system.hardware.gui.enable = true; + }; +} diff --git a/modules/features/gui/jp-input.nix b/modules/features/gui/jp-input.nix new file mode 100644 index 0000000..864f503 --- /dev/null +++ b/modules/features/gui/jp-input.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.gui.jpInput; +in +{ + options.my.features.gui.jpInput = { + enable = lib.mkEnableOption "Japanese input method (fcitx5)"; + }; + + config = lib.mkIf cfg.enable { + my.applications.fcitx5.enable = true; + }; +} diff --git a/modules/features/gui/terminal.nix b/modules/features/gui/terminal.nix new file mode 100644 index 0000000..85e4e5a --- /dev/null +++ b/modules/features/gui/terminal.nix @@ -0,0 +1,22 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.features.gui.terminal; +in +{ + options.my.features.gui.terminal = { + enable = lib.mkEnableOption "Terminal emulators (Ghostty, Alacritty)"; + }; + + config = lib.mkIf cfg.enable { + my.applications.ghostty.enable = true; + + environment.systemPackages = with pkgs; [ + alacritty # A GPU Accelerated Terminal Emulator + ]; + }; +} diff --git a/modules/features/identity/default.nix b/modules/features/identity/default.nix new file mode 100644 index 0000000..1f694c3 --- /dev/null +++ b/modules/features/identity/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./fingerprint.nix + ./ssh-default-key.nix + ]; +} diff --git a/modules/features/identity/fingerprint.nix b/modules/features/identity/fingerprint.nix new file mode 100644 index 0000000..b1d135e --- /dev/null +++ b/modules/features/identity/fingerprint.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.identity.fingerprint; +in +{ + options.my.features.identity.fingerprint = { + enable = lib.mkEnableOption "Fingerprint authentication"; + }; + + config = lib.mkIf cfg.enable { + my.system.fingerprint.enable = true; + }; +} diff --git a/modules/features/identity/ssh-default-key.nix b/modules/features/identity/ssh-default-key.nix new file mode 100644 index 0000000..c1da00a --- /dev/null +++ b/modules/features/identity/ssh-default-key.nix @@ -0,0 +1,31 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.features.identity.sshDefaultKey; +in +{ + options.my.features.identity.sshDefaultKey = { + enable = lib.mkEnableOption "Generate default SSH key (ed25519)"; + }; + + config.home-manager.sharedModules = [ + { + config = lib.mkIf cfg.enable { + home.activation.generateSshKey = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + key="$HOME/.ssh/id_ed25519" + if [ ! -f "$key" ]; then + umask 077 + mkdir -p "$HOME/.ssh" + ${pkgs.openssh}/bin/ssh-keygen -t ed25519 -N "" -f "$key" \ + -C "moons@$(${pkgs.hostname}/bin/hostname || echo host)" + echo "Generated SSH key at $key" + fi + ''; + }; + } + ]; +} diff --git a/modules/features/network/default.nix b/modules/features/network/default.nix new file mode 100644 index 0000000..1f59251 --- /dev/null +++ b/modules/features/network/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./tailscale.nix + ]; +} diff --git a/modules/features/network/tailscale.nix b/modules/features/network/tailscale.nix new file mode 100644 index 0000000..495e5aa --- /dev/null +++ b/modules/features/network/tailscale.nix @@ -0,0 +1,31 @@ +{ lib, config, ... }: +let + cfg = config.my.features.network.tailscale; +in +{ + options.my.features.network.tailscale = { + enable = lib.mkEnableOption "Tailscale VPN"; + acceptDns = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Accept DNS configuration from Tailscale"; + }; + acceptRoutes = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Accept subnet routes from Tailscale"; + }; + extraUpFlags = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + description = "Additional flags to pass to tailscale up"; + }; + }; + + config = lib.mkIf cfg.enable { + my.applications.tailscale = { + enable = true; + inherit (cfg) acceptDns acceptRoutes extraUpFlags; + }; + }; +} diff --git a/modules/features/services/container.nix b/modules/features/services/container.nix new file mode 100644 index 0000000..c26435b --- /dev/null +++ b/modules/features/services/container.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.services.container; +in +{ + options.my.features.services.container = { + enable = lib.mkEnableOption "Container runtime (Docker)"; + }; + + config = lib.mkIf cfg.enable { + my.applications.docker.enable = true; + }; +} diff --git a/modules/features/services/default.nix b/modules/features/services/default.nix new file mode 100644 index 0000000..e4e39fa --- /dev/null +++ b/modules/features/services/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./container.nix + ./kde.nix + ]; +} diff --git a/modules/features/services/kde.nix b/modules/features/services/kde.nix new file mode 100644 index 0000000..1c5bcff --- /dev/null +++ b/modules/features/services/kde.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.services.kde; +in +{ + options.my.features.services.kde = { + enable = lib.mkEnableOption "KDE Connect"; + }; + + config = lib.mkIf cfg.enable { + my.applications.kde.enable = true; + }; +} diff --git a/modules/features/storage/default.nix b/modules/features/storage/default.nix new file mode 100644 index 0000000..0b3cf91 --- /dev/null +++ b/modules/features/storage/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./nfs-client.nix + ]; +} diff --git a/modules/features/storage/nfs-client.nix b/modules/features/storage/nfs-client.nix new file mode 100644 index 0000000..5a92e2f --- /dev/null +++ b/modules/features/storage/nfs-client.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.my.features.storage.nfsClient; +in +{ + options.my.features.storage.nfsClient = { + enable = lib.mkEnableOption "NFS client support"; + }; + + config = lib.mkIf cfg.enable { + my.system.boot.nfs.enable = true; + }; +} diff --git a/modules/system/secure-boot.nix b/modules/system/secure-boot.nix index 0d393f2..8eda80d 100644 --- a/modules/system/secure-boot.nix +++ b/modules/system/secure-boot.nix @@ -1,4 +1,5 @@ { + pkgs, inputs, lib, config, @@ -27,5 +28,9 @@ in enable = true; pkiBundle = "/var/lib/sbctl"; }; + + environment.systemPackages = with pkgs; [ + sbctl # A tool to manage UEFI Secure Boot keys and signatures + ]; }; } diff --git a/profiles/cli-minimal.nix b/profiles/cli-minimal.nix index 958f762..40eacc6 100644 --- a/profiles/cli-minimal.nix +++ b/profiles/cli-minimal.nix @@ -16,13 +16,6 @@ environment.systemPackages = with pkgs; [ nil # Nix Language Server - docker # Containerization Platform - tio # A Simple TTY Terminal I/O Application - sqlite # Vscode Raycast Extension Dependency - oxker # Docker TUI Tool - jdk25 # Java Development Kit 25 - maven # Java Build Tool - gradle # Java Build Tool python312 # Python 3.12 uv # Universal Virtual Environment Manager For Python bun # A Fast JavaScript Runtime Like Node.js And Deno diff --git a/profiles/gui.nix b/profiles/gui.nix index b0f2026..2c2a556 100644 --- a/profiles/gui.nix +++ b/profiles/gui.nix @@ -27,14 +27,7 @@ environment.systemPackages = with pkgs; [ tuigreet # The Login Manager (Sometimes Referred To As Display Manager) - uwsm # Universal Wayland Session Manager (optional must be enabled) - alacritty # A GPU Accelerated Terminal Emulator fuzzel # A Simple And Lightweight Application Launcher - unstable.ghostty # A Fast And Minimal Terminal Emulator For Wayland - xwayland-satellite # A Helper For Running X11 Applications In Wayland - slurp # A Tool For Selecting A Region Of The Screen - grim # A Tool For Taking Screenshots In Wayland with slurp - wf-recorder # A Screen Recorder For Wayland ]; home-manager.users.${username}.imports = [ ]; diff --git a/profiles/interfaces/cli-interactive.nix b/profiles/interfaces/cli-interactive.nix new file mode 100644 index 0000000..e69de29 diff --git a/profiles/interfaces/cli-minimal.nix b/profiles/interfaces/cli-minimal.nix new file mode 100644 index 0000000..e69de29 diff --git a/profiles/interfaces/gui.nix b/profiles/interfaces/gui.nix new file mode 100644 index 0000000..e69de29 diff --git a/profiles/platforms/desktop.nix b/profiles/platforms/desktop.nix new file mode 100644 index 0000000..e69de29 diff --git a/profiles/platforms/laptop.nix b/profiles/platforms/laptop.nix new file mode 100644 index 0000000..e69de29 diff --git a/profiles/platforms/thinkpad.nix b/profiles/platforms/thinkpad.nix new file mode 100644 index 0000000..e69de29 diff --git a/profiles/platforms/vm.nix b/profiles/platforms/vm.nix new file mode 100644 index 0000000..e69de29 diff --git a/profiles/workloads/dev.nix b/profiles/workloads/dev.nix new file mode 100644 index 0000000..e69de29 diff --git a/profiles/workloads/ops.nix b/profiles/workloads/ops.nix new file mode 100644 index 0000000..e69de29 diff --git a/profiles/workloads/srv.nix b/profiles/workloads/srv.nix new file mode 100644 index 0000000..e69de29