2023-01-25 17:53:02 +01:00
|
|
|
{
|
2023-04-08 17:33:59 +02:00
|
|
|
description = "patricks tolle nix config";
|
|
|
|
|
2023-01-28 02:50:14 +01:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-04-08 17:33:59 +02:00
|
|
|
|
2023-01-28 02:50:14 +01:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
# should use system nixpkgs instead of their own
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-04-08 17:33:59 +02:00
|
|
|
|
2023-01-28 02:50:14 +01:00
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
2023-05-19 06:54:56 +02:00
|
|
|
inputs.home-manager.follows = "home-manager";
|
2023-01-28 02:50:14 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-01-28 18:41:31 +01:00
|
|
|
|
2023-05-02 15:08:36 +02:00
|
|
|
# Bin zu faul des zu kopieren
|
|
|
|
agenix-rekey = {
|
|
|
|
url = "github:oddlama/agenix-rekey";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2023-01-28 18:41:31 +01:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2023-02-08 21:12:32 +01:00
|
|
|
|
|
|
|
pre-commit-hooks = {
|
|
|
|
url = "github:cachix/pre-commit-hooks.nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2023-03-06 07:47:49 +01:00
|
|
|
|
2023-05-11 12:59:16 +02:00
|
|
|
templates.url = "git+https://git.lel.lol/patrick/nix-templates.git";
|
2023-05-02 15:08:36 +02:00
|
|
|
|
|
|
|
colmena = {
|
|
|
|
url = "github:zhaofengli/colmena";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
2023-03-06 07:47:49 +01:00
|
|
|
};
|
2023-03-08 14:11:46 +01:00
|
|
|
|
2023-05-02 15:08:36 +02:00
|
|
|
# someday
|
|
|
|
#impermanence.url = "github:nix-community/impermanence";
|
|
|
|
|
|
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
|
|
|
|
2023-05-19 06:54:56 +02:00
|
|
|
hyprland = {
|
|
|
|
url = "github:hyprwm/Hyprland";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-01-25 17:53:02 +01:00
|
|
|
};
|
|
|
|
|
2023-01-28 02:50:14 +01:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
2023-01-28 18:41:31 +01:00
|
|
|
flake-utils,
|
2023-05-02 15:08:36 +02:00
|
|
|
colmena,
|
|
|
|
agenix-rekey,
|
2023-01-28 02:50:14 +01:00
|
|
|
...
|
2023-05-02 15:08:36 +02:00
|
|
|
} @ inputs:
|
2023-01-28 18:41:31 +01:00
|
|
|
{
|
2023-05-02 15:08:36 +02:00
|
|
|
secrets = {
|
2023-05-18 06:57:58 +02:00
|
|
|
masterIdentities = [./secrets/NIXOSc.key.pub];
|
2023-05-02 15:08:36 +02:00
|
|
|
extraEncryptionPubkeys = [./secrets/recipients.txt];
|
|
|
|
content = import ./nix/secrets.nix inputs;
|
2023-01-28 18:41:31 +01:00
|
|
|
};
|
2023-02-08 21:12:32 +01:00
|
|
|
|
2023-05-02 15:08:36 +02:00
|
|
|
hosts = {
|
|
|
|
patricknix = {
|
|
|
|
type = "nixos";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
|
|
|
};
|
2023-02-08 19:52:31 +01:00
|
|
|
|
2023-05-02 15:08:36 +02:00
|
|
|
colmena = import ./nix/colmena.nix inputs;
|
|
|
|
# all bare metal nodes
|
|
|
|
colmenaNodes = ((colmena.lib.makeHive self.colmena).introspect (x: x)).nodes;
|
|
|
|
# todo add microvmNodes
|
2023-02-08 21:12:32 +01:00
|
|
|
|
2023-05-02 15:08:36 +02:00
|
|
|
nodes = self.colmenaNodes;
|
|
|
|
}
|
|
|
|
// flake-utils.lib.eachDefaultSystem (system: rec {
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
# TODO fix this to only allow specific unfree packages
|
|
|
|
config.allowUnfree = true;
|
2023-02-08 19:52:31 +01:00
|
|
|
};
|
2023-05-02 15:08:36 +02:00
|
|
|
apps = agenix-rekey.defineApps self pkgs self.nodes;
|
|
|
|
checks = import ./nix/checks.nix inputs system;
|
|
|
|
devShells.default = import ./nix/dev-shell.nix inputs system;
|
|
|
|
formatter = pkgs.alejandra;
|
2023-01-28 18:41:31 +01:00
|
|
|
});
|
2023-01-25 17:53:02 +01:00
|
|
|
}
|