176 lines
5.3 KiB
Nix
176 lines
5.3 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-24.05";
|
|
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
|
|
|
|
vampysite.url = "git+https://git.lain.faith/sorceress/vampysite";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
mms = {
|
|
url = "github:mkaito/nixos-modded-minecraft-servers";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
url-eater = {
|
|
url = "github:AgathaSorceress/url-eater";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
|
|
colorpickle = {
|
|
url = "github:AgathaSorceress/colorpickle";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
|
|
matrix-ril100 = {
|
|
url = "git+https://git.lain.faith/sorceress/matrix-ril100";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
|
|
# Latest colmena + prettier loading icons
|
|
colmena = {
|
|
url = "github:AgathaSorceress/colmena";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
|
|
frq-friend = {
|
|
url = "git+https://git.xenua.me/xenua/fedi-frq-friend";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
|
|
helix = {
|
|
url = "github:helix-editor/helix";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
|
|
ccase = {
|
|
url = "github:rutrum/ccase";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
};
|
|
outputs = { nixpkgs, nixpkgs-unstable, home-manager, mms, helix, url-eater
|
|
, colorpickle, matrix-ril100, frq-friend, colmena, vampysite, ccase, ...
|
|
}: {
|
|
colmena = let
|
|
mkDesktop = hostname: {
|
|
imports = [
|
|
./common
|
|
./hosts/${hostname}/configuration.nix
|
|
./common/options.nix
|
|
(import "${home-manager}/nixos")
|
|
url-eater.nixosModules.default
|
|
colorpickle.nixosModules.default
|
|
];
|
|
|
|
deployment = {
|
|
targetUser = "root";
|
|
targetHost = hostname;
|
|
|
|
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/";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
in {
|
|
network = {
|
|
description = "Agatha's Nix Infra";
|
|
|
|
nixpkgs = import nixpkgs rec {
|
|
system = "x86_64-linux";
|
|
config.allowUnfree = true;
|
|
overlays = [
|
|
(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;
|
|
|
|
# Unstable packages
|
|
unstable = import nixpkgs-unstable { inherit system config; };
|
|
})
|
|
colmena.overlay
|
|
];
|
|
};
|
|
};
|
|
|
|
bloodletting = {
|
|
imports = [
|
|
./common
|
|
./hosts/bloodletting/configuration.nix
|
|
(import "${home-manager}/nixos")
|
|
mms.module
|
|
];
|
|
|
|
deployment = {
|
|
targetUser = "root";
|
|
targetHost = "bloodletting";
|
|
|
|
tags = [ "prod" ];
|
|
|
|
keys = {
|
|
"nyandroid-token" = {
|
|
keyCommand = [ "cat" "./secrets/nyandroid-token" ];
|
|
destDir = "/var/lib/secrets/";
|
|
};
|
|
"hurricane-tokens" = {
|
|
keyCommand = [ "cat" "./secrets/hurricane-tokens" ];
|
|
destDir = "/var/lib/secrets/";
|
|
};
|
|
"mc-status-bot-env" = {
|
|
keyCommand = [ "cat" "./secrets/mc-status-bot-env" ];
|
|
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 = mkDesktop "ritual";
|
|
tears = mkDesktop "tears";
|
|
};
|
|
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 $@
|
|
'')
|
|
];
|
|
};
|
|
};
|
|
}
|