Files
nixos/flake.nix
T

129 lines
3.6 KiB
Nix
Raw Normal View History

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).
{
description = "Greg's machines!";
2022-04-17 22:29:13 -05:00
inputs = {
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixunstable";
};
btc = {
url = "github:fort-nix/nix-bitcoin/release";
};
2025-12-06 23:17:00 -06:00
buildbot = {
url = "github:nix-community/buildbot-nix";
inputs.nixpkgs.follows = "nixunstable";
};
charts = {
url = "github:nix-community/nixhelm";
};
2025-12-15 21:51:27 -06:00
colmena.url = "github:zhaofengli/colmena";
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixunstable";
};
flake-parts.url = "github:hercules-ci/flake-parts";
hmunstable = {
url = "github:nix-community/home-manager/master";
2024-11-23 01:23:26 -06:00
inputs.nixpkgs.follows = "nixunstable";
};
2025-04-13 23:05:11 -05:00
proxmox.url = "github:SaumonNet/proxmox-nixos";
2024-12-02 12:44:21 -06:00
# To enable backups: https://github.com/SaumonNet/proxmox-nixos/pull/45
2025-04-13 23:05:11 -05:00
#proxmox.url = "github:blecher-at/proxmox-nixos/fix-backup-pve-manager";
2025-05-10 21:08:05 -05:00
nix-hardware.url = "github:nixos/nixos-hardware";
2024-11-19 22:43:13 -06:00
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixunstable";
};
nixvimunstable = {
url = "github:nix-community/nixvim/main";
inputs.nixpkgs.follows = "nixunstable";
};
nixunstable.url = "github:nixos/nixpkgs/nixos-unstable";
nurpkgs.url = "github:nix-community/NUR";
vsext.url = "github:nix-community/nix-vscode-extensions";
wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixunstable";
};
};
2022-04-17 22:29:13 -05:00
outputs =
{ self, ... }@top:
let
local_overlay = import ./overlays;
overlays = [
top.agenix.overlays.default
local_overlay
2025-09-21 18:51:35 -05:00
top.nixvimunstable.overlays.default
];
2025-12-15 21:51:27 -06:00
metadata = builtins.fromJSON (builtins.readFile ./network.json);
in
top.flake-parts.lib.mkFlake { inputs = top; } {
systems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
];
flake = {
2025-12-15 21:51:27 -06:00
colmenaHive = top.colmena.lib.makeHive (
{
meta = {
nixpkgs = import top.nixunstable {
2025-12-15 21:51:27 -06:00
inherit overlays;
2025-12-15 21:51:27 -06:00
system = "x86_64-linux";
};
specialArgs = {
2025-12-15 21:51:27 -06:00
inherit
metadata
self
top
overlays
;
2025-12-15 21:51:27 -06:00
};
};
}
// (builtins.mapAttrs (_k: v: { imports = v._module.args.modules; }) self.nixosConfigurations)
);
2022-04-21 12:42:42 +00:00
darwinConfigurations = (import ./darwin { inherit top overlays; });
2022-09-06 11:41:09 -05:00
2025-12-15 21:51:27 -06:00
nixosConfigurations = (import ./hosts { inherit top overlays; });
homeConfigurations = (import ./home { inherit top overlays; });
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-02-09 14:33:51 -06:00
perSystem =
{
pkgs,
self',
system,
...
}:
{
2025-12-16 09:07:55 -06:00
_module.args = {
2024-11-23 01:23:26 -06:00
pkgs = import top.nixunstable { inherit system overlays; };
};
2025-12-16 09:07:55 -06:00
packages = (import ./pkgs { inherit pkgs; });
checks = import ./checks.nix {
2025-12-10 07:23:50 -06:00
inherit system top self';
inherit (pkgs) lib;
};
devShells = import ./shells.nix {
2025-12-16 09:07:55 -06:00
inherit pkgs;
inherit (top) colmena;
};
};
};
2022-04-17 22:29:13 -05:00
}