2026-02-06 17:12:02 +01:00
|
|
|
{ pkgs, lib, config, modulesPath, ... }:
|
|
|
|
|
let
|
|
|
|
|
name = config.networking.hostName;
|
|
|
|
|
moduleList = import (modulesPath + "/module-list.nix");
|
|
|
|
|
|
2026-02-09 14:32:56 +01:00
|
|
|
dynixFromSearchPath = let
|
|
|
|
|
res = builtins.tryEval <dynix>;
|
|
|
|
|
in lib.optional res.success res.value;
|
2026-02-06 17:12:02 +01:00
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
imports = moduleList ++ [
|
2026-02-09 14:32:56 +01:00
|
|
|
"${modulesPath}/testing/test-instrumentation.nix"
|
|
|
|
|
./hardware-configuration.nix
|
2026-02-06 17:12:02 +01:00
|
|
|
] ++ lib.concatLists [
|
2026-02-09 14:32:56 +01:00
|
|
|
dynixFromSearchPath
|
2026-02-06 17:12:02 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
system.switch.enable = true;
|
|
|
|
|
documentation.enable = false;
|
|
|
|
|
|
2026-02-10 14:59:44 +01:00
|
|
|
networking.hostName = "gotosocial-machine";
|
2026-02-06 17:12:02 +01:00
|
|
|
|
|
|
|
|
boot.loader.grub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
device = "/dev/vda";
|
|
|
|
|
forceInstall = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
|
package = pkgs.lixPackageSets.latest.lix;
|
2026-02-09 14:32:56 +01:00
|
|
|
nixPath = [
|
|
|
|
|
"nixpkgs=${pkgs.path}"
|
|
|
|
|
"/nix/var/nix/profiles/per-user/root/profile/share/nixos/modules"
|
|
|
|
|
];
|
2026-02-06 17:12:02 +01:00
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
|
experimental-features = [ "nix-command" "pipe-operator" ];
|
|
|
|
|
substituters = lib.mkForce [ ];
|
|
|
|
|
hashed-mirrors = null;
|
|
|
|
|
connect-timeout = 1;
|
2026-02-09 14:32:56 +01:00
|
|
|
# For my debugging purposes.
|
|
|
|
|
show-trace = true;
|
2026-02-06 17:12:02 +01:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.gotosocial = {
|
|
|
|
|
enable = true;
|
|
|
|
|
setupPostgresqlDB = true;
|
|
|
|
|
settings = {
|
2026-02-10 14:59:44 +01:00
|
|
|
application-name = "gotosocial-for-machine";
|
2026-02-06 17:12:02 +01:00
|
|
|
host = "${name}.local";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
dynamicism.for.gotosocial.enable = true;
|
|
|
|
|
|
|
|
|
|
environment.pathsToLink = [ "/share" ];
|
2026-02-09 14:32:56 +01:00
|
|
|
environment.extraOutputsToInstall = [ "modules" ];
|
2026-02-06 17:12:02 +01:00
|
|
|
environment.variables = {
|
|
|
|
|
"NIXOS_CONFIG" = "/etc/nixos/configuration.nix";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
environment.shellAliases = {
|
|
|
|
|
ls = "eza --long --header --group --group-directories-first --classify --binary";
|
|
|
|
|
};
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
eza
|
|
|
|
|
fd
|
|
|
|
|
ripgrep
|
|
|
|
|
];
|
|
|
|
|
}
|