nixos-laptop/nixos/default.nix

145 lines
2.9 KiB
Nix
Raw Normal View History

{ pkgs, config, lib, ... }: {
2023-10-22 20:30:51 +00:00
imports = [
./hardware-configuration.nix
];
2023-10-08 14:57:57 +00:00
boot = {
loader.systemd-boot.enable = true;
};
time.timeZone = "Europe/Amsterdam";
i18n.defaultLocale = "en_US.UTF-8";
services.gnome.gnome-keyring.enable = lib.mkForce false;
2023-10-22 20:30:51 +00:00
services = {
xserver = {
enable = true;
displayManager.gdm = {
enable = true;
};
desktopManager.gnome.enable = true;
excludePackages = with pkgs; [ xterm ];
};
printing = {
2023-10-08 14:57:57 +00:00
enable = true;
2023-10-22 20:30:51 +00:00
drivers = [ pkgs.hplip pkgs.gutenprint ];
2023-10-08 14:57:57 +00:00
};
fprintd = {
enable = true;
tod = {
enable = true;
driver = pkgs.libfprint-2-tod1-vfs0090;
};
};
2023-10-08 14:57:57 +00:00
};
users = {
users.pim = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "input" ];
};
2023-10-08 14:57:57 +00:00
};
environment = {
systemPackages = with pkgs; [
wget
curl
git
btop
ripgrep
vim
dogdns
2023-10-15 15:59:47 +00:00
tree
2023-10-08 14:57:57 +00:00
];
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
};
system.stateVersion = "23.05";
2023-10-08 14:57:57 +00:00
programs.ssh = {
startAgent = true;
2023-10-08 14:57:57 +00:00
knownHosts = {
dmz = {
hostNames = ["*.dmz"];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAX2IhgHNxC6JTvLu9cej+iWuG+uJFMXn4AiRro9533x";
certAuthority = true;
};
hypervisors = {
hostNames = ["*.hyp"];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFzRkH3d/KVJQouswY/DMpenWbDFVOnI3Vut0xR0e1tb";
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
'';
gc = {
automatic = true;
persistent = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
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 = {
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;
wg-quick-home-preshared-key.file = ../secrets/wg-quick-home-preshared-key.age;
};
};
networking = {
hostName = "x260";
wg-quick.interfaces.home = {
2023-10-14 17:08:02 +00:00
privateKeyFile = config.age.secrets.wg-quick-home-privkey.path;
address = [
"10.225.191.4/24"
"fd11:5ee:bad:c0de::4/64"
];
dns = [ "192.168.30.8" ];
peers = [{
presharedKeyFile = config.age.secrets.wg-quick-home-preshared-key.path;
endpoint = "84.245.14.149:51820";
publicKey = "fa3mQ7ximJbH7cu2ZbWidto5xBGxEEfWvCCiUDk00Hg=";
allowedIPs = [
"0.0.0.0/0"
"::0/0"
];
}];
};
};
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
2023-10-08 14:57:57 +00:00
}