new file: flake.lock

modified:   home/git.nix
	modified:   hosts/README.md
	modified:   hosts/virtualbox/README.md
	modified:   hosts/virtualbox/configuration.nix
	modified:   modules/core/users.nix
	modified:   modules/desktop/pkg.nix
	modified:   modules/server/README.md
	modified:   profiles/README.md
This commit is contained in:
luochen570
2026-02-28 11:14:50 +08:00
parent 3659dc3e50
commit 26b5caa6d0
9 changed files with 300 additions and 31 deletions

263
flake.lock generated Normal file
View File

@@ -0,0 +1,263 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1763992789,
"narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager",
"type": "github"
}
},
"nix4nvchad": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"nvchad-starter": "nvchad-starter"
},
"locked": {
"lastModified": 1772187015,
"narHash": "sha256-8UA+HVKxRqyv1wuAln4gxskq8ZbW5ttKZg5kDp0R154=",
"owner": "nix-community",
"repo": "nix4nvchad",
"rev": "cde302611dfdcaece9756b48f68eb808645929b5",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix4nvchad",
"type": "github"
}
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1771563879,
"narHash": "sha256-vA5hocvdGhr+jfBN7A7ogeZqIz2qx01EixXwdVsQcnE=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "379d20c55f552e91fb9f3f0382e4a97d3f452943",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "main",
"repo": "NixOS-WSL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1770019141,
"narHash": "sha256-VKS4ZLNx4PNrABoB0L8KUpc1fE7CLpQXQs985tGfaCU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cb369ef2efd432b3cdf8622b0ffc0a97a02f3137",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1682134069,
"narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fd901ef4bf93499374c5af385b2943f5801c0833",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nvchad-starter": {
"flake": false,
"locked": {
"lastModified": 1753939018,
"narHash": "sha256-xdLr6tlU9uA+wu0pqha2br0fdVm+1MjgjbB5awz9ICU=",
"owner": "NvChad",
"repo": "starter",
"rev": "e3572e1f5e1c297212c3deeb17b7863139ce663e",
"type": "github"
},
"original": {
"owner": "NvChad",
"ref": "main",
"repo": "starter",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nix4nvchad": "nix4nvchad",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2",
"sops-nix": "sops-nix",
"vscode-server": "vscode-server"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1772048434,
"narHash": "sha256-/wA0OaH6kZ/pFA+nXR/tvg5oupOmEDmMS5us79JT60o=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "334daa7c273dd8bf7a0cd370e4e16022b64e55e9",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"vscode-server": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1770124655,
"narHash": "sha256-yHmd2B13EtBUPLJ+x0EaBwNkQr9LTne1arLVxT6hSnY=",
"owner": "nix-community",
"repo": "nixos-vscode-server",
"rev": "92ce71c3ba5a94f854e02d57b14af4997ab54ef0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-vscode-server",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@@ -2,11 +2,9 @@
{
programs.git = {
enable = true;
settings = {
user = {
name = "luochen570";
email = "1160510664@qq.com";
};
userName = "luochen570";
userEmail = "1160510664@qq.com";
extraConfig = {
init.defaultBranch = "main";
};
};

View File

@@ -16,6 +16,11 @@
│ ├─ 🧩 default.nix
│ ├─ ⚙️ configuration.nix
│ └─ 📝 README.md
├─ 📦 virtualbox/
│ ├─ 🧩 default.nix
│ ├─ ⚙️ configuration.nix
│ ├─ 🧱 hardware-configuration.nix
│ └─ 📝 README.md
└─ 🪟 wsl/
├─ 🧩 default.nix
├─ ⚙️ configuration.nix

View File

@@ -1,11 +1,12 @@
# hosts/virtualbox
# 📦 hosts/virtualbox
VirtualBox guest host entry.
VirtualBox 虚拟机主机入口。
## Layout
## 🌲 目录树
```text
hosts/virtualbox
|- default.nix # host entry, imports configuration.nix
|- configuration.nix # profile + hostName + machine specific options
`- README.md
📦 hosts/virtualbox
├─ 🧩 default.nix # 主机入口,引用 configuration.nix 与硬件配置
├─ ⚙️ configuration.nix # profile + hostName + 机器相关配置
├─ 🧱 hardware-configuration.nix # 由 nixos-generate-config 生成的硬件配置
└─ 📝 README.md
```

View File

@@ -6,6 +6,9 @@
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.
}

View File

@@ -7,17 +7,14 @@
isNormalUser = true;
extraGroups = [ "wheel" ];
shell = pkgs.zsh;
}
// lib.optionalAttrs (!(config.sops.secrets ? "users/luochen570/passwordHash")) {
initialPassword = "Dly928730@..";
}
// lib.optionalAttrs (config.sops.secrets ? "users/luochen570/authorized_key") {
openssh.authorizedKeys.keyFiles = [ config.sops.secrets."users/luochen570/authorized_key".path ];
}
// lib.optionalAttrs (config.sops.secrets ? "users/luochen570/passwordHash") {
hashedPasswordFile = config.sops.secrets."users/luochen570/passwordHash".path;
};
users.users.${username}.initialPassword = lib.mkIf
(!(config.sops.secrets ? "users/luochen570/passwordHash"))
"Dly928730@..";
users.users.${username}.openssh.authorizedKeys.keyFiles = lib.mkIf
(config.sops.secrets ? "users/luochen570/authorized_key")
[ config.sops.secrets."users/luochen570/authorized_key".path ];
users.users.${username}.hashedPasswordFile = lib.mkIf
(config.sops.secrets ? "users/luochen570/passwordHash")
config.sops.secrets."users/luochen570/passwordHash".path;
}

View File

@@ -3,8 +3,8 @@
environment.systemPackages = with pkgs; [
firefox
google-chrome
linuxqq
wechat-uos
qq
wechat
xterm
kdePackages.kate
kdePackages.konsole

View File

@@ -9,5 +9,6 @@
├─ 📦 pkg.nix # 服务器常用软件包
├─ 🔐 ssh.nix # OpenSSH 参数
├─ 🐳 docker.nix # Docker 与清理策略
├─ 📦 virtualbox-guest.nix # VirtualBox Guest 增强配置
└─ 🧠 vscode-server.nix # VS Code Server 模块
```

View File

@@ -7,5 +7,6 @@
📚 profiles
├─ 🧑‍💻 desktop.nix # core + desktop + drivers
├─ 🗄️ server.nix # core + server(default.nix)
├─ 📦 virtualbox.nix # core + desktop + virtualbox guest + 远程开发
└─ 🪟 wsl.nix # core + wsl(default.nix)
```