home-server/flake.nix
2026-06-15 21:22:41 -07:00

120 lines
3.4 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
continuwuity = {
# Pinned: revs after 1cc9dbf2 (revCount > 6618) bumped ruma to a version
# where RtcFocusInfo / RtcTransport use a hand-rolled
# Box::<RawJsonValue>::deserialize impl that toml-rs can't satisfy,
# breaking any non-empty matrix_rtc.foci config.
url = "git+https://forgejo.ellis.link/continuwuation/continuwuity?rev=1cc9dbf2a47b7b329507cc4ddc970e10b968121c";
};
dicebot = {
url = "git+https://forgejo.ellie.town/wizzy/dicebot.git";
inputs.nixpkgs.follows = "nixpkgs";
};
# Pinned by rev so automated flake updates don't bump the game server:
# Vintage Story clients must match the server version, so upgrades
# should be deliberate. This rev carries vintagestory 1.22.3, which
# needs unstable's package recipe anyway (.NET 10, new asset layout).
nixpkgs-vintagestory.url = "github:nixos/nixpkgs/173d0ad7a974f8543a9ab01d2271b2e290341b33";
};
outputs =
{
nixpkgs,
disko,
sops-nix,
continuwuity,
dicebot,
nixpkgs-vintagestory,
...
}:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in
{
nixosConfigurations.home-server = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit continuwuity dicebot nixpkgs-vintagestory; };
modules = [
disko.nixosModules.disko
sops-nix.nixosModules.sops
(
{ ... }:
{
nixpkgs = {
config.allowUnfree = true;
system = "x86_64-linux";
};
}
)
./hosts/homeserver/hardware-configuration.nix
./common.nix
./hosts/homeserver/configuration.nix
./hosts/homeserver/setup.nix
./services/website.nix
./services/wireguard-inner.nix
./services/matrix.nix
./services/dicebot.nix
./services/ergo.nix
./services/forgejo.nix
./services/forgejo-runner.nix
./services/borgbackup.nix
./services/gotosocial.nix
./services/vintagestory.nix
# ./services/akkoma.nix
];
};
nixosConfigurations.vps = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
disko.nixosModules.disko
sops-nix.nixosModules.sops
(
{ ... }:
{
nixpkgs = {
config.allowUnfree = true;
system = "x86_64-linux";
};
}
)
./hosts/vps/hardware-configuration.nix
./common.nix
./hosts/vps/configuration.nix
./hosts/vps/disko-config.nix
./services/nginx.nix
./services/blog.nix
./services/observer-effect.nix
./services/phanpy.nix
./services/coturn.nix
./services/livekit.nix
./services/lk-jwt.nix
./services/wireguard-outer.nix
./services/borgbackup-vps.nix
];
};
formatter.${system} = pkgs.nixfmt-tree;
};
}