Files
nixos-config/flake.nix
2026-02-01 00:42:40 +08:00

49 lines
1.0 KiB
Nix

{
description = "Phillip NixOS config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, home-manager, ... }:
let
myModules = {
desktop = {
sway = ./modules/desktop/sway.nix;
greetd = ./modules/desktop/greetd.nix;
};
audio = {
pipewire = ./modules/audio/pipewire.nix;
};
network = {
networkmanager = ./modules/network/networkmanager.nix;
firewall = ./modules/network/firewall.nix;
};
misc = {
fonts = ./modules/misc/fonts.nix;
};
};
mkHost = { system, name }:
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit myModules; };
modules = [
./hosts/${name}/hardware-configuration.nix
./hosts/${name}/configuration.nix
];
};
in
{
nixosConfigurations = {
desktop-main = mkHost { system = "x86_64-linux"; name = "desktop-main"; };
# add more hosts here later
};
};
}