moderat tidy up of home.nix

This commit is contained in:
serenity-F 2025-03-25 17:09:02 +10:00
parent 7f73c1af20
commit 4ca6cff337
12 changed files with 110 additions and 115 deletions

View file

@ -12,9 +12,6 @@
../home # user-level packages in ../home/programs/
../secrets # secrets :shh:
## Testing
../home/scripts/automount/postActivation.nix
];
## Make sure this is set !

View file

@ -11,6 +11,7 @@
../../../core
## Host-specific core modules
../../../core/modules/zfs.nix
../../../core/modules/sync.nix
../../../core/modules/gaming.nix
../../../core/modules/jellyfin.nix
#../../../core/modules/bluetooth.nix

View file

@ -2,50 +2,41 @@
{
imports = [
# ./file.nix
];
networking = {
wireless.enable = false;
nameservers = [ "127.0.0.1" "::1" ];
networkmanager = {
enable = true;
dns = "none";
dns = "none"; # handled by dnscrypt
};
#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
## Rudimentary firewall config
networking.firewall = {
enable = true;
#checkReversePath = "loose";
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
#allowedUDPPortRanges = allowedTCPPortRanges;
#interfaces."DEVICENAME".allowedTCPPorts = [
#22999
#]
## Specific TCP ports to be opened
allowedTCPPorts = [
2234 # soulseek/nicotine-plus
8384 # syncthing
#21027
#25565
];
## Specific UDP ports to be opened
allowedUDPPorts = [
#22000
#21027
#41641
#51820
2234 # soulseek/nicotine-plus
8834 # syncthing
];
## Ranges for TCP and UDP ports to be opened
## - disabled for now as 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-proxy2 = {
@ -55,16 +46,19 @@
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"
];
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
## key and cachefile to verify servers and authenticity
minisign_key =
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
};
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/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 = [
"mullvad-doh"
"mullvad-adblock-doh"
@ -78,8 +72,4 @@
};
};
systemd.services.dnscrypt-proxy2.serviceConfig = {
StateDirectory = "dnscrypt-proxy";
};
}

View file

@ -12,6 +12,7 @@
./web
./git
./obs
./sync
./chat
./yazi
./btop
@ -20,9 +21,7 @@
./music
./fetch
./kitty
./syncthing
./multimedia
./music/production.nix
];

View file

@ -2,7 +2,10 @@
{
imports = [ ./homestuck.nix ./lookingGlass.nix ];
imports = [
./lookingGlass.nix # for GPU passthrough on virtual machines
./homestuck.nix # a small module to add a .desktop entry for The unofficial Homestuck Collection
];
home = {
packages = with pkgs; [

View file

@ -1,17 +1,30 @@
# # Chore: pick an offline music player already lol
## Requirements:
## - have last.fm support
## - match other UI styles
## - handle large amounts of FLAC/HiRes audio
## - optionally support metadata editing
{ pkgs, ... }:
{
imports = [
./production.nix # programs for creation of music :D
];
home = {
packages = with pkgs; [
## Media | Chore: Pick a music player
## Utilities
puddletag # Music metadata editing
## Music players
spotify # corpo trash
strawberry # QT music player
#lollypop # GTK music player
spotify # Corpo music streaming
#lollypop # GTK/Gnome native music player
#pragha # Music player
#tauon # Music player
puddletag # Music metadata editing
];
};

View file

@ -8,19 +8,17 @@
## Misc. Tools
metronome # GTK metronome
## Text based programmatic music production
supercollider-with-plugins
## Visual node based audio production
bespokesynth # Modular synth and sequencer
vcv-rack # Analogue modular synth emulator
puredata # Programmatic synth and sequencer
## Digital Audio Workstations
audacity # Audio editing and DAW
reaper # Digital audio workstation
ardour # Digital Audio Workstation
## Modular and programmatic music production
supercollider-with-plugins
bespokesynth # Modular synth and sequencer
vcv-rack # Analogue modular synth emulator
puredata # Programmatic synth and sequencer
## Models and synths
neural-amp-modeler-lv2 # Guitar amp emulator
#cardinal # vcv-rack but as an open source VST
@ -31,6 +29,7 @@
};
## Neovim plugins for Supercollider synth
## - full nvim environment for supercollider is WIP
programs.nixvim.extraPlugins = with pkgs.vimPlugins;
[ nvim-treesitter-parsers.supercollider ];

View file

@ -10,39 +10,21 @@
# need to set up auto luks unlock with sops-nix
## Provides LUKS key for Asphodel
environment.etc."crypttab".text = ''
data /dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4 ${config.sops.secrets.Asphodel-key.path}
'';
#environment.etc."crypttab".text = ''
#data /dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4 ${config.sops.secrets.Asphodel-key.path}
#'';
## Mounts Asphodel to typical media location
fileSystems."/run/media/${primaryUser}/Asphodel".device =
"/dev/mapper/Asphodel";
#fileSystems."/run/media/${primaryUser}/Asphodel".device = "/dev/mapper/Asphodel";
home = {
home.file = { # Files and directories to copy to ${homeDir}
## Directories to copy to /home/${username/}
file = {
## Path to automount disks to
#"Disks" = {
#source = ./Disks;
#target = "${disksPath}";
#recursive = true;
#};
## (current) Flake path
#"flakes/nixdots" = {
#source = ../../../../nixdots;
#recursive = true;
#};
## (future) Flake path
#"SerenityOS" = {
#source = ./SerenityOS;
#target = "${flakePath}";
#recursive = true;
#};
};
## Example format for home.file
#"Foo" = { # Name for the copied file
#source = ./Foo; # Source is relative to this file
#target = "Desired/Path/To/Foo"; # Target path for Foo within ${homeDir}
#recursive = true; # Unsure if necessary for most things
#};
};
@ -59,6 +41,13 @@
#};
};
## Syncthing program service
syncthing = {
enable = true;
tray.enable = true;
#guiAddress = "home.syncthing";
};
};
}

View file

@ -0,0 +1,31 @@
{ inputs, outputs, lib, config, pkgs, primaryUser, homeDir, flakePath, disksPath
, ... }:
{
## Work in progress - to fix/configure:
## - automatically copy flake repo to desired path
## - automatically copy sync directories to to desired paths
## - expand script with a try/catch block to provide output for failed links
## - expand script to only run if desired directories are NOT already linked
## To utilise this script place the following option into some system-level module
imports = [ ../home/scripts/automount/postActivation.nix ];
## Runs after using `sudo nixos-rebuild switch --flake .#<hostname>`
system.activationScripts.disksLink = {
supportsDryActivation = false;
## Prints status of run commmand with a cute message if successful
text = ''
cd ~ && ln -s Disks /run/media/${primaryUser}/*
echo "Current variables required are:"
echo "primaryUser - ${primaryUser}"
echo "homeDir - ${homeDir}"
echo "current paths linked are:"
echo "flakePath - ${flakePath}"
echo "disksPath - ${disksPath}"
echo "<3"
'';
};
}

View file

@ -1,14 +0,0 @@
{
services = {
syncthing = {
enable = false;
#tray.enable = true;
#guiAddress = "home.syncthing";
};
};
}

View file

@ -1,17 +0,0 @@
{ pkgs, flakePath, disksPath, primaryUser, ... }:
{
imports = [ ];
## Runs after using `sudo nixos-rebuild switch --flake .#<hostname>`
system.activationScripts.disksLink = {
supportsDryActivation = false;
## Prints status of run commmand with a cute message if successful
text = ''
cd ~ && ln -s Disks /run/media/${primaryUser}/*
echo "disksPaths linked successfully <3"
'';
};
}

View file

@ -1,6 +1,10 @@
{ ... }:
{
imports =
[ ./automount ./startup.nix ./desktop.nix ./battery.nix ./nix-utils.nix ];
imports = [
./startup.nix # Programs and scripts executed upon entering desktop environments
./desktop.nix # Programs and scripts essential to operating desktop environments
./battery.nix # Script for interfacing with batteries present on certain devices
./nix-utils.nix # Programs and scripts for interacting with NixOS infrastructure
];
}