This is a config for multiple hosts of varying degrees of specificity, but main is an audio-oriented, modular NixOS configuration relying on Home-Manager and Flakes and includes examples of
- Custom Modules
- Custom Scripts
- Derivations
- Overlays
- DevShells
You probably won't want to try installing any of these hosts directly due to UUID discrepancies in hardware-configuration.nix, so this repo primarily serves as a reference in creating your own config
Some direct utility may be found in leveraging the binary cache by adding Garnix to your nix-config
nix.settings.substituters = [ "https://cache.garnix.io" ];
nix.settings.trusted-public-keys = [ "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" ];Special thanks to vimjoyer, ryan4yin, and PowerUser64, as their content/configs were massively helpful for learning the basics of NixOS, flakes, home-manager, and linux audio
-
Firstly, pinning our system inputs,
flake.nixis a parent -
Beneath this, various
hostsare defined withsysandusr(thinkconfiguration.nixandhome-manager.nix) -
sysandusrare further divided into modules within their corresponding directories -
Modules used by more than one host are stored in
commonflake ├── common │ ├── sys │ └── usr └── hosts ├── mac │ ├── sys │ └── usr ├── macvm │ ├── sys │ └── usr ├── main │ ├── sys │ └── usr ├── mainvm │ ├── sys │ └── usr └── media ├── sys └── usrusralso includes subdirectories for dotfiles, custom derivations, development environments, scripts, and theming to enable convienent access
-
- Development and Productivity
- 2023 Macbook Pro 14"
- M2 Pro
- 1tb storage
- 16gb memory
-
- Audio, Development and Productivity, Gaming
- 2024 DIY build
- Ryzen 7 9700x
- NVIDIA RTX 4070S
- 4tb NVME storage
- 32gb memory
-
- Media, Gaming
- 2011 Dell Inspiron 660
- Intel i7 2600k
- AMD Radeon RX 570
- 500gb SSD + 12tb HDD storage
- 8gb memory
-
Enable experimental features by adding this to
/etc/nixos/configuration.nix# Enable flakes nix.settings.experimental-features = [ "nix-command" "flakes" ];
Then rebuild
sudo nixos-rebuild switch
-
Move
/etc/nixosto~/etc/nixos, symlink new location to old
Enable non-sudo config edits{ mkdir ~/etc sudo mv /etc/nixos ~/etc/ sudo chown -R $(id -un):users ~/etc/nixos sudo ln -s ~/etc/nixos /etc/ } -
Download repo to
~/etc/nixos{ mv ~/etc/nixos ~/etc/nixos.backup cd ~/etc git clone https://github.com/camdenboren/nixos.git } -
Download Notes to
~/Documents/Repos/Notes
Not needed on mac or vm's{ cd ~/Documents git clone https://github.com/camdenboren/Notes.git } -
Update hardware UUID's in hardware-config. Use as needed
UUID and sd* can be found in Gnome Diskssudo fdisk /dev/sdb sudo mkfs -t ext4 /dev/sdb sudo chown camdenboren:users ~/media -R
sudo nixos-rebuild boot --flake ~/etc/nixos#hostNameFreetube config won't be updated until it's been launched
So launch it, clean up config errors, restart
-
-
Install windows vsts on main
Needs~/Music/musicsourced from local server firstinstallPlugins
-
-
-
Initial
- '+' sign -> virtualize -> linux
- boot iso image (aarch64)
- 4g mem
- default cores
- don't check opengl acc
- 64g drive
- name=NixOS
- '+' sign -> virtualize -> linux
-
Network
- Emulated VLAN
-
Before Starting
chmod u+rw /Users/camdenboren/Library/Containers/com.utmapp.UTM/Data/Documents/NixOS.utm/Data/efi_vars.fd
-
After Install
- Clear iso from vm page
-
Display
- upscaling=Linear
- start in fullscreen
- use 1920x1200 resolution
- virtio-gl-pci
- upscaling=Linear
-
-
- 32" LG -> 2288 x 1287
-
- Amethyst.app
- AutoRaise.app
- LinearMouse.app
- MullvadVPN.app
- Rectangle.app
-
- Amethyst.app
- AutoRaise.app
- BetterDisplay.app
- LinearMouse.app
- Rectangle.app
More commands in ./common/usr/mod/pkgs/bin/coding/bash.nix
-
Rebuilds system based on flake in
~/etc/nixossw
-
Uncomfy version
sudo nixos-rebuild switch --flake ~/etc/nixos#hostName -
Updates flake inputs
update
-
Evaluates flake outputs
check
-
Lists all current generations
nix profile history -
Removes old generations, derivations, etc.
clean
-
Build a nixpkgs-style derivations
cd into directory firstbld
-
Try out a package w/o installing
run packageName
-
Enter a shell with a package w/o installing
shell packageName
-
Basic yabridge commands
yabridgectl list yabridgectl status yabridgectl add "~/path/to/winvsts" yabridgectl rm "~/path/to/winvsts"
-
Installs windows vsts from
~/.nix-profile/lib/winvst3via yabridge into~/.vst3installPlugins
-
Installs added windows vsts, purges removed windows vsts
refreshPlugins
-
Shows audio limits
ulimit -a
-
Inspect Home Manager errors
systemctl status home-manager-camdenboren.service
-
Verify directory integrity
find . -type f -exec md5sum {} + | LC_ALL=C sort | md5sum >> md5sum.txt
-
Remove Rygel's ignored media files list (log out to take effect, also need:
shell sqlite)echo "delete from ignorelist;" | sqlite3 ~/.cache/rygel/media-export.db
-
Mac update
Zoom screen sharing permissions often break[!NOTE]
homebrew.greedyCasksdoes not seem to be working, so explicitly passing--greedyis needed (for now)sw brew upgrade --greedy brew cleanup
-
Quickemu (no vpn for windows dl, scripts use opt
--status-quo){ mkdir ~/vm cd ~/vm quickget windows 10 quickget nixos 24.05 gnome } -
Reset gsettings xkb (fixes esc <-> caps remap)
{ gsettings reset org.gnome.desktop.input-sources xkb-options gsettings reset org.gnome.desktop.input-sources sources } -
Reset Git Keychain on macOS
git credential-osxkeychain erase ⏎ host=github.com ⏎ protocol=https ⏎ ⏎
-
Using Steam
-
Launch cmds
'gamemoderun MANGOHUD=1 %command%'
-
-
GE-Proton8-32
-
Content Manager + CSP: https://github.com/sakaki91/Sakaki-AC-Linux-Guide/
-
Extra cmds (doesn't seem necessary anymore-here for reference)
protontricks --no-background-wineserver 244210 dotnet48
-
Input settings for Xbox One Controller
- Speed Sensitivity = 65%
- Steering Speed = 20%
- Gamma = 300%
- Filter = 60%
- Deadzone = 10%
-
-
- GE-Proton9-11
-
- Proton Experimental
- Extra notes
- Also requires
SteamDeck=1launch cmd - config saved in hm, manage consistent 60fps
- config path:
~/.steam/steam/steamapps/compatdata/3240220/pfx/drive_c/users/steamuser/Documents/Rockstar\ Games/GTAV\ Enhanced/settings.xml
- Also requires
-
- Proton 8.0-5
- nh vimjoyer thing
- use aliases instead of scripts for basic stuff
- services.xserver.xkb.options
- use firefox options for librewolf
- integration tests
- ollama service for macos
- GTAV Refresh readme cmd
- custom iso
- network lf transfer
- nixified homebrew
- try vim ext for vsc (unplanned)
- remap $ and 0 in nvim (unplanned)
- add git plugin to nvim (unplanned)
- ssh aliases or whatever
- maybe pipes