Consolidate common PC config
All checks were successful
Check Flake / check-flake (push) Successful in 1m14s
All checks were successful
Check Flake / check-flake (push) Successful in 1m14s
This commit is contained in:
@@ -1,68 +1,13 @@
|
||||
{ config, pkgs, lib, nixos-hardware, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
];
|
||||
|
||||
|
||||
# for luks onlock over tor
|
||||
services.tor.enable = true;
|
||||
services.tor.client.enable = true;
|
||||
|
||||
# don't use remote builders
|
||||
nix.distributedBuilds = lib.mkForce false;
|
||||
|
||||
services.udev.extraRules = ''
|
||||
# depthai
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"
|
||||
|
||||
# Moonlander
|
||||
# Rules for Oryx web flashing and live training
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev"
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev"
|
||||
# Wally Flashing rules for the Moonlander and Planck EZ
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu"
|
||||
'';
|
||||
services.udev.packages = [ pkgs.platformio ];
|
||||
users.groups.plugdev = {
|
||||
members = [ "googlebot" ];
|
||||
};
|
||||
|
||||
# virt-manager
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
users.users.googlebot.extraGroups = [ "libvirtd" "adbusers" ];
|
||||
|
||||
# allow building ARM derivations
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
services.spotifyd.enable = true;
|
||||
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.podman.dockerCompat = true;
|
||||
|
||||
virtualisation.appvm.enable = true;
|
||||
virtualisation.appvm.user = "googlebot";
|
||||
|
||||
services.mount-samba.enable = true;
|
||||
|
||||
de.enable = true;
|
||||
de.touchpad.enable = true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
# barrier
|
||||
24800
|
||||
];
|
||||
|
||||
programs.adb.enable = true;
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# fingerprint reader has initially shown to be more of a nuisance than a help
|
||||
# it makes sddm log in fail most of the time and take several minutes to finish
|
||||
services.fprintd.enable = false;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{ config, lib, pkgs, modulesPath, nixos-hardware, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
hardware.framework.amd-7040.preventWakeOnAC = true;
|
||||
services.fwupd.enable = true;
|
||||
# fingerprint reader has initially shown to be more of a nuisance than a help
|
||||
# it makes sddm log in fail most of the time and take several minutes to finish
|
||||
services.fprintd.enable = false;
|
||||
|
||||
# boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
|
||||
@@ -27,17 +34,18 @@
|
||||
allowDiscards = true;
|
||||
};
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/95db6950-a7bc-46cf-9765-3ea675ccf014";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/95db6950-a7bc-46cf-9765-3ea675ccf014";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B087-2C20";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/B087-2C20";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/49fbdf62-eef4-421b-aac3-c93494afd23c"; }
|
||||
];
|
||||
[{ device = "/dev/disk/by-uuid/49fbdf62-eef4-421b-aac3-c93494afd23c"; }];
|
||||
|
||||
# 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
|
||||
|
||||
@@ -7,10 +7,6 @@
|
||||
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
|
||||
# for luks onlock over tor
|
||||
services.tor.enable = true;
|
||||
services.tor.client.enable = true;
|
||||
|
||||
# don't use remote builders
|
||||
nix.distributedBuilds = lib.mkForce false;
|
||||
|
||||
@@ -21,49 +17,6 @@
|
||||
hardware.openrazer.devicesOffOnScreensaver = false;
|
||||
users.users.googlebot.packages = [ pkgs.polychromatic ];
|
||||
|
||||
services.udev.extraRules = ''
|
||||
# depthai
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"
|
||||
|
||||
# Moonlander
|
||||
# Rules for Oryx web flashing and live training
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev"
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev"
|
||||
# Wally Flashing rules for the Moonlander and Planck EZ
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu"
|
||||
'';
|
||||
services.udev.packages = [ pkgs.platformio ];
|
||||
users.groups.plugdev = {
|
||||
members = [ "googlebot" ];
|
||||
};
|
||||
|
||||
# virt-manager
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
users.users.googlebot.extraGroups = [ "libvirtd" "adbusers" ];
|
||||
|
||||
# allow building ARM derivations
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
services.spotifyd.enable = true;
|
||||
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.podman.dockerCompat = true;
|
||||
|
||||
virtualisation.appvm.enable = true;
|
||||
virtualisation.appvm.user = "googlebot";
|
||||
|
||||
services.mount-samba.enable = true;
|
||||
|
||||
de.enable = true;
|
||||
de.touchpad.enable = true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
# barrier
|
||||
24800
|
||||
];
|
||||
|
||||
programs.adb.enable = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user