This commit is contained in:
2026-05-30 23:37:40 +09:00
parent 394638638d
commit 3ff532f9e5
61 changed files with 708 additions and 36 deletions
+13
View File
@@ -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;
};
}
@@ -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;
};
};
}
+6
View File
@@ -0,0 +1,6 @@
{
imports = [
./browser.nix
./communication.nix
];
}
+7
View File
@@ -0,0 +1,7 @@
{
imports = [
./power.nix
./secure-boot.nix
./uefi.nix
];
}
+13
View File
@@ -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;
};
}
+13
View File
@@ -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;
};
}
+13
View File
@@ -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;
};
}
+34
View File
@@ -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
];
};
}
+7
View File
@@ -0,0 +1,7 @@
{
imports = [
./base.nix
./interactive.nix
./shell.nix
];
}
+25
View File
@@ -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
];
};
}
+13
View File
@@ -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;
};
}
+13
View File
@@ -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;
};
}
+6
View File
@@ -0,0 +1,6 @@
{
imports = [
./bluetooth.nix
./wifi.nix
];
}
+13
View File
@@ -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;
};
}
+14
View File
@@ -0,0 +1,14 @@
{
imports = [
./application
./boot
./cli
./connect
./dev
./gui
./identity
./network
./services
./storage
];
}
+13
View File
@@ -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;
};
}
+20
View File
@@ -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
];
};
}
+9
View File
@@ -0,0 +1,9 @@
{
imports = [
./agent.nix
./bun.nix
./java.nix
./nix.nix
./python.nix
];
}
+13
View File
@@ -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;
};
}
+20
View File
@@ -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
];
};
}
+21
View File
@@ -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
];
};
}
+13
View File
@@ -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;
};
}
+13
View File
@@ -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;
};
}
+22
View File
@@ -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
];
};
}
+13
View File
@@ -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
];
}
+25
View File
@@ -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;
};
};
}
+13
View File
@@ -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;
};
}
+13
View File
@@ -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;
};
}
+13
View File
@@ -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;
};
}
+13
View File
@@ -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;
};
}
+22
View File
@@ -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
];
};
}
+6
View File
@@ -0,0 +1,6 @@
{
imports = [
./fingerprint.nix
./ssh-default-key.nix
];
}
+13
View File
@@ -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;
};
}
@@ -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
'';
};
}
];
}
+5
View File
@@ -0,0 +1,5 @@
{
imports = [
./tailscale.nix
];
}
+31
View File
@@ -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;
};
};
}
+13
View File
@@ -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;
};
}
+6
View File
@@ -0,0 +1,6 @@
{
imports = [
./container.nix
./kde.nix
];
}
+13
View File
@@ -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;
};
}
+5
View File
@@ -0,0 +1,5 @@
{
imports = [
./nfs-client.nix
];
}
+13
View File
@@ -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;
};
}