2022-12-07 22:13:28 +01:00
|
|
|
{
|
|
|
|
description = "PVV System flake";
|
|
|
|
|
|
|
|
inputs = {
|
2023-05-31 11:04:38 +02:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05-small";
|
2022-12-07 22:13:28 +01:00
|
|
|
unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
|
|
|
|
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
|
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2023-08-27 02:36:01 +02:00
|
|
|
pvv-calendar-bot.url = "git+https://git.pvv.ntnu.no/Drift/calendar-bot.git?ref=main&rev=6f125fdb1fd23b5d634cf50235f16f8c5f03e5be";
|
|
|
|
pvv-calendar-bot.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2023-01-17 11:17:29 +01:00
|
|
|
matrix-next.url = "github:dali99/nixos-matrix-modules";
|
2022-12-07 22:13:28 +01:00
|
|
|
};
|
|
|
|
|
2023-08-27 02:36:01 +02:00
|
|
|
outputs = { self, nixpkgs, matrix-next, pvv-calendar-bot, unstable, sops-nix, ... }@inputs:
|
2022-12-09 03:43:14 +01:00
|
|
|
let
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
2023-08-17 22:05:09 +02:00
|
|
|
"aarch64-darwin"
|
2022-12-09 03:43:14 +01:00
|
|
|
];
|
|
|
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
|
|
|
in {
|
2023-01-29 01:51:35 +01:00
|
|
|
nixosConfigurations = let
|
2023-07-10 00:02:01 +02:00
|
|
|
nixosConfig = nixpkgs: name: config: nixpkgs.lib.nixosSystem (nixpkgs.lib.recursiveUpdate
|
2023-03-26 04:21:03 +02:00
|
|
|
rec {
|
2023-01-29 01:51:35 +01:00
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = {
|
|
|
|
inherit unstable inputs;
|
|
|
|
values = import ./values.nix;
|
|
|
|
};
|
2023-05-31 11:04:38 +02:00
|
|
|
|
2023-01-29 01:51:35 +01:00
|
|
|
modules = [
|
|
|
|
./hosts/${name}/configuration.nix
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
];
|
2023-05-31 11:04:38 +02:00
|
|
|
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
|
|
|
(final: prev: {
|
|
|
|
mx-puppet-discord = prev.mx-puppet-discord.override { nodejs_14 = final.nodejs_18; };
|
|
|
|
})
|
2023-08-27 02:36:01 +02:00
|
|
|
pvv-calendar-bot.overlays.${system}.default
|
2023-05-31 11:04:38 +02:00
|
|
|
];
|
|
|
|
};
|
2023-05-23 04:43:39 +02:00
|
|
|
}
|
|
|
|
config
|
|
|
|
);
|
2022-12-07 22:13:28 +01:00
|
|
|
|
2023-07-10 00:02:01 +02:00
|
|
|
stableNixosConfig = nixosConfig nixpkgs;
|
|
|
|
unstableNixosConfig = nixosConfig unstable;
|
2023-01-29 01:51:35 +01:00
|
|
|
in {
|
2023-07-10 00:02:01 +02:00
|
|
|
bicep = stableNixosConfig "bicep" {
|
2023-05-23 04:43:39 +02:00
|
|
|
modules = [
|
|
|
|
./hosts/bicep/configuration.nix
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
|
|
|
|
matrix-next.nixosModules.synapse
|
2023-08-27 02:36:01 +02:00
|
|
|
pvv-calendar-bot.nixosModules.default
|
2023-05-23 04:43:39 +02:00
|
|
|
];
|
2023-05-23 04:26:36 +02:00
|
|
|
};
|
2023-07-10 00:02:01 +02:00
|
|
|
bekkalokk = stableNixosConfig "bekkalokk" { };
|
|
|
|
greddost = stableNixosConfig "greddost" { };
|
|
|
|
ildkule = stableNixosConfig "ildkule" { };
|
|
|
|
ildkule-unstable = unstableNixosConfig "ildkule" { };
|
|
|
|
jokum = stableNixosConfig "jokum" {
|
|
|
|
modules = [ matrix-next.nixosModules.synapse ];
|
|
|
|
};
|
2023-09-08 02:10:40 +02:00
|
|
|
shark = stableNixosConfig "shark" { };
|
2022-12-07 22:13:28 +01:00
|
|
|
};
|
2023-01-29 01:51:35 +01:00
|
|
|
|
2022-12-09 03:43:14 +01:00
|
|
|
devShells = forAllSystems (system: {
|
|
|
|
default = nixpkgs.legacyPackages.${system}.callPackage ./shell.nix { };
|
|
|
|
});
|
2022-12-07 22:13:28 +01:00
|
|
|
};
|
|
|
|
}
|