Compare commits
10 Commits
a3de7dd018
...
43eaa97cd8
Author | SHA1 | Date |
---|---|---|
Nathan McCarty | 43eaa97cd8 | |
Nathan McCarty | 5ad8f524d8 | |
Nathan McCarty | 5d83b1f30e | |
Nathan McCarty | 0883930abe | |
Nathan McCarty | 12c5f518ec | |
Nathan McCarty | ed07847d4c | |
Nathan McCarty | b251397b6d | |
Nathan McCarty | a34134d4b0 | |
Nathan McCarty | fbefd0e81b | |
Nathan McCarty | 83669e037e |
|
@ -214,12 +214,19 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Installer iso
|
# Installer/rescue iso
|
||||||
iso_x86_64 = nixpkgs.lib.nixosSystem {
|
iso_x86_64 = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix"
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix"
|
||||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
|
||||||
|
({ pkgs, lib, config, ... }: {
|
||||||
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
|
boot.zfs.forceImportRoot = false;
|
||||||
|
# Generated with head -c4 /dev/urandom | od -A none -t x4
|
||||||
|
networking.hostId = "9affdaa4";
|
||||||
|
environment.systemPackages = with pkgs; [ ];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,10 +36,10 @@ in with lib; {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
# Set environment variables to force wayland
|
# Set environment variables to force wayland
|
||||||
env = XCURSOR_SIZE,24
|
env = XCURSOR_SIZE,24
|
||||||
env = GDK_BACKEND,wayland,x11
|
# env = GDK_BACKEND,wayland,x11
|
||||||
env = QT_QPA_PLATFORM,wayland;xcb
|
# env = QT_QPA_PLATFORM,wayland;xcb
|
||||||
env = SDL_VIDEODRIVER,wayland
|
# env = SDL_VIDEODRIVER,wayland
|
||||||
env = CLUTTER_BACKEND,wayland
|
# env = CLUTTER_BACKEND,wayland
|
||||||
input {
|
input {
|
||||||
kb_layout = us
|
kb_layout = us
|
||||||
kb_variant =
|
kb_variant =
|
||||||
|
@ -273,6 +273,9 @@ in with lib; {
|
||||||
# OBS
|
# OBS
|
||||||
bind = SHIFT, F10, pass,^(com\.obsproject\.Studio)$
|
bind = SHIFT, F10, pass,^(com\.obsproject\.Studio)$
|
||||||
bind = SHIFT, F11, pass,^(com\.obsproject\.Studio)$
|
bind = SHIFT, F11, pass,^(com\.obsproject\.Studio)$
|
||||||
|
|
||||||
|
# Start polkit agent
|
||||||
|
exec-once = systemctl --user start plasma-polkit-agent.service
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -58,21 +58,15 @@ in {
|
||||||
docker = false;
|
docker = false;
|
||||||
podman = true;
|
podman = true;
|
||||||
};
|
};
|
||||||
windows = {
|
windows = { enable = false; };
|
||||||
enable = false;
|
|
||||||
mount = {
|
|
||||||
device = "/dev/nvme0n1p2";
|
|
||||||
mountPoint = "/mnt/windows";
|
|
||||||
keyFile = config.sops.secrets."windows-bitlocker-key".path;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# Configure networking
|
# Configure networking
|
||||||
networking = {
|
networking = {
|
||||||
domain = "mccarty.io";
|
domain = "mccarty.io";
|
||||||
useDHCP = true;
|
useDHCP = true;
|
||||||
nat.externalInterface = "enp5s0";
|
interfaces.enp6s0.useDHCP = true;
|
||||||
|
nat.externalInterface = "enp6s0";
|
||||||
# Open ports for soulseek and weylus
|
# Open ports for soulseek and weylus
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [ 61377 1701 9001 ];
|
allowedTCPPorts = [ 61377 1701 9001 ];
|
||||||
|
@ -100,4 +94,10 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = unstable.vmware-workstation;
|
package = unstable.vmware-workstation;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ZFS
|
||||||
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
|
boot.zfs.forceImportRoot = false;
|
||||||
|
# Generated with head -c4 /dev/urandom | od -A none -t x4
|
||||||
|
networking.hostId = "bc94e9d3";
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,18 +53,29 @@
|
||||||
fileSystems."/home/nathan/Music" = {
|
fileSystems."/home/nathan/Music" = {
|
||||||
device = "10.0.0.139:/mnt/tank/root/nathan/music";
|
device = "10.0.0.139:/mnt/tank/root/nathan/music";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
options = [ "x-systemd.automount" "noauto" ];
|
||||||
};
|
};
|
||||||
fileSystems."/mnt/general" = {
|
fileSystems."/mnt/general" = {
|
||||||
device = "10.0.0.139:/mnt/tank/root/shares/general";
|
device = "10.0.0.139:/mnt/tank/root/shares/general";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
options = [ "x-systemd.automount" "noauto" ];
|
||||||
};
|
};
|
||||||
fileSystems."/mnt/archive" = {
|
fileSystems."/mnt/archive" = {
|
||||||
device = "10.0.0.139:/mnt/tank/root/shares/archive";
|
device = "10.0.0.139:/mnt/tank/root/shares/archive";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
options = [ "x-systemd.automount" "noauto" ];
|
||||||
};
|
};
|
||||||
fileSystems."/mnt/books" = {
|
fileSystems."/mnt/books" = {
|
||||||
device = "10.0.0.139:/mnt/tank/root/data/books";
|
device = "10.0.0.139:/mnt/tank/root/data/books";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
options = [ "x-systemd.automount" "noauto" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc.crypttab = {
|
||||||
|
enable = true;
|
||||||
|
text = ''
|
||||||
|
crypt-bigssd UUID=751c00cb-32ed-4aa9-83f6-5d65955480a5 /var/big-ssd-keyfile luks
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [{
|
swapDevices = [{
|
||||||
|
|
|
@ -8,6 +8,9 @@ let
|
||||||
"10de:1ad9" # Usb ????
|
"10de:1ad9" # Usb ????
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
|
##
|
||||||
|
## Kernel configuration
|
||||||
|
##
|
||||||
boot = {
|
boot = {
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
# enable iommu
|
# enable iommu
|
||||||
|
@ -19,17 +22,37 @@ in {
|
||||||
initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ];
|
initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
##
|
||||||
|
## Virtualization setup
|
||||||
|
##
|
||||||
environment.systemPackages = with pkgs; [ looking-glass-client ];
|
environment.systemPackages = with pkgs; [ looking-glass-client ];
|
||||||
virtualisation.spiceUSBRedirection.enable = true;
|
virtualisation.spiceUSBRedirection.enable = true;
|
||||||
virtualisation.libvirtd = {
|
virtualisation.libvirtd = {
|
||||||
qemu = {
|
qemu = {
|
||||||
|
# Enable tpm for windows 11
|
||||||
swtpm.enable = true;
|
swtpm.enable = true;
|
||||||
ovmf = {
|
ovmf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# Needed for secure boot
|
||||||
packages = [ pkgs.OVMFFull.fd ];
|
packages = [ pkgs.OVMFFull.fd ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# Looking glass shared memory
|
||||||
systemd.tmpfiles.rules =
|
systemd.tmpfiles.rules =
|
||||||
[ "f /dev/shm/looking-glass 0660 nathan qemu-libvirtd -" ];
|
[ "f /dev/shm/looking-glass 0660 nathan qemu-libvirtd -" ];
|
||||||
|
|
||||||
|
##
|
||||||
|
## Networking
|
||||||
|
##
|
||||||
|
# Setup bridge
|
||||||
|
networking.bridges = { "qemu-br0" = { interfaces = [ "enp6s0" ]; }; };
|
||||||
|
networking.interfaces.qemu-br0 = {
|
||||||
|
ipv4.addresses = [{
|
||||||
|
address = "10.0.0.247";
|
||||||
|
prefixLength = 21;
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
networking.defaultGateway = "10.0.4.1";
|
||||||
|
networking.nameservers = [ "10.0.0.10" ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ in with lib; {
|
||||||
# Turn on GDM for login
|
# Turn on GDM for login
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autorun = true;
|
autorun = false;
|
||||||
# Enable plasma for the applications
|
# Enable plasma for the applications
|
||||||
desktopManager.plasma5.enable = true;
|
desktopManager.plasma5.enable = true;
|
||||||
displayManager.defaultSession = "hyprland";
|
displayManager.defaultSession = "hyprland";
|
||||||
|
|
Loading…
Reference in New Issue