2024-08-16 10:36:55 -04:00
|
|
|
{
|
|
|
|
|
description = "NixOS config";
|
|
|
|
|
|
|
|
|
|
inputs = {
|
2024-10-04 20:07:34 -04:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2024-12-17 19:15:32 -05:00
|
|
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
|
2024-08-23 14:52:05 -04:00
|
|
|
home-manager = {
|
2024-10-04 20:07:34 -04:00
|
|
|
url = "github:nix-community/home-manager";
|
2024-08-23 14:52:05 -04:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-10-22 21:40:59 -04:00
|
|
|
flake-programs-sqlite = {
|
|
|
|
|
url = "github:wamserma/flake-programs-sqlite";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-11-03 21:23:34 -05:00
|
|
|
nix-gaming = {
|
|
|
|
|
url = "github:fufexan/nix-gaming";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-12-25 17:51:47 -05:00
|
|
|
disko = {
|
|
|
|
|
url = "github:nix-community/disko/latest";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2025-01-19 00:44:22 -05:00
|
|
|
sops-nix = {
|
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2025-02-25 17:38:13 -05:00
|
|
|
pwndbg = {
|
|
|
|
|
url = "github:/pwndbg/pwndbg";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2025-03-24 18:49:59 -04:00
|
|
|
lightly = {
|
|
|
|
|
url = "github:/Bali10050/Darkly";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-08-16 10:36:55 -04:00
|
|
|
};
|
|
|
|
|
|
2024-10-27 13:34:49 -04:00
|
|
|
outputs = {
|
|
|
|
|
nixpkgs,
|
|
|
|
|
home-manager,
|
|
|
|
|
...
|
|
|
|
|
} @ inputs: let
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
|
in
|
|
|
|
|
with builtins;
|
|
|
|
|
with nixpkgs.lib.attrsets; {
|
2024-10-27 02:36:51 -04:00
|
|
|
nixosConfigurations = mapAttrs' (host: _: {
|
|
|
|
|
name = host;
|
|
|
|
|
value = nixpkgs.lib.nixosSystem {
|
2024-10-24 17:40:50 -04:00
|
|
|
inherit system;
|
2025-01-19 11:24:18 -05:00
|
|
|
specialArgs = {inherit inputs;};
|
2024-10-27 13:34:49 -04:00
|
|
|
modules = [(./hosts + "/${host}")];
|
2024-10-24 17:40:50 -04:00
|
|
|
};
|
2024-10-27 02:36:51 -04:00
|
|
|
}) (readDir ./hosts);
|
2024-10-27 13:34:49 -04:00
|
|
|
homeConfigurations = foldl' (a: b: a // b) {} (map (
|
|
|
|
|
host: let
|
|
|
|
|
users = ./hosts + "/${host}/users";
|
|
|
|
|
in
|
|
|
|
|
if pathExists users
|
|
|
|
|
then
|
|
|
|
|
mapAttrs' (user: _: {
|
|
|
|
|
name = "${user}@${host}";
|
|
|
|
|
value = home-manager.lib.homeManagerConfiguration {
|
|
|
|
|
inherit pkgs;
|
2025-01-19 11:24:18 -05:00
|
|
|
extraSpecialArgs = {inherit inputs;};
|
2024-10-27 13:34:49 -04:00
|
|
|
modules = [(users + "/${user}")];
|
2024-10-27 02:36:51 -04:00
|
|
|
};
|
2024-10-27 13:34:49 -04:00
|
|
|
}) (readDir users)
|
2024-10-27 02:36:51 -04:00
|
|
|
else {}
|
|
|
|
|
) (attrNames (readDir ./hosts)));
|
2024-08-16 10:36:55 -04:00
|
|
|
};
|
|
|
|
|
}
|