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 = [
|
2024-01-18 16:03:31 +01:00
|
|
|
./kernel.nix
|
2024-01-09 15:46:18 +01:00
|
|
|
./networking.nix
|
|
|
|
./openssh.nix
|
2024-01-18 16:03:31 +01:00
|
|
|
./users
|
|
|
|
../../modules
|
2024-01-09 15:46:18 +01:00
|
|
|
];
|
|
|
|
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-02-05 22:22:40 +01:00
|
|
|
programs = {
|
|
|
|
mtr.enable = true;
|
|
|
|
fish.enable = true;
|
|
|
|
};
|
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;
|
|
|
|
|
|
|
|
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
|
2024-01-17 14:34:33 +01:00
|
|
|
$(${pkgs.figlet}/bin/figlet -lt ${config.networking.hostName} | sed -e 's/[[:space:]]*$//').${config.networking.domain}
|
2024-01-16 20:03:30 +01:00
|
|
|
|
2024-01-17 14:34:33 +01:00
|
|
|
Last deployed on $(date "+%F %T %Z" -d @$(cat "$deployment_folder/date"))
|
2024-01-16 20:03:30 +01:00
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
users.motdFile = "/nix/var/lib/deployment/motd";
|
|
|
|
|
|
|
|
nix.gc.automatic = true;
|
|
|
|
nix.gc.options = "--delete-older-than 7d";
|
2024-01-17 14:34:33 +01:00
|
|
|
nix.optimise.automatic = true;
|
2024-01-16 20:03:30 +01:00
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
2024-02-05 22:22:40 +01:00
|
|
|
nix.settings.trusted-users = [ "@wheel" ];
|
|
|
|
|
2024-01-17 14:34:33 +01:00
|
|
|
nixpkgs.hostPlatform.system = "x86_64-linux";
|
2024-01-16 20:03:30 +01:00
|
|
|
|
2024-02-05 22:22:40 +01:00
|
|
|
boot.tmp.cleanOnBoot = = mkDefault true;
|
|
|
|
services.journald.extraConfig = "SystemMaxUse=256M";
|
|
|
|
|
|
|
|
security.sudo.enable = false;
|
|
|
|
security.sudo-rs = {
|
|
|
|
enable = true;
|
|
|
|
execWheelOnly = true;
|
|
|
|
};
|
|
|
|
users.mutableUsers = false;
|
|
|
|
|
|
|
|
services.fprintd.enable = config.kyouma.machine-type.graphical;
|
|
|
|
|
2024-01-09 15:46:18 +01:00
|
|
|
system.stateVersion = "23.11";
|
|
|
|
time.timeZone = mkDefault "CET";
|
|
|
|
}
|