2024-01-09 15:55:29 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
2024-01-09 15:46:18 +01:00
|
|
|
|
2024-01-09 15:55:29 +01:00
|
|
|
with lib; {
|
2024-01-09 15:46:18 +01:00
|
|
|
imports = [
|
|
|
|
../users
|
|
|
|
../../modules
|
|
|
|
./networking.nix
|
|
|
|
./openssh.nix
|
|
|
|
];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
kitty.terminfo
|
|
|
|
bat
|
|
|
|
ripgrep
|
2024-01-09 16:23:24 +01:00
|
|
|
uutils-coreutils
|
2024-01-09 15:46:18 +01:00
|
|
|
git
|
|
|
|
bmon
|
|
|
|
bottom
|
|
|
|
man-pages
|
|
|
|
man-pages-posix
|
|
|
|
linux-manual
|
|
|
|
unzip
|
|
|
|
zip
|
2024-01-16 20:03:30 +01:00
|
|
|
figlet
|
2024-01-09 15:46:18 +01:00
|
|
|
];
|
2024-01-16 20:03:30 +01:00
|
|
|
|
|
|
|
deployment.tags = [ "all" ];
|
|
|
|
deployment.targetHost = mkDefault config.networking.fqdn;
|
|
|
|
deployment.targetPort = mkDefault 22;
|
|
|
|
deployment.targetUser = mkDefault null;
|
|
|
|
|
|
|
|
nix.settings.trusted-users = [ "roo" "@wheel" ];
|
|
|
|
security.dhparams.defaultBitSize = 4096;
|
|
|
|
|
|
|
|
system.activationScripts.motd.text = let
|
|
|
|
cfg = config.system.nixos;
|
|
|
|
in ''
|
|
|
|
root=/nix/var/lib/deployment
|
|
|
|
mkdir -p $root
|
|
|
|
date "+%s" > $root/date
|
|
|
|
|
|
|
|
cat << EOF > $root/motd
|
|
|
|
Welcome to ${cfg.distroName} ${cfg.release} ("${cfg.codeName}") on
|
|
|
|
$(${pkgs.figlet}/bin/figlet ${config.networking.hostName}).${config.networking.domain}
|
|
|
|
|
|
|
|
Last deployed on $(date -d @$(cat "$deployment_folder/date"))
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
users.motdFile = "/nix/var/lib/deployment/motd";
|
|
|
|
|
|
|
|
nix.gc.automatic = true;
|
|
|
|
nix.gc.options = "--delete-older-than 7d";
|
|
|
|
services.journald.extraConfig = "SystemMaxUse=256M";
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
2024-01-09 15:46:18 +01:00
|
|
|
system.stateVersion = "23.11";
|
|
|
|
time.timeZone = mkDefault "CET";
|
|
|
|
}
|