Files
nixos/flake.nix
luochen570 620b587010 new file: .gitignore
new file:   .sops.yaml
	new file:   README.md
	modified:   flake.nix
	new file:   home/README.md
	new file:   home/default.nix
	modified:   home/git.nix
	new file:   home/ssh.nix
	new file:   hosts/README.md
	new file:   hosts/desktop/README.md
	new file:   hosts/desktop/configuration.nix
	new file:   hosts/desktop/default.nix
	new file:   hosts/server/README.md
	new file:   hosts/server/configuration.nix
	modified:   hosts/server/default.nix
	new file:   hosts/wsl/README.md
	new file:   hosts/wsl/configuration.nix
	new file:   hosts/wsl/default.nix
	new file:   lib/README.md
	new file:   lib/hosts.nix
	modified:   lib/mkHost.nix
	new file:   modules/README.md
	new file:   modules/core/README.md
	new file:   modules/core/default.nix
	new file:   modules/core/sops.nix
	new file:   modules/core/users.nix
	new file:   modules/desktop/README.md
	new file:   modules/desktop/apps.nix
	new file:   modules/desktop/de/README.md
	new file:   modules/desktop/de/default.nix
	new file:   modules/desktop/de/kde.nix
	new file:   modules/desktop/default.nix
	new file:   modules/desktop/wm/README.md
	new file:   modules/desktop/wm/default.nix
	new file:   modules/drivers/README.md
	new file:   modules/drivers/amdgpu.nix
	new file:   modules/drivers/nvidia.nix
	new file:   modules/server/README.md
	new file:   modules/server/default.nix
	new file:   modules/server/docker.nix
	new file:   modules/server/ssh.nix
	new file:   modules/wsl/README.md
	new file:   modules/wsl/configuration.nix
	new file:   modules/wsl/default.nix
	deleted:    modules/wsl/wsl.nix
	new file:   overlays/README.md
	new file:   profiles/README.md
	new file:   profiles/desktop.nix
	modified:   profiles/server.nix
	new file:   profiles/wsl.nix
	new file:   secrets/README.md
	new file:   secrets/users/README.md
	new file:   secrets/users/luochen570.enc.yaml.example
添加了一些文件并优化了了部分配置
桌面驱动有待改进等我去nixos实际操作一下改进
该配置纯gpt生产,可能存在一些问题,欢迎大家提出意见和建议
未经任何测试,直接提交了,请勿直接使用
2026-02-27 23:58:08 +08:00

41 lines
979 B
Nix

{
description = "My Infra";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nix4nvchad = {
url = "github:nix-community/nix4nvchad";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
vscode-server.url = "github:nix-community/nixos-vscode-server";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, home-manager, ... }:
let
username = "luochen570";
hosts = import ./lib/hosts.nix;
mkHost = import ./lib/mkHost.nix {
inherit nixpkgs home-manager inputs;
};
mkConfiguredHost = hostname: cfg: mkHost ({
inherit hostname username;
} // cfg);
in {
nixosConfigurations = nixpkgs.lib.mapAttrs mkConfiguredHost hosts;
};
}