2024-05-20 01:17:07 -04:00
|
|
|
{
|
|
|
|
inputs = let
|
2024-11-20 15:01:58 -05:00
|
|
|
inherit (import ./inputs) mkDep mkInput extraInputs;
|
2024-05-20 01:17:07 -04:00
|
|
|
|
|
|
|
mainInputs = {
|
2024-08-06 13:27:06 -04:00
|
|
|
systems = mkInput {
|
|
|
|
owner = "nix-systems";
|
|
|
|
repo = "default-linux";
|
|
|
|
};
|
|
|
|
|
2024-05-20 01:17:07 -04:00
|
|
|
nixpkgs = mkInput {
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
2024-11-26 22:26:28 -05:00
|
|
|
ref = "nixos-unstable";
|
2024-05-20 01:17:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
home-manager = mkDep {
|
2024-06-11 19:17:20 -04:00
|
|
|
owner = "nix-community";
|
2024-05-20 01:17:07 -04:00
|
|
|
repo = "home-manager";
|
|
|
|
};
|
|
|
|
|
|
|
|
nix-on-droid = mkDep {
|
|
|
|
owner = "nix-community";
|
|
|
|
repo = "nix-on-droid";
|
|
|
|
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
|
|
|
};
|
|
|
|
|
|
|
|
sops-nix = mkDep {
|
|
|
|
owner = "Mic92";
|
|
|
|
repo = "sops-nix";
|
|
|
|
};
|
|
|
|
|
|
|
|
secrets = mkDep {
|
|
|
|
type = "git";
|
|
|
|
url = "ssh://git@git.nelim.org/matt1432/nixos-secrets";
|
|
|
|
|
|
|
|
inputs.sops-nix.follows = "sops-nix";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
2024-11-20 15:01:58 -05:00
|
|
|
mainInputs // extraInputs;
|
2024-05-20 01:17:07 -04:00
|
|
|
|
|
|
|
outputs = inputs @ {
|
2024-07-14 22:59:33 -04:00
|
|
|
self,
|
2024-08-06 13:27:06 -04:00
|
|
|
systems,
|
2024-12-16 15:51:41 -05:00
|
|
|
nixpkgs,
|
|
|
|
secrets,
|
2024-05-20 01:17:07 -04:00
|
|
|
...
|
|
|
|
}: let
|
2024-11-20 16:13:12 -05:00
|
|
|
inherit (self.lib) mkVersion mkNixOS mkNixOnDroid mkPkgs;
|
2024-05-20 22:41:45 -04:00
|
|
|
|
2024-05-20 01:17:07 -04:00
|
|
|
perSystem = attrs:
|
2024-08-06 13:27:06 -04:00
|
|
|
nixpkgs.lib.genAttrs (import systems) (system:
|
2024-09-04 23:41:56 -04:00
|
|
|
attrs (mkPkgs {inherit system nixpkgs;}));
|
2024-05-20 01:17:07 -04:00
|
|
|
in {
|
2024-11-20 16:13:12 -05:00
|
|
|
lib = import ./lib {inherit inputs perSystem;};
|
|
|
|
|
2024-12-16 15:51:41 -05:00
|
|
|
nixOnDroidConfigurations.default =
|
|
|
|
mkNixOnDroid [./configurations/android];
|
2024-06-27 00:56:27 -04:00
|
|
|
|
2024-05-20 01:17:07 -04:00
|
|
|
nixosConfigurations = {
|
2024-05-20 22:41:45 -04:00
|
|
|
# Desktops
|
2024-09-04 23:41:56 -04:00
|
|
|
wim = mkNixOS {
|
|
|
|
extraModules = [
|
2024-12-16 15:51:41 -05:00
|
|
|
./configurations/wim
|
2024-09-04 23:41:56 -04:00
|
|
|
secrets.nixosModules.default
|
|
|
|
];
|
|
|
|
};
|
|
|
|
binto = mkNixOS {
|
2024-09-28 13:31:03 -04:00
|
|
|
cudaSupport = true;
|
2024-12-16 15:51:41 -05:00
|
|
|
extraModules = [./configurations/binto];
|
2024-09-04 23:41:56 -04:00
|
|
|
};
|
2024-05-20 01:17:07 -04:00
|
|
|
|
2024-11-22 23:15:13 -05:00
|
|
|
bbsteamie = mkNixOS {
|
|
|
|
mainUser = "mariah";
|
2024-12-16 15:51:41 -05:00
|
|
|
extraModules = [./configurations/bbsteamie];
|
2024-11-22 23:15:13 -05:00
|
|
|
};
|
2024-06-29 03:45:06 -04:00
|
|
|
|
2024-05-20 22:41:45 -04:00
|
|
|
# NAS
|
2024-09-04 23:41:56 -04:00
|
|
|
nos = mkNixOS {
|
2024-09-28 13:31:03 -04:00
|
|
|
cudaSupport = true;
|
2024-09-04 23:41:56 -04:00
|
|
|
extraModules = [
|
2024-12-16 15:51:41 -05:00
|
|
|
./configurations/nos
|
2024-09-04 23:41:56 -04:00
|
|
|
secrets.nixosModules.nos
|
|
|
|
];
|
|
|
|
};
|
2024-05-20 01:17:07 -04:00
|
|
|
|
2024-05-20 22:41:45 -04:00
|
|
|
# Build / test server
|
2024-09-04 23:41:56 -04:00
|
|
|
servivi = mkNixOS {
|
|
|
|
extraModules = [
|
2024-12-16 15:51:41 -05:00
|
|
|
./configurations/servivi
|
2024-09-04 23:41:56 -04:00
|
|
|
secrets.nixosModules.servivi
|
|
|
|
];
|
|
|
|
};
|
2024-05-20 01:17:07 -04:00
|
|
|
|
2024-08-18 20:59:01 -04:00
|
|
|
# Home-assistant
|
2024-09-05 22:42:17 -04:00
|
|
|
homie = mkNixOS {
|
2024-09-07 22:04:53 -04:00
|
|
|
extraModules = [
|
2024-12-16 15:51:41 -05:00
|
|
|
./configurations/homie
|
2024-09-07 22:04:53 -04:00
|
|
|
secrets.nixosModules.homie
|
|
|
|
];
|
|
|
|
};
|
2024-08-18 20:59:01 -04:00
|
|
|
|
2024-05-20 01:17:07 -04:00
|
|
|
# Cluster
|
2024-09-04 23:41:56 -04:00
|
|
|
thingone = mkNixOS {
|
|
|
|
extraModules = [
|
2024-12-16 15:51:41 -05:00
|
|
|
(import ./configurations/cluster "thingone")
|
2024-09-04 23:41:56 -04:00
|
|
|
secrets.nixosModules.thingy
|
|
|
|
];
|
|
|
|
};
|
|
|
|
thingtwo = mkNixOS {
|
|
|
|
extraModules = [
|
2024-12-16 15:51:41 -05:00
|
|
|
(import ./configurations/cluster "thingtwo")
|
2024-09-04 23:41:56 -04:00
|
|
|
secrets.nixosModules.thingy
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
live-image = mkNixOS {
|
2024-11-22 23:25:38 -05:00
|
|
|
mainUser = "nixos";
|
2024-12-16 15:51:41 -05:00
|
|
|
extraModules = [./configurations/live-image];
|
2024-09-04 23:41:56 -04:00
|
|
|
};
|
2024-05-20 01:17:07 -04:00
|
|
|
};
|
|
|
|
|
2024-12-16 15:51:41 -05:00
|
|
|
# For nix-fast-build. I use a custom output to alleviate eval time of this flake. ie. when doing nix flake show
|
|
|
|
nixFastChecks = import ./nixFastChecks {inherit perSystem self;};
|
2024-05-20 01:17:07 -04:00
|
|
|
|
2024-12-16 15:51:41 -05:00
|
|
|
homeManagerModules = import ./homeManagerModules self;
|
2024-06-10 22:57:20 -04:00
|
|
|
|
2024-12-16 15:51:41 -05:00
|
|
|
nixosModules = import ./modules self;
|
2024-07-21 17:12:26 -04:00
|
|
|
|
2024-12-16 15:51:41 -05:00
|
|
|
overlays = import ./overlays self;
|
2024-08-04 18:44:53 -04:00
|
|
|
|
2024-07-21 17:12:26 -04:00
|
|
|
apps =
|
|
|
|
perSystem (pkgs:
|
|
|
|
import ./apps {inherit inputs pkgs;});
|
2024-06-08 22:21:04 -04:00
|
|
|
|
2024-11-23 19:35:01 -05:00
|
|
|
appsPackages =
|
|
|
|
perSystem (pkgs:
|
|
|
|
import ./apps/nix/packages.nix {inherit pkgs self;});
|
|
|
|
|
2024-12-16 15:51:41 -05:00
|
|
|
devShells =
|
|
|
|
perSystem (pkgs:
|
2024-12-22 00:27:24 -05:00
|
|
|
import ./devShells {inherit pkgs self;});
|
2024-05-20 01:17:07 -04:00
|
|
|
|
2024-12-16 15:51:41 -05:00
|
|
|
packages =
|
|
|
|
perSystem (pkgs:
|
|
|
|
import ./packages {inherit inputs mkVersion pkgs;});
|
2024-05-20 22:41:45 -04:00
|
|
|
|
2024-12-16 15:51:41 -05:00
|
|
|
scopedPackages =
|
2024-07-21 17:12:26 -04:00
|
|
|
perSystem (pkgs:
|
2024-12-16 15:51:41 -05:00
|
|
|
import ./scopedPackages {inherit inputs mkVersion pkgs;});
|
2024-07-21 17:12:26 -04:00
|
|
|
|
|
|
|
formatter = perSystem (pkgs: pkgs.alejandra);
|
2024-05-20 01:17:07 -04:00
|
|
|
};
|
|
|
|
}
|