diff --git a/README.md b/README.md index bdc77bc..1488e53 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 📦 nixos 配置仓库 +# 📦 nixos 配置仓库 基于 Flake 的 NixOS 多主机配置。 @@ -10,9 +10,23 @@ ├─ 🧩 lib/ # 公共函数(mkHost) ├─ 🧱 modules/ # 系统模块(core/server/wsl) ├─ 🎨 overlays/ # 包覆盖 -├─ 📚 profiles/ # 场景组合(desktop/server/wsl) +├─ 📚 profiles/ # 场景组合(desktop/server/wsl/virtualbox/lxc) └─ 🔐 secrets/ # sops 密钥模板与密文 ``` ## 🔗 引用关系 `flake.nix` -> `lib/hosts.nix` + `lib/mkHost.nix` -> `hosts/*` + `profiles/*` -> `modules/*/default.nix` -> 子模块 + +`networking.hostName` 由 `lib/mkHost.nix` 统一设置,具体值在 `lib/hosts.nix` 每台主机条目里定义。 + +## 🌐 Nix 模块引入文件树 +```text +flake.nix +├─ lib/hosts.nix +├─ lib/mkHost.nix +│ ├─ hosts//default.nix -> configuration.nix +│ ├─ profiles/.nix -> modules/* +│ └─ home/default.nix -> home/*.nix +└─ modules/core/sops.nix -> secrets/users/*.enc.yaml +``` + diff --git a/flake.nix b/flake.nix index 78c3812..e2edfc6 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { - description = "My Infra"; - + description = "luochen570's NixOS configuration"; + inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; @@ -8,22 +8,26 @@ url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; - - nix4nvchad = { - url = "github:nix-community/nix4nvchad"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - + + # Nix4NvChad + nix4nvchad = { + url = "github:nix-community/nix4nvchad"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # NixOS WSL nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; + # VS Code Server vscode-server.url = "github:nix-community/nixos-vscode-server"; + # SOPS for Nix sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - + outputs = inputs@{ nixpkgs, home-manager, ... }: let username = "luochen570"; diff --git a/home/README.md b/home/README.md index 545d608..e003796 100644 --- a/home/README.md +++ b/home/README.md @@ -1,4 +1,4 @@ -# 🏠 home 目录说明 +# 🏠 home 目录说明 Home Manager 用户级配置目录。 @@ -11,3 +11,5 @@ Home Manager 用户级配置目录。 ├─ 💻 zsh.nix # Zsh 与插件 └─ ✨ nvchad.nix # Neovim(NvChad) ``` +`r`n + diff --git a/home/ssh.nix b/home/ssh.nix index 07e7fbe..ad8c537 100644 --- a/home/ssh.nix +++ b/home/ssh.nix @@ -2,11 +2,11 @@ { programs.ssh.enable = true; - # ~/.ssh/id_rsa comes from a sops secret file. + # ~/.ssh/id_rsa 来自 sops secret 文件。 home.file.".ssh/id_rsa".source = config.lib.file.mkOutOfStoreSymlink "/run/secrets/users/luochen570/ssh_private_key"; - # ~/.ssh/config comes from a sops secret file. + # ~/.ssh/config 来自 sops secret 文件。 home.file.".ssh/config".source = config.lib.file.mkOutOfStoreSymlink "/run/secrets/users/luochen570/ssh_config"; } diff --git a/hosts/README.md b/hosts/README.md index d25f0f7..1e42dda 100644 --- a/hosts/README.md +++ b/hosts/README.md @@ -1,4 +1,4 @@ -# 🖥️ hosts 目录说明 +# 🖥️ hosts 目录说明 主机入口层。每台主机目录固定为三文件结构: - `default.nix`:统一入口,导入 `configuration.nix` @@ -16,13 +16,12 @@ │ ├─ 🧩 default.nix │ ├─ ⚙️ configuration.nix │ └─ 📝 README.md -├─ 📦 virtualbox/ -│ ├─ 🧩 default.nix -│ ├─ ⚙️ configuration.nix -│ ├─ 🧱 hardware-configuration.nix -│ └─ 📝 README.md -└─ 🪟 wsl/ +└─ 📦 virtualbox/ ├─ 🧩 default.nix ├─ ⚙️ configuration.nix + ├─ 🧱 hardware-configuration.nix └─ 📝 README.md + ``` +`r`n + diff --git a/hosts/desktop/README.md b/hosts/desktop/README.md index 1c514e1..574b6ec 100644 --- a/hosts/desktop/README.md +++ b/hosts/desktop/README.md @@ -1,4 +1,4 @@ -# 🧑‍💻 hosts/desktop +# 🧑‍💻 hosts/desktop 桌面主机入口。 @@ -9,3 +9,5 @@ ├─ ⚙️ configuration.nix # profile + hostName + 机器相关配置 └─ 📝 README.md ``` +`r`n + diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 0925398..3910683 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -1,11 +1,9 @@ { ... }: { + # 可在此合并由 nixos-generate-config 生成的机器专属配置: + # 磁盘布局、引导加载器、文件系统、硬件选项等。 imports = [ - ../../profiles/desktop.nix + ../../modules/drivers/nvidia.nix + ../../modules/drivers/amdgpu.nix ]; - - networking.hostName = "desktop"; - - # Machine-specific config generated by nixos-generate-config can be - # merged here: disk layout, boot loader, filesystem, hardware options. } diff --git a/hosts/nixos-lxc/README.md b/hosts/nixos-lxc/README.md new file mode 100644 index 0000000..d47e528 --- /dev/null +++ b/hosts/nixos-lxc/README.md @@ -0,0 +1,14 @@ +# 📦 hosts/nixos-lxc + +Proxmox LXC 主机入口。 + +## 🌲 目录树 +```text +hosts/nixos-lxc +├─ default.nix +├─ configuration.nix +└─ README.md +``` +`r`n + + diff --git a/hosts/nixos-lxc/configuration.nix b/hosts/nixos-lxc/configuration.nix new file mode 100644 index 0000000..65a0d44 --- /dev/null +++ b/hosts/nixos-lxc/configuration.nix @@ -0,0 +1,42 @@ +{ modulesPath, ... }: +{ + imports = [ + (modulesPath + "/virtualisation/proxmox-lxc.nix") + ]; + + # 修复 LXC 挂载报错 + systemd.mounts = [ + { where = "/sys/kernel/debug"; enable = false; } + { where = "/sys/fs/fuse/connections"; enable = false; } + ]; + systemd.services."sys-kernel-debug.mount".enable = false; + + # 容器运行时设置 + nix.settings.sandbox = false; + proxmoxLXC = { + manageNetwork = false; + privileged = true; + }; + + # 由宿主机处理 fstrim + services.fstrim.enable = false; + + services.openssh = { + enable = true; + openFirewall = true; + settings = { + PermitRootLogin = "yes"; + PasswordAuthentication = true; + }; + }; + + security.sudo.wheelNeedsPassword = false; + + services.resolved = { + extraConfig = '' + Cache=true + CacheFromLocalhost=true + ''; + }; + +} diff --git a/modules/wsl/default.nix b/hosts/nixos-lxc/default.nix similarity index 98% rename from modules/wsl/default.nix rename to hosts/nixos-lxc/default.nix index 0167962..e9e51d9 100644 --- a/modules/wsl/default.nix +++ b/hosts/nixos-lxc/default.nix @@ -1,4 +1,5 @@ { ... }: + { imports = [ ./configuration.nix diff --git a/hosts/server/README.md b/hosts/server/README.md index 0d689f1..f0b2bfa 100644 --- a/hosts/server/README.md +++ b/hosts/server/README.md @@ -1,4 +1,4 @@ -# 🗄️ hosts/server +# 🗄️ hosts/server 服务器主机入口。 @@ -9,3 +9,5 @@ ├─ ⚙️ configuration.nix # profile + hostName + 机器相关配置 └─ 📝 README.md ``` +`r`n + diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 0e8b222..e6aad59 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -1,11 +1,5 @@ { ... }: { - imports = [ - ../../profiles/server.nix - ]; - - networking.hostName = "server"; - - # Machine-specific config generated by nixos-generate-config can be - # merged here: disk layout, boot loader, filesystem, hardware options. + # 可在此合并由 nixos-generate-config 生成的机器专属配置: + # 磁盘布局、引导加载器、文件系统、硬件选项等。 } diff --git a/hosts/virtualbox/README.md b/hosts/virtualbox/README.md index cfa0f8b..4ceaf7b 100644 --- a/hosts/virtualbox/README.md +++ b/hosts/virtualbox/README.md @@ -1,4 +1,4 @@ -# 📦 hosts/virtualbox +# 📦 hosts/virtualbox VirtualBox 虚拟机主机入口。 @@ -10,3 +10,5 @@ VirtualBox 虚拟机主机入口。 ├─ 🧱 hardware-configuration.nix # 由 nixos-generate-config 生成的硬件配置 └─ 📝 README.md ``` +`r`n + diff --git a/hosts/virtualbox/configuration.nix b/hosts/virtualbox/configuration.nix index aea47d4..a222a9f 100644 --- a/hosts/virtualbox/configuration.nix +++ b/hosts/virtualbox/configuration.nix @@ -1,14 +1,8 @@ { ... }: { - imports = [ - ../../profiles/virtualbox.nix - ]; - - networking.hostName = "virtualbox"; - boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - # Machine-specific config generated by nixos-generate-config can be - # merged here: disk layout, boot loader, filesystem, hardware options. + # 可在此合并由 nixos-generate-config 生成的机器专属配置: + # 磁盘布局、引导加载器、文件系统、硬件选项等。 } diff --git a/hosts/virtualbox/hardware-configuration.nix b/hosts/virtualbox/hardware-configuration.nix index 320b3a0..24e627b 100644 --- a/hosts/virtualbox/hardware-configuration.nix +++ b/hosts/virtualbox/hardware-configuration.nix @@ -1,6 +1,6 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. +# 请勿直接修改此文件!它由 `nixos-generate-config` 自动生成, +# 后续再次执行生成命令时可能会被覆盖。请改动 +# /etc/nixos/configuration.nix。 { config, lib, pkgs, modulesPath, ... }: { diff --git a/hosts/wsl/README.md b/hosts/wsl/README.md index 9ac7af1..1a49e16 100644 --- a/hosts/wsl/README.md +++ b/hosts/wsl/README.md @@ -1,4 +1,4 @@ -# 🪟 hosts/wsl +# 🪟 hosts/wsl WSL 主机入口。 @@ -9,3 +9,5 @@ WSL 主机入口。 ├─ ⚙️ configuration.nix # profile + hostName(可加 WSL 机器项) └─ 📝 README.md ``` +`r`n + diff --git a/hosts/wsl/configuration.nix b/hosts/wsl/configuration.nix index b90fa9c..18c0989 100644 --- a/hosts/wsl/configuration.nix +++ b/hosts/wsl/configuration.nix @@ -1,10 +1,11 @@ { ... }: { imports = [ - ../../profiles/wsl.nix + inputs.nixos-wsl.nixosModules.default ]; - networking.hostName = "nixos-wsl"; - - # Keep minimal for WSL. Add machine-specific options here if needed. + wsl = { + enable = true; + defaultUser = username; + }; } diff --git a/lib/README.md b/lib/README.md index 22532b7..075086d 100644 --- a/lib/README.md +++ b/lib/README.md @@ -1,4 +1,4 @@ -# 🧩 lib 目录说明 +# 🧩 lib 目录说明 公共函数目录。 @@ -8,3 +8,5 @@ ├─ ⚙️ mkHost.nix # 组装 NixOS system 与 Home Manager(接收 username) └─ 📋 hosts.nix # 主机清单(system/profile 映射) ``` +`r`n + diff --git a/lib/hosts.nix b/lib/hosts.nix index 582bdda..21830e8 100644 --- a/lib/hosts.nix +++ b/lib/hosts.nix @@ -2,20 +2,30 @@ desktop = { system = "x86_64-linux"; profile = "desktop"; + hostName = "desktop"; }; server = { system = "x86_64-linux"; profile = "server"; + hostName = "server"; }; wsl = { system = "x86_64-linux"; profile = "wsl"; + hostName = "nixos-wsl"; }; virtualbox = { system = "x86_64-linux"; profile = "virtualbox"; + hostName = "virtualbox"; }; -} \ No newline at end of file + + nixos-lxc = { + system = "x86_64-linux"; + profile = "lxc"; + hostName = "nixos-lxc"; + }; +} diff --git a/lib/mkHost.nix b/lib/mkHost.nix index d07cec2..188927c 100644 --- a/lib/mkHost.nix +++ b/lib/mkHost.nix @@ -1,6 +1,8 @@ { nixpkgs, home-manager, inputs }: { hostname, + hostName ? hostname, + systemStateVersion ? "25.05", system, profile, username, @@ -17,6 +19,10 @@ nixpkgs.lib.nixosSystem { inputs.sops-nix.nixosModules.sops ../hosts/${hostname} ../profiles/${profile}.nix + { + networking.hostName = hostName; + system.stateVersion = systemStateVersion; + } home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/modules/README.md b/modules/README.md index a2f105c..7e76327 100644 --- a/modules/README.md +++ b/modules/README.md @@ -1,4 +1,4 @@ -# 🧱 modules 目录说明 +# 🧱 modules 目录说明 系统模块目录。大部分子目录通过 `default.nix` 提供统一入口,驱动目录采用按文件显式引用。 @@ -8,6 +8,8 @@ ├─ 🧭 core/ # 全局基础模块 ├─ 🖥️ desktop/ # 桌面模块(DE/WM/应用) ├─ 🎮 drivers/ # 硬件驱动模块(如 NVIDIA) -├─ 🗄️ server/ # 服务器模块 -└─ 🪟 wsl/ # WSL 模块 +└─ 🗄️ server/ # 服务器模块 + ``` +`r`n + diff --git a/modules/core/README.md b/modules/core/README.md index 4e7099b..a77e3c9 100644 --- a/modules/core/README.md +++ b/modules/core/README.md @@ -1,4 +1,4 @@ -# 🧭 modules/core +# 🧭 modules/core 所有主机场景都会引入的基础模块。 @@ -10,3 +10,5 @@ ├─ 👤 users.nix # 用户、默认 shell、密码与公钥 └─ 🔐 sops.nix # sops-nix secret 映射 ``` +`r`n + diff --git a/modules/core/core.nix b/modules/core/core.nix index 5ac6c5b..d7b4057 100644 --- a/modules/core/core.nix +++ b/modules/core/core.nix @@ -24,7 +24,4 @@ time.timeZone = lib.mkDefault "Asia/Shanghai"; i18n.defaultLocale = lib.mkDefault "zh_CN.UTF-8"; - networking.firewall.enable = lib.mkDefault true; - - system.stateVersion = lib.mkDefault "25.05"; -} \ No newline at end of file +} diff --git a/modules/core/users.nix b/modules/core/users.nix index 8625719..e3414d6 100644 --- a/modules/core/users.nix +++ b/modules/core/users.nix @@ -5,7 +5,7 @@ users.users.${username} = { isNormalUser = true; - extraGroups = [ "wheel" ]; + extraGroups = [ "wheel" "networkmanager" ]; shell = pkgs.zsh; } // lib.optionalAttrs (!(config.sops.secrets ? "users/luochen570/passwordHash")) { diff --git a/modules/desktop/README.md b/modules/desktop/README.md index 90716ba..2064ef7 100644 --- a/modules/desktop/README.md +++ b/modules/desktop/README.md @@ -1,4 +1,4 @@ -# 🖥️ modules/desktop 目录说明 +# 🖥️ modules/desktop 目录说明 桌面能力模块,按“桌面环境(DE)/窗口管理器(WM)/应用”拆分,便于后续扩展到多种桌面方案。 @@ -11,3 +11,5 @@ ├─ 📦 pkg.nix # 桌面软件包 └─ 📱 apps.nix # 桌面应用与默认浏览器关联 ``` +`r`n + diff --git a/modules/desktop/de/README.md b/modules/desktop/de/README.md index 178e6e1..1b243d8 100644 --- a/modules/desktop/de/README.md +++ b/modules/desktop/de/README.md @@ -1,4 +1,4 @@ -# 🧭 modules/desktop/de 目录说明 +# 🧭 modules/desktop/de 目录说明 桌面环境(Desktop Environment)目录。 @@ -8,3 +8,5 @@ ├─ 📦 default.nix # 聚合入口(当前仅 KDE) └─ ⚙️ kde.nix # SDDM + Plasma 6 ``` +`r`n + diff --git a/modules/desktop/wm/README.md b/modules/desktop/wm/README.md index 0ae9bed..8b99aa2 100644 --- a/modules/desktop/wm/README.md +++ b/modules/desktop/wm/README.md @@ -1,4 +1,4 @@ -# 🪟 modules/desktop/wm 目录说明 +# 🪟 modules/desktop/wm 目录说明 窗口管理器(Window Manager)目录,当前为预留结构。 @@ -7,3 +7,5 @@ 🪟 modules/desktop/wm └─ 📦 default.nix # 预留 future imports(hyprland/sway 等) ``` +`r`n + diff --git a/modules/desktop/wm/default.nix b/modules/desktop/wm/default.nix index a8c69f4..7482a91 100644 --- a/modules/desktop/wm/default.nix +++ b/modules/desktop/wm/default.nix @@ -1,7 +1,7 @@ { ... }: { imports = [ - # Future WM modules: + # 未来可引入的 WM 模块: # ./hyprland.nix # ./sway.nix ]; diff --git a/modules/drivers/README.md b/modules/drivers/README.md index 95c3d78..2e77619 100644 --- a/modules/drivers/README.md +++ b/modules/drivers/README.md @@ -1,4 +1,4 @@ -# 🎮 modules/drivers 目录说明 +# 🎮 modules/drivers 目录说明 硬件驱动模块目录,用于集中管理显卡等驱动配置。 @@ -9,3 +9,5 @@ ├─ 🔴 amdgpu.nix # AMD iGPU(9700X) 用户态图形/计算支持 └─ 📝 README.md ``` +`r`n + diff --git a/modules/drivers/amdgpu.nix b/modules/drivers/amdgpu.nix index f2ffca2..947c309 100644 --- a/modules/drivers/amdgpu.nix +++ b/modules/drivers/amdgpu.nix @@ -1,8 +1,8 @@ { pkgs, ... }: { - # Ryzen 7 9700X iGPU (RDNA2) related userspace support. - # Keep as a secondary GPU setup; X primary driver is still controlled - # by the desktop profile / nvidia module. + # Ryzen 7 9700X 核显(RDNA2)相关的用户态支持。 + # 作为辅助显卡配置保留;X 的主显卡驱动仍由 + # desktop profile / nvidia 模块控制。 hardware.graphics = { enable = true; extraPackages = with pkgs; [ diff --git a/modules/server/README.md b/modules/server/README.md index fafb744..8c9e08b 100644 --- a/modules/server/README.md +++ b/modules/server/README.md @@ -1,4 +1,4 @@ -# 🗄️ modules/server +# 🗄️ modules/server 服务器专用模块。 @@ -7,8 +7,10 @@ 🗄️ modules/server ├─ 📦 default.nix # 聚合入口 ├─ 📦 pkg.nix # 服务器常用软件包 +├─ 🔥 firewall.nix # 防火墙默认策略 ├─ 🔐 ssh.nix # OpenSSH 参数 ├─ 🐳 docker.nix # Docker 与清理策略 ├─ 📦 virtualbox-guest.nix # VirtualBox Guest 增强配置 └─ 🧠 vscode-server.nix # VS Code Server 模块 ``` + diff --git a/modules/server/default.nix b/modules/server/default.nix index 31ad1b0..6082ee4 100644 --- a/modules/server/default.nix +++ b/modules/server/default.nix @@ -2,6 +2,7 @@ { imports = [ ./pkg.nix + ./firewall.nix ./docker.nix ./ssh.nix ]; diff --git a/modules/server/firewall.nix b/modules/server/firewall.nix new file mode 100644 index 0000000..eb1ba6a --- /dev/null +++ b/modules/server/firewall.nix @@ -0,0 +1,4 @@ +{ lib, ... }: +{ + networking.firewall.enable = lib.mkDefault true; +} diff --git a/modules/server/pkg.nix b/modules/server/pkg.nix index d191dc0..e1e4009 100644 --- a/modules/server/pkg.nix +++ b/modules/server/pkg.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { environment.systemPackages = with pkgs; [ - jq + ]; } diff --git a/modules/server/ssh.nix b/modules/server/ssh.nix index 9ba5b0f..fbb3583 100644 --- a/modules/server/ssh.nix +++ b/modules/server/ssh.nix @@ -2,13 +2,13 @@ { services.openssh = { enable = true; + openFirewall = true; settings = { PasswordAuthentication = false; KbdInteractiveAuthentication = false; PermitRootLogin = "no"; X11Forwarding = false; }; - openFirewall = true; }; -} - +} + diff --git a/modules/server/virtualbox-guest.nix b/modules/server/virtualbox-guest.nix index 5bfda41..7a6bfe5 100644 --- a/modules/server/virtualbox-guest.nix +++ b/modules/server/virtualbox-guest.nix @@ -1,6 +1,6 @@ { ... }: { - # virtualbox-guest + # VirtualBox Guest 增强支持 virtualisation.virtualbox.guest.enable = true; virtualisation.virtualbox.guest.dragAndDrop = true; -} \ No newline at end of file +} diff --git a/modules/wsl/README.md b/modules/wsl/README.md deleted file mode 100644 index 0ae1b66..0000000 --- a/modules/wsl/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# 🪟 modules/wsl - -WSL 集成模块。 - -## 🌲 目录树 -```text -🪟 modules/wsl -├─ 📦 default.nix # 聚合入口 -├─ ⚙️ configuration.nix # WSL 配置实现 -└─ 📝 README.md -``` diff --git a/modules/wsl/configuration.nix b/modules/wsl/configuration.nix deleted file mode 100644 index 2d03b42..0000000 --- a/modules/wsl/configuration.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ inputs, username, ... }: -{ - imports = [ - inputs.nixos-wsl.nixosModules.default - ../server/vscode-server.nix - ]; - - wsl = { - enable = true; - defaultUser = username; - }; - - users.users.${username}.extraGroups = [ "vscode" "docker" "wheel" ]; -} diff --git a/overlays/README.md b/overlays/README.md index 031fe61..d86906b 100644 --- a/overlays/README.md +++ b/overlays/README.md @@ -1,4 +1,4 @@ -# 🎨 overlays 目录说明 +# 🎨 overlays 目录说明 `nixpkgs` 包覆盖目录。 @@ -7,3 +7,5 @@ 🎨 overlays └─ (自定义 overlay 文件) ``` +`r`n + diff --git a/profiles/README.md b/profiles/README.md index 18632fd..ece9519 100644 --- a/profiles/README.md +++ b/profiles/README.md @@ -1,4 +1,4 @@ -# 📚 profiles 目录说明 +# 📚 profiles 目录说明 场景化组合层,负责选择 `modules/*`。 @@ -8,5 +8,8 @@ ├─ 🧑‍💻 desktop.nix # core + desktop + drivers ├─ 🗄️ server.nix # core + server(default.nix) ├─ 📦 virtualbox.nix # core + desktop + virtualbox guest + 远程开发 -└─ 🪟 wsl.nix # core + wsl(default.nix) +├─ 🪟 wsl.nix # core + wsl(default.nix) +└─ 📦 lxc.nix # core + LXC 主机自定义配置 ``` +`r`n + diff --git a/profiles/desktop.nix b/profiles/desktop.nix index cf66ab8..69e774e 100644 --- a/profiles/desktop.nix +++ b/profiles/desktop.nix @@ -3,7 +3,5 @@ imports = [ ../modules/core ../modules/desktop - ../modules/drivers/nvidia.nix - ../modules/drivers/amdgpu.nix ]; } diff --git a/profiles/lxc.nix b/profiles/lxc.nix new file mode 100644 index 0000000..707fc3c --- /dev/null +++ b/profiles/lxc.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ../modules/core + ]; +} diff --git a/profiles/wsl.nix b/profiles/wsl.nix index 278e17c..487d772 100644 --- a/profiles/wsl.nix +++ b/profiles/wsl.nix @@ -2,10 +2,8 @@ { imports = [ ../modules/core - ../modules/wsl ../modules/server/ssh.nix + ../modules/server/vscode-server.nix ]; - - networking.firewall.enable = false; } diff --git a/secrets/README.md b/secrets/README.md index 27282f9..6933c0e 100644 --- a/secrets/README.md +++ b/secrets/README.md @@ -1,4 +1,4 @@ -# 🔐 secrets 目录说明 +# 🔐 secrets 目录说明 `sops-nix` 密钥目录。 @@ -11,3 +11,5 @@ 建议: - 仅提交加密后的 `*.enc.yaml` - 明文仅保留 `*.example` 模板 +`r`n + diff --git a/secrets/users/README.md b/secrets/users/README.md index cbd933e..4c1f85b 100644 --- a/secrets/users/README.md +++ b/secrets/users/README.md @@ -1,4 +1,4 @@ -# 👤 secrets/users 目录说明 +# 👤 secrets/users 目录说明 用户级 secret 模板与密文。 @@ -13,3 +13,5 @@ - 你可以在本目录维护 `*.source` 文件作为本地敏感源文件(例如真实域名和 IP)。 - 这些文件已被仓库 `.gitignore` 屏蔽,不会被 Git 收集和推送。 - 示例:`luochen570.ssh_config.source`、`luochen570.id_rsa.source` +`r`n +