aboutsummaryrefslogtreecommitdiff
path: root/hosts/pad
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/pad')
-rw-r--r--hosts/pad/boot.nix16
-rw-r--r--hosts/pad/default.nix34
-rw-r--r--hosts/pad/hardware-configuration.nix43
-rw-r--r--hosts/pad/hardware.nix5
-rw-r--r--hosts/pad/network.nix53
5 files changed, 151 insertions, 0 deletions
diff --git a/hosts/pad/boot.nix b/hosts/pad/boot.nix
new file mode 100644
index 0000000..a6108d6
--- /dev/null
+++ b/hosts/pad/boot.nix
@@ -0,0 +1,16 @@
+{ config, pkgs, ...}:
+
+{
+ boot = {
+ loader = {
+ systemd-boot = {
+ enable = true;
+ # Only keep the last 10 configurations
+ configurationLimit = 10;
+ };
+ efi.canTouchEfiVariables = true;
+ };
+
+ initrd.luks.devices."luks-11563c8c-1bf7-471f-a173-918f47aa31ed".device = "/dev/disk/by-uuid/11563c8c-1bf7-471f-a173-918f47aa31ed";
+ };
+}
diff --git a/hosts/pad/default.nix b/hosts/pad/default.nix
new file mode 100644
index 0000000..738e407
--- /dev/null
+++ b/hosts/pad/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#pad";
+ };
+
+ # 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/pad/hardware-configuration.nix b/hosts/pad/hardware-configuration.nix
new file mode 100644
index 0000000..4345851
--- /dev/null
+++ b/hosts/pad/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 = [ "xhci_pci" "ehci_pci" "ata_piix" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/fe8e7c2d-ae75-4617-b26c-650377ce813e";
+ fsType = "ext4";
+ };
+
+ boot.initrd.luks.devices."luks-3462560d-86f8-4ddd-9f37-4d3f92846e1e".device = "/dev/disk/by-uuid/3462560d-86f8-4ddd-9f37-4d3f92846e1e";
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/B370-4AFC";
+ fsType = "vfat";
+ options = [ "fmask=0077" "dmask=0077" ];
+ };
+
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/1d8ca4a9-b5aa-46d1-96f9-6be57c8a6fc6"; }
+ ];
+
+ # 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.enp0s25.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/hosts/pad/hardware.nix b/hosts/pad/hardware.nix
new file mode 100644
index 0000000..4c63dba
--- /dev/null
+++ b/hosts/pad/hardware.nix
@@ -0,0 +1,5 @@
+{
+ hardware.graphics = {
+ enable = true;
+ };
+}
diff --git a/hosts/pad/network.nix b/hosts/pad/network.nix
new file mode 100644
index 0000000..6831f92
--- /dev/null
+++ b/hosts/pad/network.nix
@@ -0,0 +1,53 @@
+{ config, pkgs, ... }:
+
+{
+ networking = {
+ hostName = "pad"; # 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.4/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 for HUGO
+ allowedTCPPorts = [ 1313 ];
+ ## 51820 is wg 53317 is localsend
+ allowedUDPPorts = [ 51820 53317 ];
+ };
+ # Or disable the firewall altogether.
+ # firewall.enable = false;
+ };
+}
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.