2023-03-07 19:24:57 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-09-05 15:51:23 +00:00
|
|
|
nixpkgs.url = "nixpkgs/nixos-24.05";
|
2023-04-30 10:49:28 +00:00
|
|
|
nixpkgs-unstable.url = "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
|
|
|
colorpickle = {
|
|
|
|
url = "github:AgathaSorceress/colorpickle";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
2023-04-11 17:49:24 +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";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
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,
|
|
|
|
lix-module,
|
|
|
|
home-manager,
|
|
|
|
nix-darwin,
|
|
|
|
mms,
|
|
|
|
helix,
|
|
|
|
url-eater,
|
|
|
|
colorpickle,
|
|
|
|
matrix-ril100,
|
|
|
|
frq-friend,
|
|
|
|
colmena,
|
|
|
|
vampysite,
|
|
|
|
ccase,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
overlays = system: config: [
|
|
|
|
(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"
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
colorpickle = colorpickle.packages.${final.system}.default;
|
|
|
|
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
|
|
|
|
];
|
|
|
|
mkDesktop = hostname: {
|
|
|
|
imports = [
|
|
|
|
./common
|
|
|
|
./common/linux-specific.nix
|
|
|
|
./hosts/${hostname}/configuration.nix
|
|
|
|
./common/options.nix
|
|
|
|
lix-module.nixosModules.default
|
|
|
|
(import "${home-manager}/nixos")
|
|
|
|
url-eater.nixosModules.default
|
|
|
|
colorpickle.nixosModules.default
|
|
|
|
];
|
2023-09-17 16:57:46 +00:00
|
|
|
|
2024-09-05 17:55:42 +00:00
|
|
|
deployment = {
|
|
|
|
targetUser = "root";
|
|
|
|
targetHost = hostname;
|
2023-09-17 16:57:46 +00:00
|
|
|
|
2024-09-05 17:55:42 +00:00
|
|
|
tags = [ "home" ];
|
2023-10-04 12:58:29 +00:00
|
|
|
|
2024-09-05 17:55:42 +00:00
|
|
|
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-10-04 12:58:29 +00:00
|
|
|
};
|
2023-09-17 16:57:46 +00:00
|
|
|
};
|
|
|
|
};
|
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-09-05 17:55:42 +00:00
|
|
|
overlays = overlays 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
|
2024-09-05 17:55:42 +00:00
|
|
|
lix-module.nixosModules.default
|
2023-04-11 17:49:24 +00:00
|
|
|
(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";
|
|
|
|
targetHost = "bloodletting";
|
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
|
2024-09-05 17:55:42 +00:00
|
|
|
lix-module.nixosModules.default
|
2024-09-05 16:30:11 +00:00
|
|
|
(import "${home-manager}/nixos")
|
|
|
|
];
|
|
|
|
|
|
|
|
deployment = {
|
|
|
|
targetUser = "root";
|
|
|
|
targetHost = "watchtower";
|
|
|
|
|
|
|
|
tags = [ "prod" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-09-17 16:57:46 +00:00
|
|
|
ritual = mkDesktop "ritual";
|
|
|
|
tears = mkDesktop "tears";
|
2023-03-26 16:14:49 +00:00
|
|
|
};
|
2024-09-05 17:55:42 +00:00
|
|
|
darwinConfigurations."Agathas-Mac-mini" = nix-darwin.lib.darwinSystem {
|
|
|
|
modules = [
|
|
|
|
./common
|
|
|
|
./hosts/Agathas-Mac-mini/configuration.nix
|
|
|
|
lix-module.nixosModules.default
|
|
|
|
(import "${home-manager}/nix-darwin")
|
|
|
|
(
|
|
|
|
{ config, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = overlays nixpkgs.system config;
|
|
|
|
}
|
|
|
|
)
|
|
|
|
];
|
|
|
|
};
|
2023-04-19 08:24:08 +00:00
|
|
|
devShells."x86_64-linux".default =
|
2024-09-05 17:55:42 +00:00
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
|
|
|
in
|
|
|
|
pkgs.mkShell {
|
2023-04-19 08:24:08 +00:00
|
|
|
buildInputs = [
|
|
|
|
(pkgs.writeShellScriptBin "colmena" ''
|
2024-09-05 17:55:42 +00:00
|
|
|
${colmena.defaultPackage.${pkgs.system}}/bin/colmena --disable-emoji $@
|
2023-04-19 08:24:08 +00:00
|
|
|
'')
|
|
|
|
];
|
|
|
|
};
|
2023-03-07 19:24:57 +00:00
|
|
|
};
|
|
|
|
}
|