nix-dotfiles/flake.nix
2025-07-06 15:16:08 -04:00

77 lines
1.8 KiB
Nix

{
description = "NixOS configuration with flakes";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
edit = {
url = "path:/home/alice/projects/edit";
inputs.nixpkgs.follows = "nixpkgs";
};
tepid-client-services = {
url = "path:/home/alice/projects/tepid-client-services/";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
lix-module,
home-manager,
nixos-hardware,
edit,
tepid-client-services
}:
let
system = "x86_64-linux";
in
{
nixosConfigurations =
let
dumbassFunction = { hostname, modules }:
let
defaultModules = [
./hosts/${hostname}/configuration.nix
home-manager.nixosModules.home-manager
lix-module.nixosModules.default
];
in
{
name = hostname;
value = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit edit tepid-client-services; };
modules = defaultModules ++ modules;
};
};
in
builtins.listToAttrs (
builtins.map dumbassFunction [
{
hostname = "randolph";
modules = [ nixos-hardware.nixosModules.framework-13-7040-amd ];
}
{
hostname = "de-lacadie";
modules = [];
}
]
);
};
}