2022-04-17 22:29:13 -05:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
|
|
|
|
{
|
2024-10-03 11:26:39 -05:00
|
|
|
|
description = "Greg's machines!";
|
2022-04-17 22:29:13 -05:00
|
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
|
inputs = {
|
|
|
|
|
|
agenix = {
|
|
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
|
|
inputs.nixpkgs.follows = "nixunstable";
|
|
|
|
|
|
};
|
2025-12-06 23:17:00 -06:00
|
|
|
|
buildbot = {
|
|
|
|
|
|
url = "github:nix-community/buildbot-nix";
|
|
|
|
|
|
inputs.nixpkgs.follows = "nixunstable";
|
|
|
|
|
|
};
|
2025-12-15 21:51:27 -06:00
|
|
|
|
colmena.url = "github:zhaofengli/colmena";
|
2024-10-03 11:26:39 -05:00
|
|
|
|
darwin = {
|
|
|
|
|
|
url = "github:lnl7/nix-darwin/master";
|
|
|
|
|
|
inputs.nixpkgs.follows = "nixunstable";
|
|
|
|
|
|
};
|
|
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
|
|
hmunstable = {
|
2026-01-15 22:43:32 -06:00
|
|
|
|
url = "github:nix-community/home-manager/master";
|
2024-11-23 01:23:26 -06:00
|
|
|
|
inputs.nixpkgs.follows = "nixunstable";
|
2024-10-03 11:26:39 -05:00
|
|
|
|
};
|
2026-04-29 16:10:31 -05:00
|
|
|
|
minecraft.url = "github:Infinidoge/nix-minecraft";
|
2026-05-12 21:25:24 -05:00
|
|
|
|
niks3.url = "github:Mic92/niks3";
|
2025-05-10 21:08:05 -05:00
|
|
|
|
nix-hardware.url = "github:nixos/nixos-hardware";
|
2026-05-13 08:06:57 -05:00
|
|
|
|
nixpkgs-lib.url = "github:nix-community/nixpkgs.lib";
|
2026-06-08 11:28:56 -05:00
|
|
|
|
nixvimunstable.url = "github:nix-community/nixvim/main";
|
2024-10-03 11:26:39 -05:00
|
|
|
|
nixunstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
|
|
nurpkgs.url = "github:nix-community/NUR";
|
2025-05-26 12:18:57 -05:00
|
|
|
|
vsext.url = "github:nix-community/nix-vscode-extensions";
|
2024-10-03 11:26:39 -05:00
|
|
|
|
wsl = {
|
|
|
|
|
|
url = "github:nix-community/NixOS-WSL";
|
|
|
|
|
|
inputs.nixpkgs.follows = "nixunstable";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
2022-04-17 22:29:13 -05:00
|
|
|
|
|
2024-10-11 12:28:53 -05:00
|
|
|
|
outputs =
|
|
|
|
|
|
{ self, ... }@top:
|
2024-10-03 11:26:39 -05:00
|
|
|
|
let
|
|
|
|
|
|
local_overlay = import ./overlays;
|
2026-02-19 19:51:17 -06:00
|
|
|
|
overlays = [
|
2024-10-11 12:28:53 -05:00
|
|
|
|
top.agenix.overlays.default
|
2024-10-03 11:26:39 -05:00
|
|
|
|
local_overlay
|
2025-09-21 18:51:35 -05:00
|
|
|
|
top.nixvimunstable.overlays.default
|
2025-12-18 10:45:24 -06:00
|
|
|
|
top.nurpkgs.overlays.default
|
|
|
|
|
|
top.vsext.overlays.default
|
2026-04-29 16:10:31 -05:00
|
|
|
|
top.minecraft.overlay
|
2024-10-03 11:26:39 -05:00
|
|
|
|
];
|
2025-12-15 21:51:27 -06:00
|
|
|
|
metadata = builtins.fromJSON (builtins.readFile ./network.json);
|
2024-10-11 12:28:53 -05:00
|
|
|
|
systems = [
|
|
|
|
|
|
"aarch64-linux"
|
|
|
|
|
|
"x86_64-linux"
|
|
|
|
|
|
"aarch64-darwin"
|
|
|
|
|
|
];
|
2025-12-22 15:24:26 -06:00
|
|
|
|
imported_packages = top.nixunstable.lib.genAttrs systems (
|
2025-12-18 10:45:24 -06:00
|
|
|
|
system:
|
|
|
|
|
|
import top.nixunstable {
|
2026-02-19 19:51:17 -06:00
|
|
|
|
inherit system overlays;
|
2025-12-18 10:45:24 -06:00
|
|
|
|
config = {
|
|
|
|
|
|
allowUnfree = true;
|
|
|
|
|
|
allowUnfreePredicate = _: true;
|
2026-06-08 11:28:56 -05:00
|
|
|
|
permittedInsecurePackages = [
|
|
|
|
|
|
"ventoy-1.1.05"
|
|
|
|
|
|
"electron-39.8.10"
|
|
|
|
|
|
];
|
2025-12-18 10:45:24 -06:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
2026-04-19 01:04:41 -05:00
|
|
|
|
lib' = import ./lib { inherit (top.nixunstable) lib; };
|
2025-12-18 10:45:24 -06:00
|
|
|
|
in
|
|
|
|
|
|
top.flake-parts.lib.mkFlake { inputs = top; } {
|
|
|
|
|
|
inherit systems;
|
2024-01-22 13:34:35 -06:00
|
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
|
flake = {
|
2025-12-15 21:51:27 -06:00
|
|
|
|
colmenaHive = top.colmena.lib.makeHive (
|
|
|
|
|
|
{
|
|
|
|
|
|
meta = {
|
2025-12-22 15:24:26 -06:00
|
|
|
|
nixpkgs = imported_packages.x86_64-linux;
|
2025-12-15 21:51:27 -06:00
|
|
|
|
specialArgs = {
|
2025-12-15 21:51:27 -06:00
|
|
|
|
inherit
|
2026-04-19 01:04:41 -05:00
|
|
|
|
lib'
|
2025-12-15 21:51:27 -06:00
|
|
|
|
metadata
|
|
|
|
|
|
self
|
|
|
|
|
|
top
|
|
|
|
|
|
;
|
2026-05-18 12:45:04 -05:00
|
|
|
|
pkgs' = top.self.packages.x86_64-linux;
|
2025-12-15 21:51:27 -06:00
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
2025-12-16 19:09:26 -06:00
|
|
|
|
// (builtins.mapAttrs (
|
|
|
|
|
|
k: v:
|
|
|
|
|
|
{
|
2026-01-08 17:56:41 -06:00
|
|
|
|
imports = self.nixosConfigurations.${k}._module.args.modules;
|
2025-12-16 19:09:26 -06:00
|
|
|
|
}
|
|
|
|
|
|
// (
|
2026-01-08 17:56:41 -06:00
|
|
|
|
if builtins.hasAttr "tags" v then
|
2025-12-16 19:09:26 -06:00
|
|
|
|
{
|
|
|
|
|
|
deployment = {
|
2026-01-08 17:56:41 -06:00
|
|
|
|
inherit (v) tags;
|
2026-07-25 12:05:07 -05:00
|
|
|
|
targetHost = if (v ? "nebulaIp") then v.nebulaIp else v.ts;
|
2025-12-16 19:09:26 -06:00
|
|
|
|
targetUser = "greg";
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{ }
|
|
|
|
|
|
)
|
2026-01-08 17:56:41 -06:00
|
|
|
|
) (top.nixunstable.lib.filterAttrs (_: v: !(v ? "external") || !v.external) metadata.hosts))
|
2025-12-15 21:51:27 -06:00
|
|
|
|
);
|
2022-04-21 12:42:42 +00:00
|
|
|
|
|
2025-12-22 15:24:26 -06:00
|
|
|
|
darwinConfigurations = (
|
|
|
|
|
|
import ./darwin {
|
2025-12-29 13:47:01 -06:00
|
|
|
|
inherit top metadata;
|
2025-12-22 15:24:26 -06:00
|
|
|
|
nixpkgs = imported_packages;
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
2022-09-06 11:41:09 -05:00
|
|
|
|
|
2025-12-22 15:24:26 -06:00
|
|
|
|
nixosConfigurations = (
|
|
|
|
|
|
import ./hosts {
|
2026-04-19 01:04:41 -05:00
|
|
|
|
inherit top metadata lib';
|
2025-12-22 15:24:26 -06:00
|
|
|
|
nixpkgs = imported_packages;
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
2025-12-15 21:51:27 -06:00
|
|
|
|
|
2025-12-22 15:24:26 -06:00
|
|
|
|
homeConfigurations = (
|
|
|
|
|
|
import ./home {
|
|
|
|
|
|
inherit top metadata;
|
|
|
|
|
|
nixpkgs = imported_packages;
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
2023-11-01 14:14:50 -05:00
|
|
|
|
|
2025-12-15 21:51:27 -06:00
|
|
|
|
modules = import ./modules;
|
|
|
|
|
|
|
2025-12-16 09:07:55 -06:00
|
|
|
|
overlays.default = local_overlay;
|
2024-10-03 11:26:39 -05:00
|
|
|
|
};
|
2024-02-09 14:33:51 -06:00
|
|
|
|
|
2024-10-11 12:28:53 -05:00
|
|
|
|
perSystem =
|
|
|
|
|
|
{
|
|
|
|
|
|
pkgs,
|
|
|
|
|
|
self',
|
|
|
|
|
|
system,
|
|
|
|
|
|
...
|
|
|
|
|
|
}:
|
|
|
|
|
|
{
|
2025-12-16 09:07:55 -06:00
|
|
|
|
_module.args = {
|
2025-12-22 15:24:26 -06:00
|
|
|
|
pkgs = imported_packages.${system};
|
2024-10-11 12:28:53 -05:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-05-13 08:06:57 -05:00
|
|
|
|
packages = (import ./pkgs { inherit pkgs top; });
|
2024-10-11 12:28:53 -05:00
|
|
|
|
|
|
|
|
|
|
checks = import ./checks.nix {
|
2025-12-10 07:23:50 -06:00
|
|
|
|
inherit system top self';
|
2026-05-13 08:06:57 -05:00
|
|
|
|
inherit (top.nixpkgs-lib) lib;
|
2024-10-11 12:28:53 -05:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
devShells = import ./shells.nix {
|
2025-12-16 09:07:55 -06:00
|
|
|
|
inherit pkgs;
|
|
|
|
|
|
inherit (top) colmena;
|
2026-05-13 08:06:57 -05:00
|
|
|
|
inherit (self') packages;
|
2024-10-11 12:28:53 -05:00
|
|
|
|
};
|
2024-10-03 11:26:39 -05:00
|
|
|
|
};
|
|
|
|
|
|
};
|
2022-04-17 22:29:13 -05:00
|
|
|
|
}
|