2023-07-30 14:50:11 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
2023-10-28 11:36:43 +00:00
|
|
|
# Track channels with commits tested and built by hydra
|
2023-12-02 10:01:53 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
2023-10-28 12:26:08 +00:00
|
|
|
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
2023-10-28 11:36:43 +00:00
|
|
|
|
2023-10-29 12:00:23 +00:00
|
|
|
nixpkgs-2205.url = "github:nixos/nixpkgs/nixos-22.05";
|
|
|
|
|
2023-07-30 14:50:11 +00:00
|
|
|
nix-darwin.url = "github:lnl7/nix-darwin/master";
|
|
|
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
2023-10-28 11:36:43 +00:00
|
|
|
|
2023-12-02 10:01:53 +00:00
|
|
|
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
2023-07-30 14:50:11 +00:00
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
nixos-flake.url = "github:srid/nixos-flake";
|
|
|
|
|
2023-10-27 21:06:55 +00:00
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
2023-10-28 11:36:43 +00:00
|
|
|
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
2023-10-28 10:38:14 +00:00
|
|
|
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
2023-10-28 11:36:43 +00:00
|
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
agenix.inputs.darwin.follows = "nix-darwin";
|
|
|
|
agenix.inputs.home-manager.follows = "home-manager";
|
2023-10-28 13:05:30 +00:00
|
|
|
|
|
|
|
keycloak-theme-pub-solar.url = "git+https://git.pub.solar/pub-solar/keycloak-theme?ref=main";
|
|
|
|
keycloak-theme-pub-solar.inputs.nixpkgs.follows = "nixpkgs";
|
2023-11-06 20:28:05 +00:00
|
|
|
|
|
|
|
triton-vmtools.url = "git+https://git.pub.solar/pub-solar/infra-vintage?ref=main&dir=vmtools";
|
|
|
|
triton-vmtools.inputs.nixpkgs.follows = "nixpkgs";
|
2023-11-19 14:49:57 +00:00
|
|
|
|
|
|
|
element-themes.url = "github:aaronraimist/element-themes/master";
|
|
|
|
element-themes.flake = false;
|
2024-04-29 22:52:07 +00:00
|
|
|
|
|
|
|
maunium-stickerpicker.url = "github:maunium/stickerpicker?ref=master&dir=web";
|
|
|
|
maunium-stickerpicker.flake = false;
|
|
|
|
|
|
|
|
element-stickers.url = "git+https://git.pub.solar/pub-solar/maunium-stickerpicker-nix?ref=main";
|
|
|
|
element-stickers.inputs.maunium-stickerpicker.follows = "maunium-stickerpicker";
|
|
|
|
element-stickers.inputs.nixpkgs.follows = "nixpkgs";
|
2023-07-30 14:50:11 +00:00
|
|
|
};
|
|
|
|
|
2023-10-29 00:51:21 +00:00
|
|
|
outputs = inputs@{ self, ... }:
|
2023-07-30 14:50:11 +00:00
|
|
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
2023-10-28 11:48:56 +00:00
|
|
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
2023-07-30 14:50:11 +00:00
|
|
|
|
|
|
|
imports = [
|
|
|
|
inputs.nixos-flake.flakeModule
|
2024-04-03 18:54:40 +00:00
|
|
|
./logins
|
2023-10-27 21:06:55 +00:00
|
|
|
./lib
|
2023-10-28 13:36:13 +00:00
|
|
|
./overlays
|
2023-10-30 14:54:23 +00:00
|
|
|
./hosts
|
2023-07-30 14:50:11 +00:00
|
|
|
];
|
|
|
|
|
2023-10-28 10:38:14 +00:00
|
|
|
perSystem = { system, pkgs, config, ... }: {
|
|
|
|
_module.args = {
|
|
|
|
inherit inputs;
|
|
|
|
pkgs = import inputs.nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
|
|
|
inputs.agenix.overlays.default
|
|
|
|
];
|
|
|
|
};
|
|
|
|
unstable = import inputs.unstable { inherit system; };
|
|
|
|
master = import inputs.master { inherit system; };
|
|
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
deploy-rs
|
|
|
|
nixpkgs-fmt
|
|
|
|
agenix
|
2024-04-03 18:54:40 +00:00
|
|
|
age-plugin-yubikey
|
2023-10-28 10:38:14 +00:00
|
|
|
cachix
|
|
|
|
editorconfig-checker
|
|
|
|
nodePackages.prettier
|
|
|
|
nvfetcher
|
|
|
|
shellcheck
|
|
|
|
shfmt
|
|
|
|
treefmt
|
|
|
|
nixos-generators
|
2023-10-29 12:00:23 +00:00
|
|
|
inputs.nixpkgs-2205.legacyPackages.${system}.terraform
|
2023-10-29 16:22:15 +00:00
|
|
|
jq
|
2023-10-28 10:38:14 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2023-07-30 14:50:11 +00:00
|
|
|
|
|
|
|
flake =
|
|
|
|
let
|
2023-10-27 21:06:55 +00:00
|
|
|
username = "barkeeper";
|
|
|
|
in
|
|
|
|
{
|
2023-10-30 14:54:23 +00:00
|
|
|
inherit username;
|
2023-07-30 14:50:11 +00:00
|
|
|
|
2024-04-28 17:05:12 +00:00
|
|
|
nixosModules = builtins.listToAttrs (
|
|
|
|
map
|
|
|
|
(x: {
|
|
|
|
name = x;
|
|
|
|
value = import (./modules + "/${x}");
|
|
|
|
})
|
|
|
|
(builtins.attrNames (builtins.readDir ./modules))
|
|
|
|
);
|
|
|
|
|
|
|
|
checks = builtins.mapAttrs
|
|
|
|
(
|
|
|
|
system: deployLib: deployLib.deployChecks self.deploy
|
|
|
|
)
|
|
|
|
inputs.deploy-rs.lib;
|
2024-04-28 15:36:45 +00:00
|
|
|
|
|
|
|
formatter."x86_64-linux" = inputs.unstable.legacyPackages."x86_64-linux".nixfmt-rfc-style;
|
2023-10-28 12:25:41 +00:00
|
|
|
|
2023-11-06 21:05:54 +00:00
|
|
|
deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations {
|
2023-10-27 21:06:55 +00:00
|
|
|
nachtigall = {
|
2024-04-05 14:11:42 +00:00
|
|
|
hostname = "10.7.6.1";
|
2023-10-27 21:06:55 +00:00
|
|
|
sshUser = username;
|
2023-07-30 14:50:11 +00:00
|
|
|
};
|
2023-11-09 02:35:04 +00:00
|
|
|
flora-6 = {
|
2024-04-05 14:11:42 +00:00
|
|
|
hostname = "10.7.6.2";
|
2023-11-09 02:35:04 +00:00
|
|
|
sshUser = username;
|
|
|
|
};
|
2023-07-30 14:50:11 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|