summaryrefslogtreecommitdiff
path: root/hosts/T495
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/T495')
-rw-r--r--hosts/T495/configuration.nix88
-rw-r--r--hosts/T495/hardware-configuration.nix49
-rw-r--r--hosts/T495/resources/secrets/wg.yaml17
-rw-r--r--hosts/T495/wg.nix9
4 files changed, 163 insertions, 0 deletions
diff --git a/hosts/T495/configuration.nix b/hosts/T495/configuration.nix
new file mode 100644
index 0000000..b80f27e
--- /dev/null
+++ b/hosts/T495/configuration.nix
@@ -0,0 +1,88 @@
+{ config, lib, pkgs, ... }: {
+ imports = [ ./wg.nix ];
+
+ # Setup bootloader
+ boot._loader.enable = true;
+
+ # Enable common options
+ _archetypes = {
+ profiles = {
+ desktop = {
+ enable = true;
+ home.users.timmy.enable = true;
+ };
+ btrfs.enable = true;
+ };
+ collections = {
+ desktop = {
+ extraUtilities.enable = true;
+ cad.enable = true;
+ chromium.enable = true;
+ crypto.enable = true;
+ graphics.enable = true;
+ office.enable = true;
+ };
+ development = {
+ android.enable = true;
+ c.enable = true;
+ docker.enable = true;
+ lua.enable = true;
+ web = {
+ hugo = {
+ enable = true;
+ openFirewall = true;
+ };
+ node.enable = true;
+ };
+ };
+ bluetooth.enable = true;
+ };
+ };
+
+ # Enable user timmy
+ _users.timmy = {
+ enable = true;
+ autologin.enable = true;
+ nas = {
+ enable = true;
+ office.enable = true;
+ };
+ wifi.enable = true;
+ };
+
+ # Install spotify
+ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
+ "spotify"
+ ];
+ environment.systemPackages = with pkgs; [
+ spotify
+ ];
+
+ # Use amdgpu driver for x11
+ services.xserver.videoDrivers = [ "amdgpu" ];
+
+ # Configure home
+ home-manager.users.timmy = {
+ gtk._mintTheme = {
+ dark = true;
+ color = "Purple";
+ icons.color = "Purple";
+ };
+ programs._st = {
+ enable = true;
+ font = {
+ name = "TamzenForPowerline";
+ attrs = {
+ pixelsize = 20;
+ };
+ };
+ };
+ programs._seasonalwallpaper.wallpapers.download = true;
+ fonts.fontconfig = {
+ subpixelRendering = "rgb";
+ hinting = "slight";
+ };
+ };
+
+ system.stateVersion = "24.05";
+}
diff --git a/hosts/T495/hardware-configuration.nix b/hosts/T495/hardware-configuration.nix
new file mode 100644
index 0000000..6258a83
--- /dev/null
+++ b/hosts/T495/hardware-configuration.nix
@@ -0,0 +1,49 @@
+# 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" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-amd" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/4256823f-107b-41a9-851d-6bd9939f1f4b";
+ fsType = "btrfs";
+ options = [ "subvol=@" ];
+ };
+
+ boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/f20115a9-0a0e-43d2-9cee-c705b2de43b9";
+
+ fileSystems."/home" =
+ { device = "/dev/disk/by-uuid/4256823f-107b-41a9-851d-6bd9939f1f4b";
+ fsType = "btrfs";
+ options = [ "subvol=@home" ];
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/9441-53B1";
+ fsType = "vfat";
+ options = [ "fmask=0022" "dmask=0022" ];
+ };
+
+ swapDevices = [ ];
+
+ # 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.enp3s0f0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/hosts/T495/resources/secrets/wg.yaml b/hosts/T495/resources/secrets/wg.yaml
new file mode 100644
index 0000000..7581228
--- /dev/null
+++ b/hosts/T495/resources/secrets/wg.yaml
@@ -0,0 +1,17 @@
+wg0: ENC[AES256_GCM,data:ZWvG10UxVMb7e8wxTgQqybp2NsziJdTRDqF/ZJ1N3bf220P3l59jQcHyHi7l9UFbUhErM/zxXc0/B7AE1TPzcFGZRxqQC3TenCCW8RuKkm9bXcctseXtLqRr/EYRH07952dTzvdN/eBxLXLPqgi/K1qnuWBLS2zf/WKAJyCFsKPlzhH6lA7+VAM16Q9m+0nktruQ34DMok1LBlN7DN/gZkJWx6Ipzst4f9lrDiSm1QNmxskGUqDdPWednIJ8d8iW2j5xFBgzE0iUyZu0VwuOqP2ioUTYLiLGbx2/XrRXyz66u5gx1agBtpeAirWmNcmJlDl8olik64tXQoemHUHXQokpsuR1ENnm2DFqB1lVbXA3Q00cyzYX08cii7olGHKbVaty2n4RMAFwTBh2fRYs4LsH+cyn4umhLkOhUEbFInujrA5vVltQv9h/r4Y22osBgVNuSQ4I5hl4d348yc45yCENnW6iSs8Diu141l+IbxvQPIpbR462ctYtM+TRJW4AFbgPUdHrRD7DrURnyP9ZePSIU/1pPFZNeNJjYwDETXaz,iv:WLgAIxHhKLgw8TGfuXTlh7rkcjIawYjb3J6mo3sRSmE=,tag:b7tZzypGa8EmUinCJcDkoQ==,type:str]
+wg1: ENC[AES256_GCM,data:MCojgM00HJuTgY+K6KBUnDqH4Y8Jerc37vnYO4SC/srlNXxp5QKAuyTDwb7bjmGboyOHq//GLbRMDN5vZEeUQNGyjsycElmSl76bcLS2XPdGrbxGZD7HQY9PY+Z0V1avwVovRrITfG2irffnVxqfis8R5GBOovy/MRhyjG8B6vhastYoGp1ncAmAV+QsUGn/MTeKr+MpZ1Q+SGyeu8gAvPknOEzrR8WqK0ySbWKCQjeEe38kLNwhSNI1cp4Md02dskNUWnVKRyvfXOuYoPsGAmhVikZ+C4yFlndEJoQ5IJPbTO0mv2394bKtflCyB2hnerrTd+NaZcRgPP72Lvw3gDmx7olweL7f2uzr5Vs4NO1AIWcw/MkJxW2UU4GzHbJZM7H3b/IUY1+y8UDEk4rtBT9t+M5LapuVbpagwulIP7+O7Bjsgb4ZJxaGDjtUe3JcUgMDRAexDa7lioDZMpWT5UPRvUczfncqXs+b40vo02eZqiAxtWVK/8587uo=,iv:lsCA/USQc6ADWdRVYIQHXQtdtukEf7cXNTXIKzlynDU=,tag:xlW4MCIwMC8A8f2maHhPQg==,type:str]
+sops:
+ age:
+ - enc: |
+ -----BEGIN AGE ENCRYPTED FILE-----
+ YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4NEN4NGxDR1oreGVoSGhE
+ TzMxSEY0QVBhS2Z6MW15ci9aVlJ0a3IyVlZBCldPRVNvcUhJSHhWSEk3akd4RjN0
+ ajhUV2d1ZWRsRFU4cTE2dGl6RmM4MGsKLS0tIFhnUjl5aDJqWVB1NE15SlNzR2Iv
+ YTNydURsOUMrSXZGdk9UOUdUQlA0SFUKxEDJRR6tpYva9qpWo9NxwCxk/xpRVoTl
+ YJkmDZzMcXikXXiro96AprP9dXJXvMPKYPGl2Zsal8PlGFPBoHW2GA==
+ -----END AGE ENCRYPTED FILE-----
+ recipient: age1w80rc0dnuu8nw99gw64c596qqetm78jdnsqajr0u7ephykekr39qfz8vnv
+ lastmodified: "2026-06-19T19:30:00Z"
+ mac: ENC[AES256_GCM,data:tqZqi1l/15EAq/aqiXHmmi1aPUrdKJiK7pQZa5bUOdThfB3CVIQ4s0lfvybhMJfU6gbuiGih/Umr0bJ9joaFozFn/mPPUj7sjuqzHk1bxMG3qp1kHmmegAVBtjv0Fht62N1MFtH8woG3k+iRmd0ndTdFCMa0OVDvsCzw3t11wbw=,iv:/mQWM769XROsm6MEHpEsX8TiBEQd6PWODkb9CkH0eZY=,tag:oMObl25mPwPcqluWwUefcQ==,type:str]
+ unencrypted_suffix: _unencrypted
+ version: 3.13.1
diff --git a/hosts/T495/wg.nix b/hosts/T495/wg.nix
new file mode 100644
index 0000000..7b98ad8
--- /dev/null
+++ b/hosts/T495/wg.nix
@@ -0,0 +1,9 @@
+{ config, pkgs, inputs, ... }: {
+ sops.secrets.wg0 = { sopsFile = ./resources/secrets/wg.yaml; key = "wg0"; }; # Office
+ sops.secrets.wg1 = { sopsFile = ./resources/secrets/wg.yaml; key = "wg1"; }; # Home
+
+ networking.wg-quick.interfaces = {
+ wg0.configFile = config.sops.secrets.wg0.path;
+ wg1.configFile = config.sops.secrets.wg1.path;
+ };
+}