Files
dotfiles/nix/flake.nix
rocketcamel 9b9ca64fc6 zsh additions + qol changes (#1)
* flake changes

* hm enable by default, omp home-manager

* zsh plugins
2025-02-03 00:26:06 -08:00

64 lines
1.5 KiB
Nix

{
description = "Top level flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
inputs@{
nixpkgs,
home-manager,
nixos-wsl,
...
}:
let
hosts = [
{
name = "wsl-kumatani";
architecture = "x86_64-linux";
isWSL = true;
}
{
name = "wsl-usahara";
architecture = "x86_64-linux";
isWSL = true;
}
{
name = "tux";
architecture = "x86_64-linux";
}
];
in
{
nixosConfigurations = builtins.listToAttrs (
map (host: {
name = host.name;
value = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
meta = {
hostname = host.name;
};
};
system = host.architecture;
modules = [
./hosts/${host.name}/configuration.nix
./modules/default.nix
home-manager.nixosModules.home-manager
{
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}
] ++ (if builtins.hasAttr "isWSL" host then [ nixos-wsl.nixosModules.default ] else [ ]);
};
}) hosts
);
};
}