2025-12-07 22:57:38 -05:00
|
|
|
{
|
|
|
|
|
description = "Nest's Flake";
|
|
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-08 20:30:22 -05:00
|
|
|
outputs = { self, nixpkgs, ... }@inputs:
|
|
|
|
|
let
|
|
|
|
|
inherit (self) outputs;
|
|
|
|
|
|
|
|
|
|
# Set the default user. Can be overitten on a system level
|
|
|
|
|
vars.user = "nest";
|
|
|
|
|
|
|
|
|
|
# List of system types our hosts use
|
|
|
|
|
systems = [ "x86_64-linux" ];
|
|
|
|
|
|
|
|
|
|
# Generic NixOS config
|
|
|
|
|
mkNixOSConfig = {
|
|
|
|
|
path,
|
|
|
|
|
extraModules ? [],
|
|
|
|
|
}:
|
|
|
|
|
nixpkgs.lib.nixosSystem {
|
|
|
|
|
specialArgs = {
|
|
|
|
|
inherit inputs outputs vars;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
|
./nixos/common
|
|
|
|
|
path
|
|
|
|
|
]
|
|
|
|
|
++ extraModules;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Additional modules for physical hosts
|
|
|
|
|
mkPhysicalNixOSConfig = path:
|
|
|
|
|
mkNixOSConfig {
|
|
|
|
|
path = path;
|
|
|
|
|
extraModules = [ ./hosts/physical ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Additional modules for servers
|
|
|
|
|
# mkServerNixOSConfig = path: serverType:
|
|
|
|
|
# mkNixOSConfig {
|
|
|
|
|
# path = path;
|
|
|
|
|
# extraModules = [
|
|
|
|
|
# ./hosts/server
|
|
|
|
|
# ./nixos/roles/server/${serverType}
|
|
|
|
|
# ./nixos/modules/backup
|
|
|
|
|
# ];
|
|
|
|
|
# };
|
|
|
|
|
in {
|
|
|
|
|
# Format our nix files using alejandra
|
|
|
|
|
formatter = nixpkgs.lib.genAttrs systems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
|
|
|
|
|
|
|
|
|
# Collection of all of our configs
|
2025-12-09 18:27:15 -05:00
|
|
|
nixosConfigurations = {
|
|
|
|
|
# =========== Desktops ===========
|
|
|
|
|
crow = mkPhysicalNixOSConfig ./hosts/physical/crow;
|
|
|
|
|
};
|
2025-12-07 22:57:38 -05:00
|
|
|
};
|
|
|
|
|
}
|