{ config, lib, pkgs, flakeSelf, ... }: { imports = [ flakeSelf.inputs.nur.nixosModules.nur ]; environment = { # As of the 1st of May 2023, the default packages are nano, perl, rsync and strace # I don't need any of them, so I just empty the list defaultPackages = []; }; # Set up /tmp boot.tmp = { useTmpfs = false; # Cleaning out /tmp at boot if it's a tmpfs is quite stupid cleanOnBoot = !config.boot.tmp.useTmpfs; }; # Set up zram zramSwap = { enable = true; priority = 100; memoryPercent = 60; # zstd my beloved <3 algorithm = "zstd"; }; # zswap with zram is not a good idea boot.kernelParams = [ "zswap.enabled=0" ]; # Set up keyboard layout services.xserver.xkb.layout = "es"; # Set up console console = { packages = [ pkgs.terminus_font ]; earlySetup = true; # mkDefault has 1000 priority, so that way I don't conflict with nixos-hardware font = lib.mkOverride 999 "ter-i16n"; # Make the console use X's keyboard configuration useXkbConfig = true; }; boot.supportedFilesystems = [ "nfs" ]; # Set up localisation i18n = { defaultLocale = "en_US.UTF-8"; extraLocaleSettings = { LC_NUMERIC = "es_ES.UTF-8"; # am/pm is nice but mm/dd/yy is yucky LC_TIME = "es_US.UTF-8"; LC_MONETARY = "es_ES.UTF-8"; LC_MEASUREMENT = "es_ES.UTF-8"; LC_PAPER = "es_ES.UTF-8"; LC_ADDRESS = "es_US.UTF-8"; LC_NAME = "es_ES.UTF-8"; LC_TELEPHONE = "es_ES.UTF-8"; }; }; services.fwupd.enable = true; # Set up my user users.users.toast = { isNormalUser = true; description = "Toast"; extraGroupps = [ "wheel" ]; }; # Set up time zone. time.timeZone = "Europe/Madrid"; nixpkgs.overlays = [ ( final: prev: { catppuccin = prev.catppuccin.override { accent = "mauve"; variant = "mocha"; themeList = [ "bat" "btop" "starship" "grub" ]; }; handheld-daemon = prev.handheld-daemon.overridePythonAttrs { src = pkgs.fetchFromGitHub { owner = "hhd-dev"; repo = "hhd"; rev = "c074cb0e3e13ab18fd150eb36df70044ede45038"; hash = "sha256-Jzx72d1l7v6d/fgPvj3BwAF/hgXL4MWzhPjKvtdqwfw="; }; version = "1.1.4"; }; } ) ]; home-manager = { backupFileExtension = "hm-backup"; useGlobalPkgs = true; verbose = true; users.toast = { config, ... }: { home.stateVersion = "23.11"; xdg = { userDirs = { enable = true; createDirectories = true; publicShare = null; # Disable the public folder }; }; }; }; # Set up secrets age = { identityPaths = [ "/etc/ssh/ssh_host_rsa_key" "/etc/ssh/ssh_host_ed25519_key" # This key has a passcode, so if you need to use it you'll have to # enter the password A LOT of times. Only on the first setup tho "/tmp/id_ed25519_bootstrap" ]; }; boot.loader.grub = { theme = "${pkgs.catppuccin}/grub"; backgroundColor = "#1E1E2E"; splashImage = "${pkgs.catppuccin}/grub/background.png"; }; /* I used to keep the host keys in the repo as a secret, but since I use the host keys for decrypting too I'm not sure encrypting a key with itself is a good idea. Now the host keys will need to be placed manually where they are needed For first time installs they are generated by services.openssh.hostKeys on servers, and manually on everything else */ system = { stateVersion = "23.11"; # Nix on nixos 23.05 does not have dirtyRev configurationRevision = flakeSelf.sourceInfo.rev or flakeSelf.sourceInfo.dirtyRev or "dirty"; nixos.variant_id = lib.strings.toLower config.networking.hostName; }; }