2023-11-10 10:33:41 +00:00
|
|
|
{ pkgs, config, lib, ... }: {
|
|
|
|
imports = [ ./hardware-configuration.nix ];
|
|
|
|
|
|
|
|
boot = { loader.systemd-boot.enable = true; };
|
2023-10-08 14:57:57 +00:00
|
|
|
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
2023-10-22 20:30:51 +00:00
|
|
|
services = {
|
2023-12-25 18:32:04 +00:00
|
|
|
gnome.gnome-keyring.enable = lib.mkForce false;
|
|
|
|
|
2023-10-22 20:30:51 +00:00
|
|
|
xserver = {
|
|
|
|
enable = true;
|
2023-11-10 10:33:41 +00:00
|
|
|
displayManager.gdm = { enable = true; };
|
2023-10-22 20:30:51 +00:00
|
|
|
desktopManager.gnome.enable = true;
|
2023-11-10 10:33:41 +00:00
|
|
|
excludePackages = with pkgs; [ xterm ];
|
2023-10-22 20:30:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
printing = {
|
2023-10-08 14:57:57 +00:00
|
|
|
enable = true;
|
2023-11-10 10:33:41 +00:00
|
|
|
drivers = [ pkgs.hplip pkgs.gutenprint ];
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
2023-11-02 09:09:10 +00:00
|
|
|
|
|
|
|
fprintd = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
tod = {
|
|
|
|
enable = true;
|
|
|
|
driver = pkgs.libfprint-2-tod1-vfs0090;
|
|
|
|
};
|
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
|
|
|
|
2023-10-18 18:17:03 +00:00
|
|
|
users = {
|
|
|
|
users.pim = {
|
|
|
|
isNormalUser = true;
|
2023-11-10 10:33:41 +00:00
|
|
|
extraGroups = [ "wheel" "docker" "input" ];
|
2023-10-18 18:17:03 +00:00
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
environment = {
|
2023-12-16 15:12:13 +00:00
|
|
|
systemPackages = with pkgs; [
|
|
|
|
wget
|
|
|
|
curl
|
|
|
|
git
|
|
|
|
btop
|
|
|
|
ripgrep
|
|
|
|
vim
|
|
|
|
dogdns
|
|
|
|
tree
|
|
|
|
dig
|
|
|
|
];
|
2023-10-16 09:30:17 +00:00
|
|
|
gnome.excludePackages = with pkgs; [
|
|
|
|
gnome.totem
|
|
|
|
gnome-tour
|
|
|
|
gnome.epiphany
|
|
|
|
gnome.geary
|
|
|
|
gnome-console
|
|
|
|
gnome.gnome-music
|
|
|
|
];
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
|
|
|
|
2023-12-16 15:12:13 +00:00
|
|
|
system = {
|
|
|
|
stateVersion = "23.05";
|
|
|
|
|
|
|
|
activationScripts.diff = ''
|
|
|
|
if [[ -e /run/current-system ]]; then
|
|
|
|
${pkgs.nix}/bin/nix store diff-closures /run/current-system "$systemConfig"
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
|
2023-11-04 17:00:24 +00:00
|
|
|
programs.ssh = {
|
|
|
|
startAgent = true;
|
2023-10-08 14:57:57 +00:00
|
|
|
|
2023-11-04 17:00:24 +00:00
|
|
|
knownHosts = {
|
|
|
|
dmz = {
|
2023-11-10 10:33:41 +00:00
|
|
|
hostNames = [ "*.dmz" ];
|
|
|
|
publicKey =
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAX2IhgHNxC6JTvLu9cej+iWuG+uJFMXn4AiRro9533x";
|
2023-11-04 17:00:24 +00:00
|
|
|
certAuthority = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
hypervisors = {
|
2023-11-10 10:33:41 +00:00
|
|
|
hostNames = [ "*.hyp" ];
|
|
|
|
publicKey =
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFzRkH3d/KVJQouswY/DMpenWbDFVOnI3Vut0xR0e1tb";
|
2023-11-04 17:00:24 +00:00
|
|
|
certAuthority = true;
|
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
security.sudo.extraConfig = ''
|
|
|
|
Defaults timestamp_timeout=30
|
|
|
|
'';
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
package = pkgs.nixFlakes;
|
|
|
|
extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
2023-10-18 18:17:03 +00:00
|
|
|
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
persistent = true;
|
|
|
|
dates = "weekly";
|
2023-11-10 11:15:01 +00:00
|
|
|
options = "--delete-older-than 7d";
|
2023-10-18 18:17:03 +00:00
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
2023-10-14 17:08:02 +00:00
|
|
|
|
2023-10-22 20:30:51 +00:00
|
|
|
age = {
|
2023-11-10 10:33:41 +00:00
|
|
|
identityPaths = [ "/home/pim/.ssh/age_ed25519" ];
|
2023-10-14 17:08:02 +00:00
|
|
|
|
2023-10-22 20:30:51 +00:00
|
|
|
secrets = {
|
|
|
|
wg-quick-home-privkey.file = ../secrets/wg-quick-home-privkey.age;
|
2023-11-10 10:33:41 +00:00
|
|
|
wg-quick-home-preshared-key.file =
|
|
|
|
../secrets/wg-quick-home-preshared-key.age;
|
2023-10-22 20:30:51 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
hostName = "x260";
|
|
|
|
|
|
|
|
wg-quick.interfaces.home = {
|
2023-10-14 17:08:02 +00:00
|
|
|
privateKeyFile = config.age.secrets.wg-quick-home-privkey.path;
|
2023-12-25 18:32:04 +00:00
|
|
|
address = [ "10.225.191.4/24" ];
|
2023-11-10 10:33:41 +00:00
|
|
|
dns = [ "192.168.30.8" ];
|
|
|
|
peers = [{
|
|
|
|
presharedKeyFile = config.age.secrets.wg-quick-home-preshared-key.path;
|
2023-12-25 18:32:04 +00:00
|
|
|
endpoint = "wg.geokunis2.nl:51820";
|
2023-11-10 10:33:41 +00:00
|
|
|
publicKey = "fa3mQ7ximJbH7cu2ZbWidto5xBGxEEfWvCCiUDk00Hg=";
|
|
|
|
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
|
|
|
}];
|
2023-10-14 17:08:02 +00:00
|
|
|
};
|
|
|
|
};
|
2023-10-18 18:17:03 +00:00
|
|
|
|
|
|
|
virtualisation.docker = {
|
|
|
|
enable = true;
|
|
|
|
rootless = {
|
|
|
|
enable = true;
|
|
|
|
setSocketVariable = true;
|
|
|
|
};
|
|
|
|
};
|
2023-12-25 18:32:04 +00:00
|
|
|
|
|
|
|
nixpkgs.config.permittedInsecurePackages = [
|
|
|
|
"electron-25.9.0"
|
|
|
|
];
|
2023-10-08 14:57:57 +00:00
|
|
|
}
|