beginning of dendritic rebuild
This commit is contained in:
parent
080e929cbc
commit
d924909d3b
56 changed files with 121 additions and 149 deletions
18
old/core/hosts/hades/bluetooth.nix
Executable file
18
old/core/hosts/hades/bluetooth.nix
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
#services.blueman.enable = true; # enables blueman
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true; # Enables bluetooth
|
||||
powerOnBoot = true; # Turns the bluetooth adapter on at boot
|
||||
input.General = { UserspaceHID = true; }; # fix bluetooth keyboard input
|
||||
settings.General = {
|
||||
Experimental = true; # Displays battery charge of connected devices
|
||||
FastConnectable = true; # Uses more power, but hades is a desktop
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
97
old/core/hosts/hades/default.nix
Executable file
97
old/core/hosts/hades/default.nix
Executable file
|
|
@ -0,0 +1,97 @@
|
|||
{ pkgs, user, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
# Host-specific config files
|
||||
./network.nix
|
||||
./hardware.nix
|
||||
./bluetooth.nix
|
||||
# Shared 'core' config options
|
||||
../../../core
|
||||
# Host-specific core modules
|
||||
../../../core/zfs.nix
|
||||
../../../core/gaming.nix
|
||||
../../../core/virtualisation.nix
|
||||
];
|
||||
|
||||
# Name of this computer ?
|
||||
networking.hostName = "hades";
|
||||
|
||||
# Boot options
|
||||
boot = {
|
||||
# Linux kernel version selection
|
||||
kernelPackages = pkgs.linuxPackages_latest; # latest compatible
|
||||
# Bootloader settings
|
||||
loader = {
|
||||
systemd-boot.enable = true; # better than grub
|
||||
efi.canTouchEfiVariables = true; # needed for stuff:tm:
|
||||
};
|
||||
# Filesystem support at boot
|
||||
supportedFilesystems = [
|
||||
"vfat" # fat32
|
||||
"ext4" # ext4
|
||||
#"ntfs" # windows lol
|
||||
];
|
||||
# Decryption via LUKS
|
||||
initrd.luks = {
|
||||
# Primary boot drive
|
||||
devices."luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d" = {
|
||||
device = "/dev/disk/by-uuid/55f7d546-fac9-4ea0-a21e-4c50ecc0d67d";
|
||||
};
|
||||
# Secondary storage drive
|
||||
#devices.Asphodel = { # secondary partition on Tartarus drive
|
||||
#device = "/dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4";
|
||||
#preLVM = false;
|
||||
#};
|
||||
};
|
||||
};
|
||||
|
||||
# Hardware
|
||||
services.xserver.videoDrivers = [ "amdgpu" ]; # makes x use amd
|
||||
hardware = {
|
||||
# GPU and graphics
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
# Driver packages for the dGPU inside Hades
|
||||
amdgpu = {
|
||||
overdrive.enable = true; # overclocking lol
|
||||
initrd.enable = true; # for video at boot
|
||||
opencl.enable = true; # gpu tech idk lol
|
||||
};
|
||||
};
|
||||
|
||||
# Peripherals
|
||||
hardware.openrazer = {
|
||||
enable = true; # enables openrazer daemon
|
||||
users = [ "${user}" ]; # giving primary user permissions (again)
|
||||
};
|
||||
users.users.${user} = { # giving primary user permissions (again)
|
||||
extraGroups = [ "openrazer" ];
|
||||
};
|
||||
services = {
|
||||
hardware.openrgb.enable = true; # rgb control
|
||||
input-remapper = {
|
||||
enable = true; # needed to remap some stuff
|
||||
enableUdevRules = true; # hotplug support
|
||||
};
|
||||
};
|
||||
|
||||
# Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
# Hardware & Firmware
|
||||
radeontop # monitoring
|
||||
nvtopPackages.amd # monitoring
|
||||
|
||||
# peripherals & Input
|
||||
input-remapper # Input control
|
||||
razergenie # Razer frontend
|
||||
openrazer-daemon # Razer daemon
|
||||
openrgb-with-all-plugins # RGB control
|
||||
|
||||
];
|
||||
|
||||
}
|
||||
36
old/core/hosts/hades/hardware.nix
Normal file
36
old/core/hosts/hades/hardware.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# 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" "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.blacklistedKernelModules = [ "ntfs3" ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/luks-35440a88-293e-455b-a018-ee1086b07321";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-35440a88-293e-455b-a018-ee1086b07321".device = "/dev/disk/by-uuid/35440a88-293e-455b-a018-ee1086b07321";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2C83-7F40";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/mapper/luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
78
old/core/hosts/hades/network.nix
Executable file
78
old/core/hosts/hades/network.nix
Executable file
|
|
@ -0,0 +1,78 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
|
||||
networking = {
|
||||
#wireless.enable = false;
|
||||
#nameservers = [ "127.0.0.1" "::1" ];
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
#dns = "none"; # handled by dnscrypt
|
||||
};
|
||||
};
|
||||
|
||||
## Rudimentary firewall config
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
|
||||
## Specific TCP ports to be opened
|
||||
allowedTCPPorts = [
|
||||
2234 # soulseek/nicotine-plus
|
||||
33929 # minecraft LAN
|
||||
#8384 # syncthing
|
||||
#8096 # jellyfin http
|
||||
#8920 # jellyfin https
|
||||
];
|
||||
|
||||
## Specific UDP ports to be opened
|
||||
allowedUDPPorts = [
|
||||
2234 # soulseek/nicotine-plus
|
||||
33929 # minecraft LAN
|
||||
#8834 # syncthing
|
||||
#7359 # jellyfin - client discovery
|
||||
];
|
||||
|
||||
## Ranges for TCP and UDP ports to be opened
|
||||
## - disabled for now, network infrastructure is minimal
|
||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
|
||||
};
|
||||
|
||||
## Systemd service for the dnscrypt config declared below
|
||||
#systemd.services.dnscrypt-proxy2.serviceConfig = {
|
||||
#StateDirectory = "dnscrypt-proxy";
|
||||
#};
|
||||
|
||||
services.dnscrypt-proxy = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipv6_servers = true;
|
||||
require_dnssec = true;
|
||||
sources.public-resolvers = {
|
||||
## Where to get list of server addresses
|
||||
urls = [
|
||||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
||||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||
];
|
||||
## key and cachefile to verify servers and authenticity
|
||||
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
||||
};
|
||||
|
||||
## Select a specific server, or a set of servers from the link below
|
||||
## - https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
||||
server_names = [
|
||||
"cs-sydney"
|
||||
"cs-singapore"
|
||||
"mullvad-doh"
|
||||
"mullvad-adblock-doh"
|
||||
"adfilter-syd"
|
||||
"adfilter-syd-ipv6"
|
||||
"userspace-australia"
|
||||
"userspace-australia-ipv6"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue