snix/users/flokli/nixos/archivist-ec2/configuration.nix
Florian Klink a59e95a287 fix(ops/nixos): don't set nixpkgs.pkgs explicitly
As soon as you pass in an already-instantiated nixpkgs version, it will
cause nixpkgs.hostPlatform etc. to be not applied.

This means it's impossible to describe the architecture of a VM closure
you're deploying, and have it deviate from the machine you're evaluating
from, making it quite hard to deploy that x86_64-linux machine from
aarch64-linux (where I'm writing this commit message from).

Drop explicitly passing in nixpkgs.path, and set nixpkgs.hostPlatform
explicitly for all remaining system configurations in the repository
where not already set.

Change-Id: Ie2a596e0826da54674b4f02fcd8fed3569fee0a4
Reviewed-on: https://cl.snix.dev/c/snix/+/30104
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ryan Lahfa <masterancpp@gmail.com>
2025-03-18 17:23:37 +00:00

37 lines
939 B
Nix

{ depot, pkgs, modulesPath, ... }:
{
imports = [
"${modulesPath}/virtualisation/amazon-image.nix"
../profiles/archivist.nix
];
nixpkgs.hostPlatform = "x86_64-linux";
systemd.timers.parse-bucket-logs = {
wantedBy = [ "multi-user.target" ];
timerConfig.OnCalendar = "*-*-* 03:00:00 UTC";
};
systemd.services.parse-bucket-logs = {
path = [ depot.users.flokli.archivist.parse-bucket-logs ];
serviceConfig = {
Type = "oneshot";
ExecStart = (pkgs.writers.writePython3 "parse-bucket-logs-continuously"
{
libraries = [ pkgs.python3Packages.boto3 ];
} ./parse-bucket-logs-continuously.py);
DynamicUser = "yes";
StateDirectory = "parse-bucket-logs";
};
};
environment.systemPackages = [
depot.users.flokli.archivist.parse-bucket-logs
];
networking.hostName = "archivist-ec2";
system.stateVersion = "23.05"; # Did you read the comment?
}