diff options
| author | aethrvmn <me@aethrvmn.gr> | 2025-08-31 14:21:34 +0000 |
|---|---|---|
| committer | aethrvmn <me@aethrvmn.gr> | 2025-08-31 14:21:34 +0000 |
| commit | bfd970a07c231b5781871c16cb4612eb4c6b8fd4 (patch) | |
| tree | 50a4ac5138d1f438e4d5bad3a3dd880a0784cd3e /hosts/station | |
| parent | added flake (diff) | |
imported system/home-manager config
Diffstat (limited to '')
| -rw-r--r-- | hosts/station/boot.nix | 20 | ||||
| -rw-r--r-- | hosts/station/default.nix | 34 | ||||
| -rw-r--r-- | hosts/station/hardware-configuration.nix | 43 | ||||
| -rw-r--r-- | hosts/station/hardware.nix | 11 | ||||
| -rw-r--r-- | hosts/station/network.nix | 55 |
5 files changed, 163 insertions, 0 deletions
diff --git a/hosts/station/boot.nix b/hosts/station/boot.nix new file mode 100644 index 0000000..603ebf7 --- /dev/null +++ b/hosts/station/boot.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ...}: + +{ + boot = { + loader = { + systemd-boot = { + enable = true; + # Only keep the last 10 configurations + configurationLimit = 10; + }; + efi.canTouchEfiVariables = true; + }; + + initrd = { + luks.devices."luks-4d8ffefc-fb74-4628-9779-abc535146374".device = "/dev/disk/by-uuid/4d8ffefc-fb74-4628-9779-abc535146374"; + + kernelModules = ["amdgpu"]; + }; + }; +} diff --git a/hosts/station/default.nix b/hosts/station/default.nix new file mode 100644 index 0000000..b57bcb1 --- /dev/null +++ b/hosts/station/default.nix @@ -0,0 +1,34 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). +{ config, lib, pkgs, ... }: + +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + + # Base modules + ./boot.nix + ./hardware.nix + ./network.nix + ]; + + system = { + autoUpgrade = { + enable = true; + flake = "/home/aethrvmn/.nix#nixstation"; + }; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + stateVersion = "24.11"; # Did you read the comment? + }; + + # Set time zone. + time.timeZone = "Europe/Brussels"; +} diff --git a/hosts/station/hardware-configuration.nix b/hosts/station/hardware-configuration.nix new file mode 100644 index 0000000..8c60298 --- /dev/null +++ b/hosts/station/hardware-configuration.nix @@ -0,0 +1,43 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/48ee999d-df45-49da-96dd-7bbb7682677d"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-38168e30-5417-440d-b521-faaaf4ef9360".device = "/dev/disk/by-uuid/38168e30-5417-440d-b521-faaaf4ef9360"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/EDF1-9467"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/6b838eef-e44d-4aac-b29e-9c91e10b015b"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/station/hardware.nix b/hosts/station/hardware.nix new file mode 100644 index 0000000..8f84745 --- /dev/null +++ b/hosts/station/hardware.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: +{ + hardware = { + graphics = { + enable = true; + extraPackages = with pkgs; [ + rocmPackages.clr + ]; + }; + }; +} diff --git a/hosts/station/network.nix b/hosts/station/network.nix new file mode 100644 index 0000000..c1b08ea --- /dev/null +++ b/hosts/station/network.nix @@ -0,0 +1,55 @@ +{ config, pkgs, ... }: + +{ + networking = { + hostName = "station"; # Define your hostname. + + # Enables wireless support via wpa_supplicant. + # wireless.enable = true; + + # Configure network proxy if necessary + # proxy.default = "http://user:password@proxy:port/"; + # proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networkmanager.enable = true; + + wireguard = { + enable = true; + + interfaces = { + rousi = { + ips = [ + "10.0.0.5/24" + ]; + listenPort = 51820; + privateKeyFile = "/home/aethrvmn/.creds/rousikey"; + + peers = [ + { + allowedIPs = [ + "192.168.10.0/24" + "172.16.0.0/24" + ]; + publicKey = "LEeO3Qy6c3W0qoR1xFhl7Fx29Oppq8tKE72HPoA831I="; + endpoint = "vpn.valatsos.gr:51820"; + persistentKeepalive = 25; + } + ]; + }; + }; + }; + + # Open ports in the firewall. + firewall ={ + ## 1313 is HUGO + ## 2234 is nicotine + allowedTCPPorts = [ 1313 2234 ]; + ## 51820 is wg + ## 53317 is localsend + allowedUDPPorts = [ 51820 53317 ]; + }; + # Or disable the firewall altogether. + # firewall.enable = false; + }; +} |
