tweaking and tidying
This commit is contained in:
parent
b9e4db2a38
commit
260910529d
10 changed files with 225 additions and 357 deletions
|
|
@ -3,29 +3,28 @@
|
||||||
## https://github.com/musnix/musnix
|
## https://github.com/musnix/musnix
|
||||||
## https://nixos.wiki/wiki/Audio_production
|
## https://nixos.wiki/wiki/Audio_production
|
||||||
|
|
||||||
{ pkgs, user, ... }:
|
{ user, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
users.users.${user}.extraGroups = [ "audio" ];
|
# Permissions & Security
|
||||||
|
security.rtkit.enable = true;
|
||||||
## SHOULD BE ELSEWHERE - temporary testing declarations
|
users.users.${user}.extraGroups = [ "audio" ]; # adds user to audio group
|
||||||
environment.systemPackages = with pkgs; [
|
services.udev = { # needed for security
|
||||||
helm
|
extraRules = ''
|
||||||
vital
|
KERNEL=="rtc0", GROUP="audio"
|
||||||
];
|
KERNEL=="hpet", GROUP="audio"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Available kernel modules
|
||||||
boot = {
|
boot = {
|
||||||
kernelModules = [ "snd-seq" "snd-rawmidi" ];
|
kernelModules = [ "snd-seq" "snd-rawmidi" ];
|
||||||
kernelParams = [ "preempt=full" ];
|
kernelParams = [ "preempt=full" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
## Can't remember what this does,
|
|
||||||
## recommended to be enabled though
|
|
||||||
security = {
|
|
||||||
rtkit.enable = true;
|
|
||||||
# realtime audio priority (initially for JACK2)
|
# realtime audio priority (initially for JACK2)
|
||||||
pam.loginLimits = [
|
security.pam.loginLimits = [
|
||||||
{
|
{
|
||||||
domain = "@audio";
|
domain = "@audio";
|
||||||
item = "memlock";
|
item = "memlock";
|
||||||
|
|
@ -51,14 +50,6 @@
|
||||||
value = "99999";
|
value = "99999";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
|
||||||
services.udev = {
|
|
||||||
extraRules = ''
|
|
||||||
KERNEL=="rtc0", GROUP="audio"
|
|
||||||
KERNEL=="hpet", GROUP="audio"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Musnix for audio production
|
# Musnix for audio production
|
||||||
musnix = {
|
musnix = {
|
||||||
|
|
@ -70,23 +61,19 @@
|
||||||
|
|
||||||
# Pipewire baybee
|
# Pipewire baybee
|
||||||
services = {
|
services = {
|
||||||
|
pulseaudio = { enable = false; }; # not directly using pulse
|
||||||
# Not using pulse directly
|
|
||||||
pulseaudio = { enable = false; };
|
|
||||||
|
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true; # enables pipewire
|
||||||
jack.enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
wireplumber.enable = true;
|
|
||||||
alsa = {
|
alsa = {
|
||||||
enable = true;
|
enable = true; # enables alsa through pipewire
|
||||||
support32Bit = true;
|
support32Bit = true; # enables 32bit application support
|
||||||
};
|
};
|
||||||
|
jack.enable = true; # enables jack through pipewire
|
||||||
# Low latency config
|
pulse.enable = true; # enables pulse through pipewire
|
||||||
|
wireplumber.enable = true; # enables wireplumber
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
pipewire."92-low-latency" = {
|
# Low latency optimisations
|
||||||
|
pipewire."92-low-latency" = { # for pipewire
|
||||||
"context.properties" = {
|
"context.properties" = {
|
||||||
"default.clock.rate" = 48000;
|
"default.clock.rate" = 48000;
|
||||||
"default.clock.allowed-rates" = [ 44100 48000 96000 192000 ];
|
"default.clock.allowed-rates" = [ 44100 48000 96000 192000 ];
|
||||||
|
|
@ -95,7 +82,7 @@
|
||||||
"default.clock.max-quantum" = 384;
|
"default.clock.max-quantum" = 384;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
pipewire-pulse."92-low-latency" = {
|
pipewire-pulse."92-low-latency" = { # for pulseaudio
|
||||||
stream.properties = {
|
stream.properties = {
|
||||||
node.latency = "256/48000";
|
node.latency = "256/48000";
|
||||||
resample.quality = 1;
|
resample.quality = 1;
|
||||||
|
|
@ -113,12 +100,10 @@
|
||||||
pulse.max.quantum = "384/48000";
|
pulse.max.quantum = "384/48000";
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
17
core/bufferBuff.nix
Normal file
17
core/bufferBuff.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
# Increased download buffer as it caused issues previously
|
||||||
|
nix.settings.download-buffer-size = [ "268435456" ];
|
||||||
|
|
||||||
|
# Temporarily increasing max open files for my bloated flake
|
||||||
|
systemd.settings.Manager = { DefaultLimitNOFILE = "8192:524288"; };
|
||||||
|
sercurity.pam.loginLimits = [{
|
||||||
|
domain = "*";
|
||||||
|
type = "soft";
|
||||||
|
item = "nofile";
|
||||||
|
value = "8192";
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,50 +1,35 @@
|
||||||
{ inputs, lib, pkgs, user, ... }:
|
{ inputs, pkgs, user, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|
||||||
# Not sure we need the home-manager import here
|
# Not sure we need the home-manager import here
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
|
||||||
# Semi-modularised config
|
# Semi-modularised config
|
||||||
../home # user-level/additional packages
|
../home # user-level/additional packages
|
||||||
|
|
||||||
# Shared modules to import
|
# Shared modules to import
|
||||||
./audio.nix # musnix and audio options
|
./audio.nix # musnix and audio options
|
||||||
./display.nix # base display and output options
|
./display.nix # base display and output options
|
||||||
./regreet.nix # login manager
|
./regreet.nix # login manager
|
||||||
./packages.nix # core/essential packages
|
./packages.nix # core/essential packages
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Make sure this is set !
|
||||||
|
system = { stateVersion = "24.11"; };
|
||||||
|
|
||||||
# Core security options
|
# Core security options
|
||||||
security = {
|
security = {
|
||||||
sudo.execWheelOnly = true; # sets sudo auth to @wheel only
|
sudo.execWheelOnly = true; # sets sudo auth to @wheel only
|
||||||
polkit = { # enables system polkit ???
|
polkit.enable = true; # enables system polkit ???
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
## Temporarily ncreasing max open files
|
|
||||||
## needed for my huge ass bloaty flake
|
|
||||||
pam.loginLimits = [{
|
|
||||||
domain = "*";
|
|
||||||
type = "soft";
|
|
||||||
item = "nofile";
|
|
||||||
value = "8192";
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
systemd.settings.Manager = { DefaultLimitNOFILE = "8192:524288"; };
|
|
||||||
|
|
||||||
# Settings for the nix package manager and daemon
|
# Settings for the nix package manager and daemon
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
cores = 6; # sets nix to use most available cores during rebuild
|
cores = 12; # sets nix to use most available cores during rebuild
|
||||||
max-jobs = "auto"; # automatically determines max job count
|
max-jobs = "auto"; # automatically determines max job count
|
||||||
allow-dirty = false; # refuses to allow rebuilds when git tree is dirty
|
allow-dirty = false; # refuses to allow rebuilds when git tree is dirty
|
||||||
auto-optimise-store = true; # automatically optimised nix store on rebuild
|
auto-optimise-store = true; # automatically optimised nix store on rebuild
|
||||||
download-buffer-size = [ # increased download buffer as it caused issues previously
|
|
||||||
"268435456"
|
|
||||||
];
|
|
||||||
allowed-users = [ "@wheel" ]; # restricts `nix` command to @wheel
|
allowed-users = [ "@wheel" ]; # restricts `nix` command to @wheel
|
||||||
trusted-users = [ # adds root, @wheel, and ${primaryUser} to trusted users
|
trusted-users = [ # adds root, @wheel, and ${primaryUser} to trusted users
|
||||||
"root"
|
"root"
|
||||||
|
|
@ -72,11 +57,11 @@
|
||||||
enableAllHardware = true; # enables all hardware modules
|
enableAllHardware = true; # enables all hardware modules
|
||||||
enableAllFirmware = true; # enables all firmware modules
|
enableAllFirmware = true; # enables all firmware modules
|
||||||
#enableRedistributableFirmware = true; # enables redistributables
|
#enableRedistributableFirmware = true; # enables redistributables
|
||||||
|
usbStorage.manageShutdown = true; # graceful usb storage shutdown
|
||||||
sensor.hddtemp = {
|
sensor.hddtemp = {
|
||||||
enable = true; # enables temperature readings for mechanical drives
|
enable = true; # enables temperature readings for mechanical drives
|
||||||
drives = [ "/dev/disk/by-uuid/*" ]; # tries to find drives with sensors by uuid
|
drives = [ "/dev/disk/by-uuid/*" ]; # tries to find drives with sensors by uuid
|
||||||
};
|
};
|
||||||
usbStorage.manageShutdown = true; # graceful usb storage shutdown
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Manual pages and caching
|
# Manual pages and caching
|
||||||
|
|
@ -103,7 +88,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Make sure this is set !
|
|
||||||
system = { stateVersion = "24.11"; };
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, pkgs, label, lib, niri, ... }:
|
{ pkgs, label, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
|
@ -116,11 +116,11 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
## Utter junk from here on out, pls fix
|
# Utter junk from here on out, pls fix
|
||||||
## - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
## I put fonts here because i didn't know where tf else to put them lol
|
# I put fonts here because i didn't know where tf else to put them lol
|
||||||
## duplicate to home-manager config ?
|
# duplicate to home-manager config ?
|
||||||
fonts = {
|
fonts = {
|
||||||
packages = with pkgs;
|
packages = with pkgs;
|
||||||
[ spleen terminus_font terminus_font_ttf nerd-fonts.symbols-only ]
|
[ spleen terminus_font terminus_font_ttf nerd-fonts.symbols-only ]
|
||||||
|
|
@ -136,27 +136,18 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
## Dunno if i did this right, but possible needed for keyring/polkit stuff ?
|
#Dunno if i did this right, but possible needed for keyring/polkit stuff ?
|
||||||
security.pam.services.serenity.enableGnomeKeyring = true;
|
security.pam.services.serenity.enableGnomeKeyring = true;
|
||||||
|
|
||||||
## Move this
|
# Move this
|
||||||
programs = {
|
programs = {
|
||||||
gnome-disks.enable = true; # For when bimbo needs to manage disks
|
gnome-disks.enable = true; # For when bimbo needs to manage disks
|
||||||
seahorse.enable = true; # GTK secrets management
|
seahorse.enable = true; # GTK secrets management
|
||||||
droidcam.enable = true; # Use android device as a webcam
|
|
||||||
obs-studio = { # screen capture, recording, and sharing
|
|
||||||
enable = true;
|
|
||||||
enableVirtualCamera = true; # virtual webcam
|
|
||||||
plugins = with pkgs.obs-studio-plugins; [
|
|
||||||
#droidcam-obs # enables droidcam integration
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
## Move these
|
# Move these
|
||||||
services = {
|
services = {
|
||||||
libinput.enable = true; # don't think we NEED this tbh - unsure
|
libinput.enable = true; # don't think we NEED this tbh - unsure
|
||||||
#gvfs.enable = true; # virtual filesystem, needed this for ... something
|
|
||||||
dbus.enable = true; # dbus is for ... unsure
|
dbus.enable = true; # dbus is for ... unsure
|
||||||
upower.enable = true; # no clue
|
upower.enable = true; # no clue
|
||||||
udisks2.enable = true; # disk management service
|
udisks2.enable = true; # disk management service
|
||||||
|
|
|
||||||
119
core/gaming.nix
119
core/gaming.nix
|
|
@ -2,6 +2,34 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
|
||||||
|
# These are important apparently :uh:
|
||||||
|
sessionVariables = {
|
||||||
|
XDG_CACHE_HOME = "$HOME/.cache";
|
||||||
|
XDG_CONFIG_HOME = "$HOME/.config";
|
||||||
|
XDG_BIN_HOME = "$HOME/.local/bin";
|
||||||
|
XDG_DATA_HOME = "$HOME/.local/share";
|
||||||
|
# Steam needs this to find Proton-GE
|
||||||
|
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
|
||||||
|
# Note: this doesn't replace PATH, it just adds this to it
|
||||||
|
PATH = [ "\${XDG_BIN_HOME}" ];
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
SDL_VIDEODRIVER = "x11,wayland,windows";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Games and misc.
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
piper # Open mouse config
|
||||||
|
vassal # FOSSy board game sim
|
||||||
|
cockatrice # Magical the gathering, but free
|
||||||
|
prismlauncher # Modded Minecraft client
|
||||||
|
osu-lazer-bin # Rhythm is just a click away!
|
||||||
|
inputs.nix-gaming.packages.${pkgs.system}.osu-mime
|
||||||
|
#inputs.nix-gaming.packages.${pkgs.system}.osu-lazer-bin
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Adding primary user to gamemode group
|
# Adding primary user to gamemode group
|
||||||
users.users.${user}.extraGroups = [ "gamemode" ];
|
users.users.${user}.extraGroups = [ "gamemode" ];
|
||||||
# Gaming mouse config
|
# Gaming mouse config
|
||||||
|
|
@ -18,54 +46,40 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
|
||||||
# Games and misc.
|
|
||||||
systemPackages = with pkgs; [
|
|
||||||
piper # Open mouse config
|
|
||||||
vassal # FOSSy board game sim
|
|
||||||
cockatrice # Magical the gathering, but free
|
|
||||||
prismlauncher # Modded Minecraft client
|
|
||||||
osu-lazer-bin # Rhythm is just a click away!
|
|
||||||
inputs.nix-gaming.packages.${pkgs.system}.osu-mime
|
|
||||||
#inputs.nix-gaming.packages.${pkgs.system}.osu-lazer-bin
|
|
||||||
];
|
|
||||||
|
|
||||||
# These are important apparently :uh:
|
|
||||||
sessionVariables = {
|
|
||||||
XDG_CACHE_HOME = "$HOME/.cache";
|
|
||||||
XDG_CONFIG_HOME = "$HOME/.config";
|
|
||||||
XDG_BIN_HOME = "$HOME/.local/bin";
|
|
||||||
XDG_DATA_HOME = "$HOME/.local/share";
|
|
||||||
# Steam needs this to find Proton-GE
|
|
||||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
|
|
||||||
# Note: this doesn't replace PATH, it just adds this to it
|
|
||||||
PATH = [ "\${XDG_BIN_HOME}" ];
|
|
||||||
NIXOS_OZONE_WL = "1";
|
|
||||||
SDL_VIDEODRIVER = "x11,wayland,windows";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
## TIDY BELOW ##
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|
||||||
# Java, just in case i guess ?
|
java.enable = true; # just in case
|
||||||
java.enable = true;
|
|
||||||
# This should help games run more betterer
|
|
||||||
gamescope = {
|
gamescope = {
|
||||||
enable = true;
|
enable = true; # compositor for games
|
||||||
capSysNice = true;
|
capSysNice = true; # should make games run better
|
||||||
|
};
|
||||||
|
|
||||||
|
# Steam
|
||||||
|
steam = {
|
||||||
|
enable = true; # enables steam itself
|
||||||
|
protontricks.enable = true; # enables protontricks
|
||||||
|
gamescopeSession.enable = true; # compositor for games
|
||||||
|
extraCompatPackages = with pkgs; [ proton-ge-bin ]; # glorious eggroll
|
||||||
|
package = pkgs.steam.override { # no clue lol
|
||||||
|
extraLibraries = pkgs: [ pkgs.xorg.libxcb ]; # what
|
||||||
|
extraPkgs = pkgs: with pkgs; [ # absolutely clueless lol
|
||||||
|
libpng
|
||||||
|
libpulseaudio
|
||||||
|
libvorbis
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
libkrb5
|
||||||
|
keyutils
|
||||||
|
gamemode
|
||||||
|
] ++ (with pkgs.xorg; [ libXi libXcursor libXinerama libXScrnSaver ]);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# "GameMode" - https://nixos.wiki/wiki/Gamemode
|
# "GameMode" - https://nixos.wiki/wiki/Gamemode
|
||||||
# (config copy-pasted from mynixos)
|
|
||||||
gamemode = {
|
gamemode = {
|
||||||
enable = false;
|
enable = false;
|
||||||
settings = {
|
settings = {
|
||||||
general = {
|
general.renice = 10;
|
||||||
renice = 10;
|
# Warning: GPU optimisations have the potential to damage hardware
|
||||||
};
|
|
||||||
## Warning: GPU optimisations have the potential to damage hardware
|
|
||||||
gpu = {
|
gpu = {
|
||||||
apply_gpu_optimisations = "accept-responsibility";
|
apply_gpu_optimisations = "accept-responsibility";
|
||||||
gpu_device = 0;
|
gpu_device = 0;
|
||||||
|
|
@ -78,33 +92,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Steam itself
|
|
||||||
steam = {
|
|
||||||
# Enables steam itself
|
|
||||||
enable = true;
|
|
||||||
# Enables protontricks
|
|
||||||
protontricks.enable = true;
|
|
||||||
# This should help games run more betterer
|
|
||||||
gamescopeSession.enable = true;
|
|
||||||
## No clue what this is doing
|
|
||||||
#package = pkgs.steam.override {
|
|
||||||
#extraLibraries = pkgs: [ pkgs.xorg.libxcb ];
|
|
||||||
## No clue what this shit does
|
|
||||||
#extraPkgs = pkgs:
|
|
||||||
#with pkgs; [
|
|
||||||
#libpng
|
|
||||||
#libpulseaudio
|
|
||||||
#libvorbis
|
|
||||||
#stdenv.cc.cc.lib
|
|
||||||
#libkrb5
|
|
||||||
#keyutils
|
|
||||||
#gamemode
|
|
||||||
#] ++ (with pkgs.xorg; [ libXi libXcursor libXinerama libXScrnSaver ]);
|
|
||||||
#};
|
|
||||||
#extraPackages = with pkgs; [ ];
|
|
||||||
# Gotta have the glorious eggroll
|
|
||||||
extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{ pkgs, user, ... }:
|
{ pkgs, user, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
|
|
||||||
|
imports = [
|
||||||
# Host-specific config files
|
# Host-specific config files
|
||||||
./network.nix
|
./network.nix
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
|
@ -15,115 +15,75 @@
|
||||||
../../../core/virtualisation.nix
|
../../../core/virtualisation.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# ooh, hostname - this one's important!
|
# Name of this computer ?
|
||||||
networking.hostName = "hades";
|
networking.hostName = "hades";
|
||||||
|
|
||||||
## ## ## ## ##
|
# Boot options
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
# Linux kernel version selection
|
||||||
kernelPackages =
|
kernelPackages = pkgs.linuxPackages_latest; # latest compatible
|
||||||
pkgs.linuxPackages_latest; # use the latest compatible linux kernel
|
# Bootloader settings
|
||||||
supportedFilesystems =
|
|
||||||
[ "vfat" "ext4" ]; # adds fat32 and ext3 filesystems to defaults
|
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
efi.canTouchEfiVariables = true;
|
systemd-boot.enable = true; # better than grub
|
||||||
systemd-boot = {
|
efi.canTouchEfiVariables = true; # needed for stuff:tm:
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
|
# 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
|
||||||
initrd.luks.devices."luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d".device = "/dev/disk/by-uuid/55f7d546-fac9-4ea0-a21e-4c50ecc0d67d";
|
#devices.Asphodel = { # secondary partition on Tartarus drive
|
||||||
|
|
||||||
# Uhhhhhhh
|
|
||||||
#Asphodel = { # secondary partition on Tartarus drive
|
|
||||||
#device = "/dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4";
|
#device = "/dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4";
|
||||||
#preLVM =false;
|
#preLVM = false;
|
||||||
#};
|
#};
|
||||||
#};
|
};
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
## ## ## ## ##
|
|
||||||
|
|
||||||
# Hades specific Razer peripherals
|
|
||||||
users.users.${user}.extraGroups = [ "openrazer" ];
|
|
||||||
hardware.openrazer = {
|
|
||||||
enable = true;
|
|
||||||
users = [ "${user}" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Hardware
|
||||||
|
services.xserver.videoDrivers = [ "amdgpu" ]; # makes x use amd
|
||||||
hardware = {
|
hardware = {
|
||||||
|
|
||||||
# GPU and graphics
|
# GPU and graphics
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
# Packages for the iGPU inside Hades
|
|
||||||
# - disabled for now:tm:
|
|
||||||
extraPackages = with pkgs;
|
|
||||||
[
|
|
||||||
#intel-compute-runtime
|
|
||||||
#intel-media-driver
|
|
||||||
#libvdpau-va-gl
|
|
||||||
#vaapiIntel
|
|
||||||
#vaapiVdpau
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
# Driver packages for the dGPU inside Hades
|
# Driver packages for the dGPU inside Hades
|
||||||
amdgpu = {
|
amdgpu = {
|
||||||
initrd.enable = true;
|
overdrive.enable = true; # overclocking lol
|
||||||
opencl.enable = true;
|
initrd.enable = true; # for video at boot
|
||||||
overdrive = {
|
opencl.enable = true; # gpu tech idk lol
|
||||||
enable = true;
|
|
||||||
#ppfeaturemask = "0xffffffff";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# 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 = {
|
services = {
|
||||||
|
hardware.openrgb.enable = true; # rgb control
|
||||||
# Tells X to use amdgpu drivers
|
|
||||||
xserver.videoDrivers = [ "amdgpu" ];
|
|
||||||
# Openrgb background service
|
|
||||||
hardware.openrgb.enable = true;
|
|
||||||
# Peripheral input remapping
|
|
||||||
input-remapper = {
|
input-remapper = {
|
||||||
enable = true;
|
enable = true; # needed to remap some stuff
|
||||||
enableUdevRules = true; # hotplug support
|
enableUdevRules = true; # hotplug support
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
# Packages
|
||||||
# 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; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
||||||
# GPU firmware and control
|
# Hardware & Firmware
|
||||||
#umr # tweaking
|
|
||||||
lact # tweaking
|
|
||||||
radeontop # monitoring
|
radeontop # monitoring
|
||||||
#amdgpu_top # monitoring
|
|
||||||
#radeontools # tweaking
|
|
||||||
#radeon-profile # tweaking
|
|
||||||
nvtopPackages.amd # monitoring
|
nvtopPackages.amd # monitoring
|
||||||
|
|
||||||
# peripherals & Input
|
# peripherals & Input
|
||||||
|
|
@ -131,12 +91,7 @@
|
||||||
razergenie # Razer frontend
|
razergenie # Razer frontend
|
||||||
openrazer-daemon # Razer daemon
|
openrazer-daemon # Razer daemon
|
||||||
openrgb-with-all-plugins # RGB control
|
openrgb-with-all-plugins # RGB control
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Systemd services for lact
|
|
||||||
systemd = {
|
|
||||||
packages = with pkgs; [ lact ];
|
|
||||||
services.lactd.wantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
{ inputs, outputs, pkgs, flakePath, niri, tidalcycles, ... }:
|
{ pkgs, flakePath, niri, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
# Activation Scripts - runs after using `sudo nixos-rebuild switch`
|
# Activation Scripts - runs after using `sudo nixos-rebuild switch`
|
||||||
system.activationScripts.diff = {
|
system.activationScripts.diff = {
|
||||||
supportsDryActivation = true;
|
supportsDryActivation = true;
|
||||||
|
|
@ -16,109 +14,71 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
## Nixpkgs Settings
|
# Nixpkgs Settings
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config = {
|
config = {
|
||||||
|
allowUnfree = true; # not doing full foss lol
|
||||||
# Not doing full-FOSS lol
|
allowBroken = true; # I like 'em broken
|
||||||
allowUnfree = true;
|
permittedInsecurePackages = [ ]; # insert obvious joke here
|
||||||
allowBroken = true;
|
#packageOverrides = pkgs: { # package overrides here
|
||||||
|
|
||||||
# Place insecure packages here
|
|
||||||
#permittedInsecurePackages = [
|
|
||||||
#"olm-3.2.16"
|
|
||||||
#];
|
|
||||||
|
|
||||||
# Place package overrides here
|
|
||||||
#packageOverrides = pkgs: {
|
|
||||||
#sygil-plymouth = pkgs.callPackage /home/serenity/repos/sygil-plymouth/package.nix { };
|
#sygil-plymouth = pkgs.callPackage /home/serenity/repos/sygil-plymouth/package.nix { };
|
||||||
#};
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Place package overlays here
|
# Place package overlays here
|
||||||
overlays = [
|
overlays = [
|
||||||
niri.overlays.niri
|
# Enabled overlays
|
||||||
#inputs.tidalcycles.overlays.default
|
niri.overlays.nixos-rebuild # latest niri
|
||||||
#inputs.mac-style-plymouth.overlays.default
|
# Disabled overlays
|
||||||
#inputs.sygil-plymouth.overlays.default
|
#inputs.tidalcycles.overlays.default # programmatic music
|
||||||
#inputs.sygil-plymouth-clean.overlays.default
|
#inputs.mac-style-plymouth.overlays.default # for theme
|
||||||
## to use overlays exported from other flakes:
|
#inputs.sygil-plymouth.overlays.default # indev theme
|
||||||
#neovim-nightly-overlay.overlays.default
|
|
||||||
## or define it inline, for example:
|
|
||||||
#(final: prev: {
|
|
||||||
#hi = final.hello.overrideAttrs (oldAttrs: {
|
|
||||||
#patches = [ ./change-hello-to-hi.patch ];
|
|
||||||
#});
|
|
||||||
#})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
## Nix settings for package related stuff
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
substituters = [ # for pkgs not in or out of date in nixpkgs
|
substituters = [ # for pkgs not in or out of date in nixpkgs
|
||||||
"https://cache.iog.io"
|
"https://cache.iog.io"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [ # keys to sign the packages
|
||||||
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
## System-level Programs
|
# System-level Programs
|
||||||
programs = {
|
programs = {
|
||||||
# Core terminal suite
|
# Core terminal suite
|
||||||
git = { enable = true; }; # Mandatory version control
|
git = { enable = true; }; # Mandatory version control
|
||||||
fish = { enable = true; }; # A catgirls favourite shell
|
fish = { enable = true; }; # A catgirls favourite shell
|
||||||
neovim = { enable = true; }; # Neovim declared here too, just in case
|
neovim = { enable = true; }; # Neovim declared here too, just in case
|
||||||
|
|
||||||
# NixOS CLI helper
|
|
||||||
nh = {
|
nh = {
|
||||||
enable = true;
|
enable = true; # nixos cli helper
|
||||||
flake = "${flakePath}"; # Declared in flake.nix
|
flake = "${flakePath}"; # Declared in flake.nix
|
||||||
};
|
};
|
||||||
|
|
||||||
# For handling encryption keys
|
|
||||||
gnupg.agent = {
|
gnupg.agent = {
|
||||||
enable = true;
|
enable = true; # handles encryption keys
|
||||||
enableSSHSupport = true;
|
enableSSHSupport = true; # ssh good, lol
|
||||||
#pinentryPackage = [ ];
|
#pinentryPackage = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# For running unpackaged binaries
|
|
||||||
nix-ld = {
|
nix-ld = {
|
||||||
enable = true;
|
enable = true; # runs unpackaged binaries
|
||||||
#libraries = with pkgs; [ ];
|
#libraries = with pkgs; [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# To run "normal" linux applications seamlessly
|
|
||||||
appimage = {
|
appimage = {
|
||||||
enable = true;
|
enable = true; # runs "normal" linux applications
|
||||||
binfmt = true;
|
binfmt = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
services.flatpak.enable = true; # flatpak just in case
|
||||||
# Flatpak, just in case
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
|
||||||
# Environment Variables
|
# Environment Variables
|
||||||
variables = { # sets neovim to default editor in other apps
|
variables = { # sets neovim to default editor in other apps
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
VISUAL = "nvim";
|
VISUAL = "nvim";
|
||||||
SYSTEMD_EDITOR = "nvim";
|
SYSTEMD_EDITOR = "nvim";
|
||||||
};
|
};
|
||||||
|
# System-level Packages
|
||||||
# Install a stub ELF loader to print an informative
|
|
||||||
# error message in the event that a user attempts
|
|
||||||
# to run an ELF binary not compiled for NixOS.
|
|
||||||
stub-ld.enable = true;
|
|
||||||
|
|
||||||
## System-level Packages
|
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
|
|
||||||
# Nix specific tools
|
# Nix specific tools
|
||||||
#cabal2nix
|
#cabal2nix
|
||||||
nix-tree # Dependency tree viewer for nix store
|
nix-tree # Dependency tree viewer for nix store
|
||||||
|
|
@ -126,13 +86,11 @@
|
||||||
nix-index # Database for nixpkgs
|
nix-index # Database for nixpkgs
|
||||||
nix-prefetch # provides info on a url
|
nix-prefetch # provides info on a url
|
||||||
nix-output-monitor # Shows extra information on nix commands
|
nix-output-monitor # Shows extra information on nix commands
|
||||||
|
|
||||||
# Filsesystem utilities
|
# Filsesystem utilities
|
||||||
ddrutility # Set of tools for HDD rescure
|
ddrutility # Set of tools for HDD rescure
|
||||||
exfatprogs # ExFAT filesystem
|
exfatprogs # ExFAT filesystem
|
||||||
btrfs-progs # BTRFS filesystem
|
btrfs-progs # BTRFS filesystem
|
||||||
ntfs3g # NTFS filesystem
|
ntfs3g # NTFS filesystem
|
||||||
|
|
||||||
# CLI tools & utilities
|
# CLI tools & utilities
|
||||||
fd # Find, but faster
|
fd # Find, but faster
|
||||||
bc # Calculator
|
bc # Calculator
|
||||||
|
|
@ -163,6 +121,10 @@
|
||||||
smartmontools # Tools for monitoring HDD health
|
smartmontools # Tools for monitoring HDD health
|
||||||
magic-wormhole # Direct file sharing
|
magic-wormhole # Direct file sharing
|
||||||
];
|
];
|
||||||
|
# Install a stub ELF loader to print an informative
|
||||||
|
# error message in the event that a user attempts
|
||||||
|
# to run an ELF binary not compiled for NixOS.
|
||||||
|
stub-ld.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,6 @@ in {
|
||||||
#phodav # for vm fileshare
|
#phodav # for vm fileshare
|
||||||
];
|
];
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
#cores = 4; # fine for now
|
|
||||||
#graphics = true; # run qemu in gui or no gui mode
|
|
||||||
spiceUSBRedirection.enable = true; # for USB passthrough
|
spiceUSBRedirection.enable = true; # for USB passthrough
|
||||||
libvirtd = {
|
libvirtd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -40,13 +38,6 @@ in {
|
||||||
runAsRoot = true; # for `passthrough` security on fileshare
|
runAsRoot = true; # for `passthrough` security on fileshare
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#sharedDirectories = { # list of directories to share to VMs
|
|
||||||
#Public = { # ~/Public
|
|
||||||
#securityModel = "passthrough";
|
|
||||||
#source = "${sharePublicSourceDirectory}";
|
|
||||||
#target = "${sharePublicTargetDirectory}";
|
|
||||||
#};
|
|
||||||
#};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
## Black magic wizardry from https://wiki.nixos.org/wiki/ZFS
|
# Black magic wizardry from https://wiki.nixos.org/wiki/ZFS
|
||||||
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
zfsCompatibleKernelPackages = lib.filterAttrs (name: kernelPackages:
|
zfsCompatibleKernelPackages = lib.filterAttrs (name: kernelPackages:
|
||||||
(builtins.match "linux_[0-9]+_[0-9]+" name) != null
|
(builtins.match "linux_[0-9]+_[0-9]+" name) != null
|
||||||
&& (builtins.tryEval kernelPackages).success
|
&& (builtins.tryEval kernelPackages).success
|
||||||
|
|
@ -13,7 +13,7 @@ let
|
||||||
latestKernelPackage = lib.last
|
latestKernelPackage = lib.last
|
||||||
(lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version))
|
(lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version))
|
||||||
(builtins.attrValues zfsCompatibleKernelPackages));
|
(builtins.attrValues zfsCompatibleKernelPackages));
|
||||||
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
|
|
@ -27,7 +27,6 @@ in {
|
||||||
#forceImportRoot = false;
|
#forceImportRoot = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ zfs ];
|
environment.systemPackages = with pkgs; [ zfs ];
|
||||||
networking = { hostId = "603b0c8b"; }; # Unsure why this is here actually ?
|
networking = { hostId = "603b0c8b"; }; # Unsure why this is here actually ?
|
||||||
services = {
|
services = {
|
||||||
|
|
|
||||||
|
|
@ -14,30 +14,29 @@ in {
|
||||||
|
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
## Primary user configuration -
|
# Primary user configuration -
|
||||||
## to create additional users, copy all options
|
# to create additional users, copy all options
|
||||||
## below to a new file akin to `u-username.nix`,
|
# below to a new file akin to `u-username.nix`,
|
||||||
## or `u-username/default.nix` with more modules,
|
# or `u-username/default.nix` with more modules,
|
||||||
## making sure to replace all instances of
|
# making sure to replace all instances of
|
||||||
## `${primaryUser}` with the new username.
|
# `${primaryUser}` with the new username.
|
||||||
|
|
||||||
## Needed for sops-nix to handle loginPassword
|
# Needed for sops-nix to handle loginPassword
|
||||||
#sops.secrets.loginPassword.neededForUsers = true;
|
#sops.secrets.loginPassword.neededForUsers = true;
|
||||||
#users.mutableUsers = false;
|
#users.mutableUsers = false;
|
||||||
|
|
||||||
## System-level user declarations
|
# System-level user declarations
|
||||||
users.users = {
|
users.users = {
|
||||||
${user} = {
|
${user} = {
|
||||||
description = "${userDescription}";
|
description = "${userDescription}";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [ "wheel" "networkmanager" ];
|
||||||
#hashedPasswordFile = config.sops.secrets.loginPassword.path;
|
#hashedPasswordFile = config.sops.secrets.loginPassword.path;
|
||||||
## A catgirl's favourite shell
|
shell = pkgs.fish; # catgirls favourite shell
|
||||||
shell = pkgs.fish;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
## home-manager configuration
|
# home-manager configuration
|
||||||
home-manager = {
|
home-manager = {
|
||||||
verbose = true; # enables verbose output on activation
|
verbose = true; # enables verbose output on activation
|
||||||
extraSpecialArgs = { # passes in specialArgs from flake.nix
|
extraSpecialArgs = { # passes in specialArgs from flake.nix
|
||||||
|
|
@ -52,12 +51,12 @@ in {
|
||||||
users = {
|
users = {
|
||||||
${user} = {
|
${user} = {
|
||||||
imports = [
|
imports = [
|
||||||
## Home configuration -
|
# Home configuration -
|
||||||
## currently all users share the same home
|
# currently all users share the same home
|
||||||
## configuration, though each has separate
|
# configuration, though each has separate
|
||||||
## home directories. Additional modules
|
# home directories. Additional modules
|
||||||
## can be declared alongside `u-username/default.nix`
|
# can be declared alongside `u-username/default.nix`
|
||||||
## and then imported in this section.
|
# and then imported in this section.
|
||||||
#./resources/theme
|
#./resources/theme
|
||||||
./desktop
|
./desktop
|
||||||
./terminal
|
./terminal
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue