tidied
This commit is contained in:
parent
421cb23d11
commit
77a4563fde
19 changed files with 3 additions and 3 deletions
|
|
@ -1,115 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
||||
## Host specific config files
|
||||
./modules
|
||||
|
||||
## Shared 'core' config options
|
||||
../../core
|
||||
|
||||
];
|
||||
|
||||
## ## ## ## ##
|
||||
|
||||
boot = {
|
||||
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
supportedFilesystems = [ "vfat" "ext4" ];
|
||||
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/nvme0n1";
|
||||
enableCryptodisk = true;
|
||||
};
|
||||
|
||||
initrd.luks.devices = {
|
||||
root = {
|
||||
# Use https://nixos.wiki/wiki/Full_Disk_Encryption
|
||||
device = "/dev/disk/by-uuid/5526aab7-b779-4fc8-95bd-9452bc3a9232";
|
||||
preLVM = true;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
## ## ## ## ##
|
||||
|
||||
## ooh, hostname - this one's important!
|
||||
networking.hostName = "hades";
|
||||
|
||||
hardware = {
|
||||
|
||||
## Enable bluetooth inside Hades
|
||||
bluetooth.enable = true;
|
||||
|
||||
## GPU and graphics
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
## Packages for the iGPU inside Hades
|
||||
extraPackages = with pkgs; [
|
||||
intel-compute-runtime
|
||||
intel-media-driver
|
||||
libvdpau-va-gl
|
||||
vaapiIntel
|
||||
vaapiVdpau
|
||||
];
|
||||
};
|
||||
## Packages for the dGPU inside Hades
|
||||
amdgpu = {
|
||||
initrd.enable = true;
|
||||
opencl.enable = true;
|
||||
## Vulkan packages for the dGPU inside Hades
|
||||
amdvlk = {
|
||||
#enable = false;
|
||||
#package = [ ];
|
||||
#support32Bit.enable = false;
|
||||
#supportExperimental.enable = false;
|
||||
#settings = {
|
||||
#};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
## For tweaking system performance
|
||||
corectrl = {
|
||||
enable = true;
|
||||
## Allows tweaking GPU performance
|
||||
gpuOverclock = {
|
||||
enable = true;
|
||||
## Needed for radeon GPU overclocking
|
||||
ppfeaturemask = "0xfffd7fff";
|
||||
};
|
||||
};
|
||||
## Performance tweaking continued
|
||||
tuxclocker = {
|
||||
enable = true;
|
||||
enableAMD = true;
|
||||
useUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
## Some packages for managing the hardware inside Hades
|
||||
environment.systemPackages = with pkgs; [
|
||||
#umr
|
||||
lact
|
||||
radeontop
|
||||
#amdgpu_top
|
||||
#radeontools
|
||||
#radeon-profile
|
||||
nvtopPackages.amd
|
||||
];
|
||||
|
||||
## Systemd services for lact
|
||||
systemd = {
|
||||
packages = with pkgs; [
|
||||
lact
|
||||
];
|
||||
services.lactd.wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
|
||||
## Selected host modules for import
|
||||
./hardware.nix # hardware configuration
|
||||
./network.nix # network configuration
|
||||
./zfs.nix # zfs configuration
|
||||
|
||||
## Additional core modules to import
|
||||
../../../core/modules/jellyfin.nix # temporary for config purposes
|
||||
../../../core/modules/gaming.nix # didnt work in home-manager :(
|
||||
|
||||
];
|
||||
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
|
||||
sda = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/ata-SAMSUNG_MZNLN128HAHQ-000H1_S3T8NF0K724651";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1024M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "pomegranate";
|
||||
## disable settings.keyFile if you want to use interactive password entry
|
||||
#passwordFile = "/tmp/secret.key"; # Interactive
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
#keyFile = "/tmp/secret.key";
|
||||
};
|
||||
#additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/swap" = {
|
||||
mountpoint = "/.swapvol";
|
||||
swap.swapfile.size = "8192M";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
# 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, modulesPath, primaryUser, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
|
||||
initrd = {
|
||||
availableKernelModules =
|
||||
[ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
|
||||
extraModulePackages = [ ];
|
||||
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/ad648423-7aa4-4f0f-b157-2f6b458130f7";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/552D-851F";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/${primaryUser}/Tartarus" = {
|
||||
device = "/dev/disk/by-uuid/26d8d9d1-67d2-4d61-a092-10ed7368b9f6";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/b7ccf8c3-3641-4035-b91f-f7e54c6dd380"; }];
|
||||
|
||||
# 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;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
# ./file.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
wireless.enable = false;
|
||||
nameservers = [ "127.0.0.1" "::1" ];
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
dns = "none";
|
||||
};
|
||||
|
||||
#nameservers = [
|
||||
#"1.1.1.1"
|
||||
#];
|
||||
|
||||
#proxy = {
|
||||
#default = "https://user:password@proxy:port/";
|
||||
#noProxy = "127.0.0.1, localhost, internal.domain";
|
||||
#};
|
||||
|
||||
};
|
||||
|
||||
## i knooooowwwwwww i need a proper firewall config but im laaaazzyyyyyyyyyy
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
#checkReversePath = "loose";
|
||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
#interfaces."DEVICENAME".allowedTCPPorts = [
|
||||
#22999
|
||||
#]
|
||||
allowedTCPPorts = [
|
||||
2234 # soulseek/nicotine-plus
|
||||
8384 # syncthing
|
||||
#21027
|
||||
#25565
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#41641
|
||||
#51820
|
||||
];
|
||||
};
|
||||
|
||||
services.dnscrypt-proxy2 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipv6_servers = true;
|
||||
require_dnssec = true;
|
||||
|
||||
sources.public-resolvers = {
|
||||
urls = [
|
||||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
||||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||
];
|
||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
||||
minisign_key =
|
||||
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
};
|
||||
|
||||
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
||||
server_names = [
|
||||
"adfilter-syd"
|
||||
"adfilter-syd-ipv6"
|
||||
"cs-sydney"
|
||||
"cs-singapore"
|
||||
"userspace-australia"
|
||||
"userspace-australia-ipv6"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.dnscrypt-proxy2.serviceConfig = {
|
||||
StateDirectory = "dnscrypt-proxy";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
## ZFS Support NixOS module
|
||||
|
||||
## temporary location while we figure out how ZFS works,
|
||||
## eventually this will be embedded into the flake in a better way
|
||||
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
## This 'let' binding creates an attribute set
|
||||
## called "LatestZfsLinux", which we can call as
|
||||
## a package to specify when building our kernel.
|
||||
latestZfsLinux = lib.pipe pkgs.linuxKernel.packages [
|
||||
builtins.attrValues
|
||||
(builtins.filter (
|
||||
kPkgs:
|
||||
(builtins.tryEval kPkgs).success
|
||||
&& kPkgs ? kernel
|
||||
&& kPkgs.kernel.pname == "linux"
|
||||
&& !kPkgs.zfs.meta.broken
|
||||
))
|
||||
(builtins.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)))
|
||||
lib.last
|
||||
];
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
];
|
||||
|
||||
## Enable zfs in kernel and boot
|
||||
boot = {
|
||||
kernelPackages = lib.mkForce latestZfsLinux;
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
zfs = {
|
||||
extraPools = [ "orcus" ];
|
||||
forceImportRoot = false;
|
||||
};
|
||||
};
|
||||
|
||||
#fileSystems."/home/serenity/Disks/Orcus" = {
|
||||
#device = "orcus";
|
||||
#fsType = "zfs";
|
||||
#options = [ "users" ];
|
||||
#};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
zfs
|
||||
];
|
||||
|
||||
## Enable trim for ZFS SSDs
|
||||
services = {
|
||||
zfs = {
|
||||
## Trim for SSSds with ZFS
|
||||
#trim.enable = true;
|
||||
## Autoscrub data integrity ZFS service,
|
||||
## more to be added soon
|
||||
autoScrub = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostId = "603b0c8b";
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue