2026-03-05 16:19:06 +01:00
|
|
|
# SPDX-FileCopyrightText: 2026 Qyriad <qyriad@qyriad.me>
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: EUPL-1.1
|
|
|
|
|
|
2026-03-25 19:12:45 +01:00
|
|
|
{ pkgs, lib, modulesPath, config, ... }:
|
2026-02-11 13:19:59 +01:00
|
|
|
let
|
2026-03-05 15:44:58 +01:00
|
|
|
moduleList = import (modulesPath + "/module-list.nix");
|
2026-02-11 13:19:59 +01:00
|
|
|
|
|
|
|
|
dynixFromSearchPath = let
|
|
|
|
|
res = builtins.tryEval <dynix>;
|
|
|
|
|
in lib.optional res.success res.value;
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
imports = [
|
2026-03-05 15:44:58 +01:00
|
|
|
(modulesPath + "/testing/test-instrumentation.nix")
|
2026-02-11 13:19:59 +01:00
|
|
|
] ++ lib.concatLists [
|
|
|
|
|
dynixFromSearchPath
|
|
|
|
|
moduleList
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
system.switch.enable = true;
|
|
|
|
|
documentation.enable = false;
|
|
|
|
|
|
|
|
|
|
boot.loader.grub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
device = "/dev/vda";
|
|
|
|
|
forceInstall = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
|
package = pkgs.lixPackageSets.latest.lix;
|
|
|
|
|
nixPath = [
|
2026-03-05 15:44:58 +01:00
|
|
|
("nixpkgs=" + pkgs.path)
|
2026-02-11 13:19:59 +01:00
|
|
|
"/nix/var/nix/profiles/per-user/root/profile/share/nixos/modules"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
|
experimental-features = [ "nix-command" "pipe-operator" ];
|
|
|
|
|
substituters = lib.mkForce [ ];
|
|
|
|
|
hashed-mirrors = null;
|
|
|
|
|
connect-timeout = 1;
|
|
|
|
|
# For my debugging purposes.
|
|
|
|
|
show-trace = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-22 17:15:04 +01:00
|
|
|
# Setup XDG base directories for me.
|
|
|
|
|
security.pam.services.login = {
|
|
|
|
|
rules.session.xdg = {
|
|
|
|
|
enable = true;
|
|
|
|
|
control = "optional";
|
|
|
|
|
modulePath = "${pkgs.pam_xdg}/lib/security/pam_xdg.so";
|
|
|
|
|
args = [ ];
|
|
|
|
|
order = 10500;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-11 13:19:59 +01:00
|
|
|
environment.pathsToLink = [ "/share" ];
|
|
|
|
|
environment.extraOutputsToInstall = [ "modules" ];
|
|
|
|
|
environment.variables = {
|
|
|
|
|
"NIXOS_CONFIG" = "/etc/nixos/configuration.nix";
|
|
|
|
|
};
|
2026-03-22 17:15:04 +01:00
|
|
|
environment.sessionVariables = {
|
|
|
|
|
"NIXOS_CONFIG" = "/etc/nixos/configuration.nix";
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-25 19:12:45 +01:00
|
|
|
systemd.services.dynix-daemon = {
|
|
|
|
|
enable = true;
|
|
|
|
|
path = [ config.nix.package ];
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
Environment = [
|
|
|
|
|
"RUST_LOG=trace"
|
|
|
|
|
];
|
|
|
|
|
ExecSearchPath = [ "/run/current-system/sw/bin" ];
|
|
|
|
|
SuccessExitStatus = [ "0" "2" ];
|
|
|
|
|
# `bash -l` so XDG_RUNTIME_DIR is set correctly. lol.
|
|
|
|
|
ExecStart = "bash -l -c 'exec /root/.nix-profile/bin/dynix daemon --color=always'";
|
|
|
|
|
SyslogIdentifier = "dynix-daemon";
|
|
|
|
|
};
|
|
|
|
|
};
|
2026-02-11 13:19:59 +01:00
|
|
|
|
|
|
|
|
environment.shellAliases = {
|
|
|
|
|
ls = "eza --long --header --group --group-directories-first --classify --binary";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
eza
|
|
|
|
|
fd
|
|
|
|
|
ripgrep
|
2026-03-22 17:15:04 +01:00
|
|
|
netcat.nc
|
|
|
|
|
socat
|
2026-03-25 19:12:45 +01:00
|
|
|
python3
|
2026-02-11 13:19:59 +01:00
|
|
|
];
|
|
|
|
|
}
|