Files
nixos/flake.nix
luochen570 3659dc3e50 modified: .sops.yaml
modified:   flake.nix
	modified:   home/git.nix
	modified:   home/nvchad.nix
	modified:   home/ssh.nix
	modified:   home/zsh.nix
	new file:   hosts/virtualbox/README.md
	new file:   hosts/virtualbox/configuration.nix
	new file:   hosts/virtualbox/default.nix
	new file:   hosts/virtualbox/hardware-configuration.nix
	modified:   lib/hosts.nix
	modified:   modules/core/README.md
	new file:   modules/core/core.nix
	modified:   modules/core/default.nix
	new file:   modules/core/pkg.nix
	modified:   modules/core/sops.nix
	modified:   modules/desktop/README.md
	modified:   modules/desktop/apps.nix
	modified:   modules/desktop/default.nix
	new file:   modules/desktop/fcitx5.nix
	new file:   modules/desktop/pkg.nix
	modified:   modules/server/README.md
	modified:   modules/server/default.nix
	modified:   modules/server/docker.nix
	new file:   modules/server/pkg.nix
	modified:   modules/server/ssh.nix
	new file:   modules/server/virtualbox-guest.nix
	new file:   modules/server/vscode-server.nix
	modified:   modules/wsl/configuration.nix
	new file:   profiles/virtualbox.nix
	modified:   profiles/wsl.nix
	modified:   secrets/users/README.md
	modified:   secrets/users/luochen570.enc.yaml.example
2026-02-28 10:21:32 +08:00

41 lines
987 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;
};
}