# sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake .#$TARGET_HOSTNAME --disk nvme0n1 /dev/nvme0n1 # tar -xvf /Parlor/Lauren/mlaga97-nixos.tar.zst; sudo nixos-rebuild switch --flake mlaga97-nixos?submodules=1#$HOSTNAME { config, pkgs, ... }: { imports = [ # Core Features ../../nixos/features/base.nix ../../nixos/features/tui-apps.nix ../../nixos/features/openssh-server.nix # Core Tweaks ../../nixos/tweaks/zram.nix ../../nixos/tweaks/enable_flakes.nix ../../nixos/tweaks/disable_nixos_user.nix ../../nixos/tweaks/systemd-resolved_nonsense.nix # Lauren Base ../../users/lauren_lagarde/lauren_lagarde.nix # i3wm ../../nixos/features/i3wm.nix ../../nixos/features/hardware/yubikey.nix ../../nixos/tweaks/bluetooth.nix ../../nixos/tweaks/intel_igpu_screen_tearing.nix # Dotspace ../../secrets/dotspace.nix ../../secrets/dotspace_shares.nix ../../nixos/features/stronghold-binary-cache.nix # Additional Software ../../nixos/features/embedded.nix ../../nixos/features/hardware/rtl-sdr.nix ../../nixos/features/hardware/printing.nix ../../nixos/tweaks/aarch64-crosscompile.nix ../../nixos/features/virtualization/docker.nix ../../nixos/features/virtualization/libvirt-host.nix # ll-latitude-e5591 ../../nixos/features/gpu/intel.nix ../../nixos/features/systemd-boot.nix ../../nixos/features/factorio.nix ]; specialisation = { nvidia.configuration = { system.nixos.tags = [ "nvidia" ]; imports = [ ../../nixos/features/gpu/nvidia.nix ]; hardware.nvidia.prime = { sync.enable = true; intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; }; }; }; hardware.enableRedistributableFirmware = true; boot.initrd.kernelModules = [ "i915" ]; # Makes external monitors boot better boot.kernelParams = [ "i915.enable_guc=2" ]; services.autorandr.enable = true; services.udev.packages = with pkgs; [ autorandr ]; # TODO: Not quite enough for hibernation while zram is still enabled #swapDevices = [{ # device = "/var/lib/swapfile"; # size = 48 * 1024; #}]; ############################################################################## ############################################################################## ############################################################################## # Tinc Stuff # TODO: Less hacky networking.firewall.allowedTCPPorts = [ 655 ]; networking.firewall.allowedUDPPorts = [ 655 ]; networking.interfaces."tinc.dotspace".ipv4 = { addresses = [{ address = "10.86.84.250"; prefixLength = 32; }]; routes = [{ address = "10.86.84.0"; prefixLength = 24; }]; }; # Start the unit for adding addresses if Tinc is started systemd.services."tinc.dotspace".wants = [ "network-addresses-tinc.dotspace.service" ]; # Stop the unit for adding addresses if Tinc is stopped or restarted systemd.services."network-addresses-tinc.dotspace".partOf = [ "tinc.dotspace.service" ]; # Start the unit for adding addresses after the Tinc device is added systemd.services."network-addresses-tinc.dotspace".after = [ "sys-subsystem-net-devices-tinc.dotspace.device" ]; services.tinc.networks.dotspace = { name = "ll_latitude_e5591"; ed25519PrivateKeyFile = "/root/tinc/mlaga97space_ed25519_key.priv"; chroot = false; settings.ConnectTo = [ "fortress" "citadel" ]; }; }