nix-infra/flake.nix

128 lines
3.9 KiB
Nix

{
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
mms = {
url = "github:mkaito/nixos-modded-minecraft-servers";
inputs.nixpkgs.follows = "nixpkgs";
};
url-eater.url = "github:AgathaSorceress/url-eater";
colorpickle.url = "github:AgathaSorceress/colorpickle";
matrix-ril100.url = "git+https://git.lain.faith/sorceress/matrix-ril100";
# Latest colmena + prettier loading icons
colmena.url = "github:AgathaSorceress/colmena";
frq-friend.url = "git+https://git.xenua.me/xenua/fedi-frq-friend";
vampysite.url = "git+https://git.lain.faith/sorceress/vampysite";
spicetify-nix.url = "github:the-argus/spicetify-nix";
helix.url = "github:helix-editor/helix";
};
outputs = { nixpkgs, nixpkgs-unstable, home-manager, mms, helix, url-eater
, colorpickle, matrix-ril100, frq-friend, colmena, vampysite, spicetify-nix
, ... }: {
colmena = {
network = {
description = "Agatha's Nix Infra";
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [
(final: prev: {
helix = helix.packages.${final.system}.default;
colorpickle = colorpickle.packages.${final.system}.default;
frq-friend = frq-friend.defaultPackage.${final.system};
vampysite = vampysite.packages.${final.system}.default;
spicetify-pkgs = spicetify-nix.packages.${final.system}.default;
matrix-ril100 = matrix-ril100.packages.${final.system}.default;
})
colmena.overlay
];
};
};
bloodletting = {
imports = [
./common
./hosts/bloodletting/configuration.nix
(import "${home-manager}/nixos")
mms.module
"${nixpkgs-unstable}/nixos/modules/services/web-apps/mastodon.nix"
];
disabledModules = [ "services/web-apps/mastodon.nix" ];
deployment = {
targetUser = "root";
targetHost = "bloodletting";
tags = [ "prod" ];
keys = {
"nyandroid-token" = {
keyCommand = [ "cat" "./secrets/nyandroid-token" ];
destDir = "/var/lib/secrets/";
};
"rfc2136-technogothic-net" = {
keyCommand = [ "cat" "./secrets/rfc2136-technogothic-net" ];
destDir = "/var/lib/secrets/";
};
"fedi-data.toml" = {
keyCommand = [ "cat" "./secrets/frq-friend-fedi-data.toml" ];
destDir = "/var/lib/frq-friend";
};
"ril100-bot-secrets" = {
keyCommand = [ "cat" "./secrets/ril100-bot-secrets" ];
destDir = "/var/lib/matrix-ril100";
name = ".env";
};
};
};
};
ritual = {
imports = [
./common
./hosts/ritual/configuration.nix
./common/options.nix
(import "${home-manager}/nixos")
url-eater.nixosModule
colorpickle.nixosModules.default
spicetify-nix.nixosModule
];
deployment = {
targetUser = "root";
targetHost = "ritual";
tags = [ "home" ];
allowLocalDeployment = true;
};
};
};
devShells."x86_64-linux".default =
let pkgs = import nixpkgs { system = "x86_64-linux"; };
in pkgs.mkShell {
buildInputs = [
(pkgs.writeShellScriptBin "colmena" ''
${
colmena.defaultPackage.${pkgs.system}
}/bin/colmena --disable-emoji $@
'')
];
};
};
}