dotfiles/nix/hosts/thought/configuration.nix (view raw)
| 1 | { pkgs, ... }: |
| 2 | { |
| 3 | imports = [ |
| 4 | ./disko-config.nix |
| 5 | ./hardware-configuration.nix |
| 6 | ]; |
| 7 | |
| 8 | system.stateVersion = "25.11"; |
| 9 | |
| 10 | swapDevices = [ |
| 11 | { |
| 12 | device = "/swapfile"; |
| 13 | size = 2048; # MB |
| 14 | } |
| 15 | ]; |
| 16 | |
| 17 | boot.loader.grub = { |
| 18 | efiSupport = true; |
| 19 | efiInstallAsRemovable = true; |
| 20 | }; |
| 21 | |
| 22 | time.timeZone = "Europe/Kyiv"; |
| 23 | i18n.defaultLocale = "en_US.UTF-8"; |
| 24 | |
| 25 | networking = { |
| 26 | hostName = "vps"; |
| 27 | interfaces = { }; |
| 28 | firewall = { |
| 29 | enable = true; |
| 30 | allowedTCPPorts = [ |
| 31 | 80 |
| 32 | 443 |
| 33 | 2222 |
| 34 | ]; |
| 35 | }; |
| 36 | }; |
| 37 | |
| 38 | age.identityPaths = [ "/keys.txt" ]; |
| 39 | |
| 40 | services = { |
| 41 | caddy.enable = true; |
| 42 | openssh = { |
| 43 | enable = true; |
| 44 | ports = [ 2222 ]; |
| 45 | settings = { |
| 46 | PasswordAuthentication = false; |
| 47 | PermitRootLogin = "no"; |
| 48 | }; |
| 49 | }; |
| 50 | }; |
| 51 | |
| 52 | nix = { |
| 53 | gc = { |
| 54 | automatic = true; |
| 55 | dates = "weekly"; |
| 56 | options = "--delete-older-than 30d"; |
| 57 | }; |
| 58 | settings = { |
| 59 | auto-optimise-store = true; |
| 60 | experimental-features = [ |
| 61 | "nix-command" |
| 62 | "flakes" |
| 63 | ]; |
| 64 | }; |
| 65 | }; |
| 66 | |
| 67 | environment.systemPackages = with pkgs; [ |
| 68 | neovim |
| 69 | git |
| 70 | htop |
| 71 | ]; |
| 72 | } |