2024-06-09 20:00:47 +00:00
|
|
|
{ pkgs, config, lib, inputs, flake, system, ... }: {
|
|
|
|
imports = [
|
|
|
|
inputs.stylix.nixosModules.stylix
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
2024-06-15 14:20:03 +00:00
|
|
|
inputs.sops-nix.nixosModules.sops
|
2024-06-09 20:00:47 +00:00
|
|
|
"${flake}/modules/nixos/lanzaboote.nix"
|
|
|
|
];
|
|
|
|
|
2023-10-08 14:57:57 +00:00
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
2024-06-09 20:00:47 +00:00
|
|
|
programs.ssh.startAgent = true;
|
2023-10-08 14:57:57 +00:00
|
|
|
|
2023-10-22 20:30:51 +00:00
|
|
|
services = {
|
2023-12-25 18:32:04 +00:00
|
|
|
gnome.gnome-keyring.enable = lib.mkForce false;
|
2024-07-23 20:52:04 +00:00
|
|
|
|
|
|
|
tailscale = {
|
|
|
|
enable = true;
|
|
|
|
useRoutingFeatures = "client";
|
|
|
|
};
|
2023-12-25 18:32:04 +00:00
|
|
|
|
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
|
|
|
};
|
2024-05-25 14:37:37 +00:00
|
|
|
|
|
|
|
pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
2024-08-09 16:38:16 +00:00
|
|
|
jack.enable = true;
|
2024-05-25 14:37:37 +00:00
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
|
|
|
|
2023-10-18 18:17:03 +00:00
|
|
|
users = {
|
|
|
|
users.pim = {
|
|
|
|
isNormalUser = true;
|
2024-08-09 16:38:16 +00:00
|
|
|
extraGroups = [ "wheel" "docker" "input" "wireshark" "dialout" ];
|
2023-10-18 18:17:03 +00:00
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
environment = {
|
2024-06-09 21:01:34 +00:00
|
|
|
# https://nix-community.github.io/home-manager/options.xhtml#opt-programs.zsh.enableCompletion
|
|
|
|
pathsToLink = [ "/share/zsh" ];
|
|
|
|
|
|
|
|
systemPackages = (with pkgs; [
|
|
|
|
age
|
|
|
|
borgbackup
|
|
|
|
btop
|
|
|
|
btrfs-progs
|
2023-12-16 15:12:13 +00:00
|
|
|
curl
|
2024-06-09 21:01:34 +00:00
|
|
|
dig
|
|
|
|
exfat
|
|
|
|
f3
|
|
|
|
fastfetch
|
|
|
|
file
|
2023-12-16 15:12:13 +00:00
|
|
|
git
|
2024-06-09 21:01:34 +00:00
|
|
|
gnome.gnome-shell-extensions
|
|
|
|
jq
|
|
|
|
kubectl
|
|
|
|
nmap
|
|
|
|
poppler_utils # For pdfunite
|
2023-12-16 15:12:13 +00:00
|
|
|
ripgrep
|
2024-06-09 21:01:34 +00:00
|
|
|
sbctl
|
|
|
|
silicon
|
|
|
|
sops
|
2023-12-16 15:12:13 +00:00
|
|
|
tree
|
2024-06-09 21:01:34 +00:00
|
|
|
units
|
|
|
|
vim
|
|
|
|
wget
|
|
|
|
yq
|
2024-06-15 13:16:59 +00:00
|
|
|
ncdu
|
2024-06-22 14:24:50 +00:00
|
|
|
lshw
|
2024-06-09 21:01:34 +00:00
|
|
|
]) ++ (with pkgs.gnomeExtensions; [
|
|
|
|
pop-shell
|
|
|
|
window-is-ready-remover
|
2024-06-13 21:32:04 +00:00
|
|
|
random-wallpaper
|
2024-06-09 21:01:34 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
gnome.excludePackages = (with pkgs; [
|
2024-05-16 16:48:46 +00:00
|
|
|
epiphany
|
2024-06-09 21:01:34 +00:00
|
|
|
gnome-connections
|
2023-10-16 09:30:17 +00:00
|
|
|
gnome-console
|
2024-06-09 21:01:34 +00:00
|
|
|
gnome-tour
|
|
|
|
]) ++ (with pkgs.gnome; [
|
|
|
|
geary
|
2024-05-16 16:48:46 +00:00
|
|
|
gnome-calendar
|
2024-06-09 21:01:34 +00:00
|
|
|
gnome-clocks
|
|
|
|
gnome-contacts
|
|
|
|
gnome-font-viewer
|
|
|
|
gnome-logs
|
|
|
|
gnome-maps
|
|
|
|
gnome-music
|
|
|
|
seahorse
|
|
|
|
totem
|
|
|
|
yelp
|
|
|
|
gnome-weather
|
|
|
|
]);
|
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
|
|
|
|
2024-05-25 14:37:37 +00:00
|
|
|
security = {
|
|
|
|
rtkit.enable = true;
|
|
|
|
|
|
|
|
sudo.extraConfig = ''
|
|
|
|
Defaults timestamp_timeout=30
|
|
|
|
'';
|
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
|
|
|
|
nix = {
|
|
|
|
package = pkgs.nixFlakes;
|
2024-04-29 13:19:17 +00:00
|
|
|
settings.trusted-users = [ "root" "pim" ];
|
|
|
|
|
2023-10-08 14:57:57 +00:00
|
|
|
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
|
|
|
networking = {
|
2024-05-25 14:37:37 +00:00
|
|
|
useDHCP = lib.mkDefault true;
|
|
|
|
|
2024-01-13 13:00:17 +00:00
|
|
|
wg-quick.interfaces = {
|
|
|
|
home = {
|
2024-06-15 14:20:03 +00:00
|
|
|
privateKeyFile = config.sops.secrets."wireguard/home/privateKey".path;
|
2024-06-30 20:18:28 +00:00
|
|
|
address = [ "10.225.191.4/24" ];
|
2024-04-20 08:57:13 +00:00
|
|
|
dns = [ "192.168.30.131" ];
|
2024-07-23 20:52:04 +00:00
|
|
|
autostart = false;
|
2024-05-05 16:07:40 +00:00
|
|
|
mtu = 1412;
|
2024-01-13 13:00:17 +00:00
|
|
|
peers = [{
|
2024-06-15 14:20:03 +00:00
|
|
|
presharedKeyFile = config.sops.secrets."wireguard/home/presharedKey".path;
|
2024-01-21 11:11:52 +00:00
|
|
|
endpoint = "wg.kun.is:51820";
|
2024-01-13 13:00:17 +00:00
|
|
|
publicKey = "fa3mQ7ximJbH7cu2ZbWidto5xBGxEEfWvCCiUDk00Hg=";
|
2024-06-30 20:18:28 +00:00
|
|
|
allowedIPs = [ "0.0.0.0/0" ];
|
2024-01-13 13:00:17 +00:00
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
|
|
|
home-no-pihole = {
|
2024-06-15 14:20:03 +00:00
|
|
|
privateKeyFile = config.sops.secrets."wireguard/home/privateKey".path;
|
2024-06-30 20:18:28 +00:00
|
|
|
address = [ "10.225.191.4/24" ];
|
2024-05-05 16:07:40 +00:00
|
|
|
dns = [ "192.168.10.1" ];
|
2024-01-13 13:00:17 +00:00
|
|
|
autostart = false;
|
2024-05-05 16:07:40 +00:00
|
|
|
mtu = 1412;
|
2024-01-13 13:00:17 +00:00
|
|
|
peers = [{
|
2024-06-15 14:20:03 +00:00
|
|
|
presharedKeyFile = config.sops.secrets."wireguard/home/presharedKey".path;
|
2024-01-21 11:11:52 +00:00
|
|
|
endpoint = "wg.kun.is:51820";
|
2024-01-13 13:00:17 +00:00
|
|
|
publicKey = "fa3mQ7ximJbH7cu2ZbWidto5xBGxEEfWvCCiUDk00Hg=";
|
2024-06-30 20:18:28 +00:00
|
|
|
allowedIPs = [ "0.0.0.0/0" ];
|
2024-01-13 13:00:17 +00:00
|
|
|
}];
|
|
|
|
};
|
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
|
|
|
|
2024-05-25 14:37:37 +00:00
|
|
|
nixpkgs = {
|
|
|
|
hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
|
|
|
|
config = {
|
2024-06-22 14:24:50 +00:00
|
|
|
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
|
|
|
"vmware-horizon-client"
|
|
|
|
"libfprint-2-tod1-goodix"
|
|
|
|
"vmware-workstation"
|
|
|
|
"ipu6-camera-bins-unstable"
|
|
|
|
"ipu6-camera-bins"
|
|
|
|
"ivsc-firmware-unstable"
|
|
|
|
"ivsc-firmware"
|
|
|
|
];
|
2024-05-25 14:37:37 +00:00
|
|
|
};
|
2024-06-09 20:00:47 +00:00
|
|
|
|
|
|
|
overlays = [
|
|
|
|
inputs.nur.overlay
|
|
|
|
(final: _prev: {
|
|
|
|
unstable = import inputs.nixpkgs-unstable {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
2024-05-25 14:37:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
boot = {
|
2024-07-22 18:26:10 +00:00
|
|
|
kernelModules = [ "kvm-intel" "cdrom" ];
|
2024-05-25 14:37:37 +00:00
|
|
|
extraModulePackages = [ ];
|
|
|
|
|
|
|
|
initrd = {
|
2024-05-26 15:12:52 +00:00
|
|
|
availableKernelModules = [ "sd_mod" ];
|
2024-05-25 14:37:37 +00:00
|
|
|
kernelModules = [ ];
|
|
|
|
};
|
|
|
|
|
|
|
|
kernel.sysctl = {
|
|
|
|
"net.core.default_qdisc" = "fq";
|
|
|
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware = {
|
|
|
|
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
pulseaudio.enable = false;
|
2024-01-28 13:31:45 +00:00
|
|
|
};
|
2024-06-09 18:31:39 +00:00
|
|
|
|
|
|
|
stylix = {
|
2024-07-12 08:20:51 +00:00
|
|
|
enable = true;
|
2024-06-09 18:31:39 +00:00
|
|
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
|
|
|
|
image = "${inputs.nixos-artwork}/wallpapers/nix-wallpaper-binary-blue.png";
|
|
|
|
|
|
|
|
cursor = {
|
|
|
|
package = pkgs.bibata-cursors;
|
2024-06-11 17:59:58 +00:00
|
|
|
name = "Bibata-Modern-Classic";
|
|
|
|
size = 28;
|
2024-06-09 18:31:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
fonts = {
|
|
|
|
monospace = {
|
|
|
|
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
|
|
|
|
name = "JetBrainsMono Nerd Font Mono";
|
|
|
|
};
|
|
|
|
|
|
|
|
sansSerif = {
|
|
|
|
package = pkgs.dejavu_fonts;
|
|
|
|
name = "DejaVu Sans";
|
|
|
|
};
|
|
|
|
|
|
|
|
serif = {
|
|
|
|
package = pkgs.dejavu_fonts;
|
|
|
|
name = "DejaVu Serif";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-06-09 20:00:47 +00:00
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
2024-06-15 16:10:55 +00:00
|
|
|
extraSpecialArgs = { inherit flake inputs; };
|
2024-06-09 20:00:47 +00:00
|
|
|
|
|
|
|
users.pim.imports = [
|
|
|
|
./home.nix
|
|
|
|
];
|
|
|
|
};
|
2024-06-15 14:20:03 +00:00
|
|
|
|
|
|
|
sops = {
|
|
|
|
age.keyFile = "/home/pim/.config/sops/age/keys.txt";
|
|
|
|
defaultSopsFile = ./secrets/secrets.yaml;
|
2024-06-22 14:24:50 +00:00
|
|
|
|
2024-06-15 16:10:55 +00:00
|
|
|
secrets = {
|
|
|
|
"wireguard/home/presharedKey" = { };
|
|
|
|
"wireguard/home/privateKey" = { };
|
|
|
|
};
|
2024-06-15 14:20:03 +00:00
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
}
|