1
0
Fork 0
forked from emily/nixfiles
nixfiles-emily/config/common/default.nix

89 lines
2.1 KiB
Nix
Raw Normal View History

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
2024-02-22 20:20:07 +01:00
dig
2024-01-09 15:46:18 +01:00
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
security.dhparams.defaultBitSize = 4096;
system.activationScripts.motd.text = let
cfg = config.system.nixos;
in ''
2024-02-22 20:20:07 +01:00
root=/var/lib/deployment
2024-01-16 20:03:30 +01:00
mkdir -p $root
date "+%s" > $root/date
cat << EOF > $root/motd
Welcome to ${cfg.distroName} ${cfg.release} ("${cfg.codeName}") on
2024-02-22 20:20:07 +01:00
$(${pkgs.figlet}/bin/figlet -lt -f slant ${config.networking.hostName} | ${pkgs.gnused}/bin/sed -e 's/[[:space:]]*$//').${config.networking.domain}
Last deployed on $(date "+%F %T %Z" -d @$(cat "$root/date"))
2024-01-16 20:03:30 +01:00
EOF
'';
2024-02-22 20:20:07 +01:00
users.motdFile = "/var/lib/deployment/motd";
2024-01-16 20:03:30 +01:00
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-22 20:20:07 +01:00
nix.settings.trusted-users = [ "root" "@wheel" ];
2024-02-05 22:22:40 +01:00
2024-02-22 20:20:07 +01:00
nixpkgs.config.allowUnfree = true;
2024-01-16 20:03:30 +01:00
2024-02-14 21:40:07 +01:00
boot.tmp.cleanOnBoot = mkDefault true;
2024-02-05 22:22:40 +01:00
services.journald.extraConfig = "SystemMaxUse=256M";
security.sudo.enable = false;
security.sudo-rs = {
enable = true;
execWheelOnly = true;
2024-02-22 20:20:07 +01:00
wheelNeedsPassword = false;
2024-02-05 22:22:40 +01:00
};
2024-02-22 20:20:07 +01:00
users.mutableUsers = mkDefault false;
i18n.defaultLocale = mkDefault "en_EU.UTF-8";
i18n.glibcLocales = (pkgs.glibcLocales.overrideAttrs (orig: {
postPatch = orig.postPatch + ''
cp "${../files/en_EU}" localedata/locales/en_EU
echo 'en_EU.UTF-8/UTF-8 \' >>localedata/SUPPORTED
'';
}));
2024-02-27 19:07:12 +01:00
services.xserver.xkb = {
2024-02-22 20:20:07 +01:00
layout = "de";
2024-02-27 19:07:12 +01:00
variant = "neo_qwerty";
2024-02-22 20:20:07 +01:00
};
console.useXkbConfig = true;
console.earlySetup = true;
2024-02-05 22:22:40 +01:00
services.fprintd.enable = config.kyouma.machine-type.graphical;
2024-01-09 15:46:18 +01:00
system.stateVersion = "23.11";
time.timeZone = mkDefault "CET";
}