2023-03-07 19:24:57 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-11-22 16:26:16 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
2024-09-05 17:55:42 +00:00
|
|
|
nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin";
|
|
|
|
|
|
|
|
lix-module = {
|
|
|
|
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-03-07 19:24:57 +00:00
|
|
|
|
2023-09-17 16:57:46 +00:00
|
|
|
vampysite.url = "git+https://git.lain.faith/sorceress/vampysite";
|
|
|
|
|
2023-03-07 19:24:57 +00:00
|
|
|
home-manager = {
|
2024-09-05 15:51:23 +00:00
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
2023-03-07 19:24:57 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2024-09-05 17:55:42 +00:00
|
|
|
nix-darwin = {
|
|
|
|
url = "github:LnL7/nix-darwin";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
|
|
|
};
|
|
|
|
|
2023-03-07 19:24:57 +00:00
|
|
|
mms = {
|
|
|
|
url = "github:mkaito/nixos-modded-minecraft-servers";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2023-09-17 16:57:46 +00:00
|
|
|
url-eater = {
|
|
|
|
url = "github:AgathaSorceress/url-eater";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
2023-04-07 16:20:50 +00:00
|
|
|
|
2023-09-17 16:57:46 +00:00
|
|
|
matrix-ril100 = {
|
|
|
|
url = "git+https://git.lain.faith/sorceress/matrix-ril100";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
2023-07-07 14:08:54 +00:00
|
|
|
|
2023-04-19 08:24:08 +00:00
|
|
|
# Latest colmena + prettier loading icons
|
2023-09-17 16:57:46 +00:00
|
|
|
colmena = {
|
|
|
|
url = "github:AgathaSorceress/colmena";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
2023-04-19 08:24:08 +00:00
|
|
|
|
2023-09-17 16:57:46 +00:00
|
|
|
frq-friend = {
|
|
|
|
url = "git+https://git.xenua.me/xenua/fedi-frq-friend";
|
2024-11-22 16:26:16 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-09-17 16:57:46 +00:00
|
|
|
};
|
2023-04-13 11:11:32 +00:00
|
|
|
|
2023-09-17 16:57:46 +00:00
|
|
|
helix = {
|
|
|
|
url = "github:helix-editor/helix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
2023-09-29 13:04:31 +00:00
|
|
|
|
|
|
|
ccase = {
|
|
|
|
url = "github:rutrum/ccase";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
2023-03-07 19:24:57 +00:00
|
|
|
};
|
2024-09-05 17:55:42 +00:00
|
|
|
outputs =
|
|
|
|
{
|
|
|
|
nixpkgs,
|
|
|
|
nixpkgs-unstable,
|
2024-11-22 16:26:16 +00:00
|
|
|
nixpkgs-darwin,
|
2024-09-05 17:55:42 +00:00
|
|
|
lix-module,
|
|
|
|
home-manager,
|
|
|
|
nix-darwin,
|
|
|
|
mms,
|
|
|
|
helix,
|
|
|
|
url-eater,
|
|
|
|
matrix-ril100,
|
|
|
|
frq-friend,
|
|
|
|
colmena,
|
|
|
|
vampysite,
|
|
|
|
ccase,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
2024-11-22 16:26:16 +00:00
|
|
|
mkOverlays = system: config: [
|
2024-09-05 17:55:42 +00:00
|
|
|
(final: prev: {
|
|
|
|
helix =
|
|
|
|
let
|
|
|
|
helix-pkgs = helix.packages.${final.system};
|
|
|
|
in
|
|
|
|
helix-pkgs.helix.passthru.wrapper (
|
|
|
|
helix-pkgs.helix-unwrapped.overrideAttrs {
|
|
|
|
preInstall = ''
|
|
|
|
substituteInPlace contrib/Helix.desktop \
|
|
|
|
--replace "Exec=hx %F" "Exec=kitty hx %F" \
|
|
|
|
--replace "Terminal=true" "Terminal=false"
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
frq-friend = frq-friend.packages.${final.system}.default;
|
|
|
|
vampysite = vampysite.packages.${final.system}.default;
|
|
|
|
matrix-ril100 = matrix-ril100.packages.${final.system}.default;
|
|
|
|
ccase = ccase.packages.${final.system}.default;
|
2023-09-17 16:57:46 +00:00
|
|
|
|
2024-09-05 17:55:42 +00:00
|
|
|
# Unstable packages
|
|
|
|
unstable = import nixpkgs-unstable { inherit system config; };
|
|
|
|
})
|
|
|
|
colmena.overlay
|
2024-11-22 16:26:16 +00:00
|
|
|
lix-module.overlays.default
|
2024-09-05 17:55:42 +00:00
|
|
|
];
|
|
|
|
in
|
|
|
|
{
|
|
|
|
colmena = {
|
2023-04-11 17:49:24 +00:00
|
|
|
network = {
|
|
|
|
description = "Agatha's Nix Infra";
|
2023-03-07 19:24:57 +00:00
|
|
|
|
2023-10-22 14:07:34 +00:00
|
|
|
nixpkgs = import nixpkgs rec {
|
2023-04-11 17:49:24 +00:00
|
|
|
system = "x86_64-linux";
|
2023-11-09 19:07:06 +00:00
|
|
|
config.allowUnfree = true;
|
2024-11-22 16:26:16 +00:00
|
|
|
overlays = mkOverlays system config;
|
2023-04-11 17:49:24 +00:00
|
|
|
};
|
2023-03-07 19:24:57 +00:00
|
|
|
};
|
|
|
|
|
2023-04-11 17:49:24 +00:00
|
|
|
bloodletting = {
|
|
|
|
imports = [
|
|
|
|
./common
|
2024-09-05 17:55:42 +00:00
|
|
|
./common/linux-specific.nix
|
2023-04-11 17:49:24 +00:00
|
|
|
./hosts/bloodletting/configuration.nix
|
|
|
|
(import "${home-manager}/nixos")
|
|
|
|
mms.module
|
|
|
|
];
|
2023-03-07 19:24:57 +00:00
|
|
|
|
2023-04-11 17:49:24 +00:00
|
|
|
deployment = {
|
|
|
|
targetUser = "root";
|
2024-11-22 16:26:16 +00:00
|
|
|
targetHost = "technogothic.net";
|
2023-03-07 19:24:57 +00:00
|
|
|
|
2023-04-11 17:49:24 +00:00
|
|
|
tags = [ "prod" ];
|
2023-03-07 19:24:57 +00:00
|
|
|
|
2023-04-11 17:49:24 +00:00
|
|
|
keys = {
|
|
|
|
"nyandroid-token" = {
|
2024-09-05 17:55:42 +00:00
|
|
|
keyCommand = [
|
|
|
|
"cat"
|
|
|
|
"./secrets/nyandroid-token"
|
|
|
|
];
|
2023-04-11 17:49:24 +00:00
|
|
|
destDir = "/var/lib/secrets/";
|
|
|
|
};
|
2024-05-22 00:10:22 +00:00
|
|
|
"hurricane-tokens" = {
|
2024-09-05 17:55:42 +00:00
|
|
|
keyCommand = [
|
|
|
|
"cat"
|
|
|
|
"./secrets/hurricane-tokens"
|
|
|
|
];
|
2023-04-11 17:49:24 +00:00
|
|
|
destDir = "/var/lib/secrets/";
|
|
|
|
};
|
2024-05-22 00:11:16 +00:00
|
|
|
"mc-status-bot-env" = {
|
2024-09-05 17:55:42 +00:00
|
|
|
keyCommand = [
|
|
|
|
"cat"
|
|
|
|
"./secrets/mc-status-bot-env"
|
|
|
|
];
|
2024-05-22 00:11:16 +00:00
|
|
|
destDir = "/var/lib/secrets";
|
|
|
|
};
|
2023-04-13 11:11:32 +00:00
|
|
|
"fedi-data.toml" = {
|
2024-09-05 17:55:42 +00:00
|
|
|
keyCommand = [
|
|
|
|
"cat"
|
|
|
|
"./secrets/frq-friend-fedi-data.toml"
|
|
|
|
];
|
2023-04-13 11:11:32 +00:00
|
|
|
destDir = "/var/lib/frq-friend";
|
|
|
|
};
|
2023-07-07 14:08:54 +00:00
|
|
|
"ril100-bot-secrets" = {
|
2024-09-05 17:55:42 +00:00
|
|
|
keyCommand = [
|
|
|
|
"cat"
|
|
|
|
"./secrets/ril100-bot-secrets"
|
|
|
|
];
|
2023-07-07 14:08:54 +00:00
|
|
|
destDir = "/var/lib/matrix-ril100";
|
|
|
|
name = ".env";
|
|
|
|
};
|
2023-03-07 19:24:57 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-03-26 16:14:49 +00:00
|
|
|
|
2024-09-05 16:30:11 +00:00
|
|
|
watchtower = {
|
|
|
|
imports = [
|
|
|
|
./common
|
|
|
|
./common/linux-specific.nix
|
|
|
|
./hosts/watchtower/configuration.nix
|
|
|
|
(import "${home-manager}/nixos")
|
|
|
|
];
|
|
|
|
|
|
|
|
deployment = {
|
|
|
|
targetUser = "root";
|
|
|
|
targetHost = "watchtower";
|
|
|
|
|
|
|
|
tags = [ "prod" ];
|
2024-11-22 16:33:01 +00:00
|
|
|
|
|
|
|
keys = {
|
|
|
|
"hetzner-env" = {
|
|
|
|
keyCommand = [
|
|
|
|
"cat"
|
|
|
|
"./secrets/hetzner-env"
|
|
|
|
];
|
|
|
|
destDir = "/var/lib/secrets/";
|
|
|
|
};
|
|
|
|
"gocryptfs-pass" = {
|
|
|
|
keyCommand = [
|
|
|
|
"cat"
|
|
|
|
"./secrets/gocryptfs-pass"
|
|
|
|
];
|
|
|
|
destDir = "/var/lib/secrets/";
|
|
|
|
};
|
|
|
|
};
|
2024-09-05 16:30:11 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-11-29 16:07:02 +00:00
|
|
|
tears = {
|
|
|
|
imports = [
|
|
|
|
./common
|
|
|
|
./common/linux-specific.nix
|
|
|
|
./hosts/tears/configuration.nix
|
|
|
|
./common/options.nix
|
|
|
|
(import "${home-manager}/nixos")
|
|
|
|
url-eater.nixosModules.default
|
|
|
|
];
|
|
|
|
|
|
|
|
deployment = {
|
|
|
|
targetUser = "root";
|
|
|
|
targetHost = "tears";
|
|
|
|
|
|
|
|
tags = [ "home" ];
|
|
|
|
|
|
|
|
allowLocalDeployment = true;
|
|
|
|
|
|
|
|
keys = {
|
|
|
|
"restic-password" = {
|
|
|
|
keyCommand = [
|
|
|
|
"cat"
|
|
|
|
"./secrets/restic-password"
|
|
|
|
];
|
|
|
|
destDir = "/var/lib/secrets/";
|
|
|
|
};
|
|
|
|
"restic-env" = {
|
|
|
|
keyCommand = [
|
|
|
|
"cat"
|
|
|
|
"./secrets/restic-env"
|
|
|
|
];
|
|
|
|
destDir = "/var/lib/secrets/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-03-26 16:14:49 +00:00
|
|
|
};
|
2024-09-05 17:55:42 +00:00
|
|
|
darwinConfigurations."Agathas-Mac-mini" = nix-darwin.lib.darwinSystem {
|
2024-11-22 16:26:16 +00:00
|
|
|
pkgs = import nixpkgs-darwin rec {
|
|
|
|
system = "aarch64-darwin";
|
|
|
|
config.allowUnfree = true;
|
|
|
|
overlays = mkOverlays system config;
|
|
|
|
};
|
2024-09-05 17:55:42 +00:00
|
|
|
modules = [
|
|
|
|
./common
|
|
|
|
./hosts/Agathas-Mac-mini/configuration.nix
|
|
|
|
(import "${home-manager}/nix-darwin")
|
|
|
|
];
|
|
|
|
};
|
2024-11-29 16:07:02 +00:00
|
|
|
darwinConfigurations."ritual" = nix-darwin.lib.darwinSystem {
|
|
|
|
pkgs = import nixpkgs-darwin rec {
|
|
|
|
system = "x86_64-darwin";
|
|
|
|
config.allowUnfree = true;
|
|
|
|
overlays = mkOverlays system config;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
./common
|
|
|
|
./hosts/ritual/configuration.nix
|
|
|
|
(import "${home-manager}/nix-darwin")
|
|
|
|
];
|
|
|
|
};
|
2024-11-22 16:26:16 +00:00
|
|
|
devShells =
|
2024-09-05 17:55:42 +00:00
|
|
|
let
|
2024-11-22 16:26:16 +00:00
|
|
|
patchedColmena =
|
|
|
|
system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
in
|
|
|
|
pkgs.mkShell {
|
|
|
|
buildInputs = [
|
|
|
|
(pkgs.writeShellScriptBin "colmena" ''
|
|
|
|
${colmena.defaultPackage.${pkgs.system}}/bin/colmena --disable-emoji $@
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
};
|
2024-09-05 17:55:42 +00:00
|
|
|
in
|
2024-11-22 16:26:16 +00:00
|
|
|
{
|
|
|
|
"x86_64-linux".default = patchedColmena "x86_64-linux";
|
|
|
|
"aarch64-darwin".default = patchedColmena "aarch64-darwin";
|
2024-11-29 16:07:02 +00:00
|
|
|
"x86_64-darwin".default = patchedColmena "x86_64-darwin";
|
2023-04-19 08:24:08 +00:00
|
|
|
};
|
2023-03-07 19:24:57 +00:00
|
|
|
};
|
|
|
|
}
|