moderat tidy up of home.nix
This commit is contained in:
parent
7f73c1af20
commit
4ca6cff337
12 changed files with 110 additions and 115 deletions
|
|
@ -12,9 +12,6 @@
|
||||||
../home # user-level packages in ../home/programs/
|
../home # user-level packages in ../home/programs/
|
||||||
../secrets # secrets :shh:
|
../secrets # secrets :shh:
|
||||||
|
|
||||||
## Testing
|
|
||||||
../home/scripts/automount/postActivation.nix
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
## Make sure this is set !
|
## Make sure this is set !
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
../../../core
|
../../../core
|
||||||
## Host-specific core modules
|
## Host-specific core modules
|
||||||
../../../core/modules/zfs.nix
|
../../../core/modules/zfs.nix
|
||||||
|
../../../core/modules/sync.nix
|
||||||
../../../core/modules/gaming.nix
|
../../../core/modules/gaming.nix
|
||||||
../../../core/modules/jellyfin.nix
|
../../../core/modules/jellyfin.nix
|
||||||
#../../../core/modules/bluetooth.nix
|
#../../../core/modules/bluetooth.nix
|
||||||
|
|
|
||||||
|
|
@ -2,50 +2,41 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
|
||||||
# ./file.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
wireless.enable = false;
|
wireless.enable = false;
|
||||||
nameservers = [ "127.0.0.1" "::1" ];
|
nameservers = [ "127.0.0.1" "::1" ];
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dns = "none";
|
dns = "none"; # handled by dnscrypt
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#nameservers = [
|
## Rudimentary firewall config
|
||||||
#"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 = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
#checkReversePath = "loose";
|
|
||||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
## Specific TCP ports to be opened
|
||||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
|
||||||
#interfaces."DEVICENAME".allowedTCPPorts = [
|
|
||||||
#22999
|
|
||||||
#]
|
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
2234 # soulseek/nicotine-plus
|
2234 # soulseek/nicotine-plus
|
||||||
8384 # syncthing
|
8384 # syncthing
|
||||||
#21027
|
|
||||||
#25565
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
## Specific UDP ports to be opened
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
#22000
|
2234 # soulseek/nicotine-plus
|
||||||
#21027
|
8834 # syncthing
|
||||||
#41641
|
|
||||||
#51820
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
## 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 = {
|
services.dnscrypt-proxy2 = {
|
||||||
|
|
@ -55,16 +46,19 @@
|
||||||
require_dnssec = true;
|
require_dnssec = true;
|
||||||
|
|
||||||
sources.public-resolvers = {
|
sources.public-resolvers = {
|
||||||
|
## Where to get list of server addresses
|
||||||
urls = [
|
urls = [
|
||||||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
||||||
"https://download.dnscrypt.info/resolvers-list/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 =
|
minisign_key =
|
||||||
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
"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 = [
|
server_names = [
|
||||||
"mullvad-doh"
|
"mullvad-doh"
|
||||||
"mullvad-adblock-doh"
|
"mullvad-adblock-doh"
|
||||||
|
|
@ -78,8 +72,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.dnscrypt-proxy2.serviceConfig = {
|
|
||||||
StateDirectory = "dnscrypt-proxy";
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
./web
|
./web
|
||||||
./git
|
./git
|
||||||
./obs
|
./obs
|
||||||
|
./sync
|
||||||
./chat
|
./chat
|
||||||
./yazi
|
./yazi
|
||||||
./btop
|
./btop
|
||||||
|
|
@ -20,9 +21,7 @@
|
||||||
./music
|
./music
|
||||||
./fetch
|
./fetch
|
||||||
./kitty
|
./kitty
|
||||||
./syncthing
|
|
||||||
./multimedia
|
./multimedia
|
||||||
./music/production.nix
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -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, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./production.nix # programs for creation of music :D
|
||||||
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
||||||
## Media | Chore: Pick a music player
|
## Utilities
|
||||||
|
puddletag # Music metadata editing
|
||||||
|
|
||||||
|
## Music players
|
||||||
|
spotify # corpo trash
|
||||||
strawberry # QT music player
|
strawberry # QT music player
|
||||||
#lollypop # GTK music player
|
#lollypop # GTK/Gnome native music player
|
||||||
spotify # Corpo music streaming
|
|
||||||
#pragha # Music player
|
#pragha # Music player
|
||||||
#tauon # Music player
|
#tauon # Music player
|
||||||
puddletag # Music metadata editing
|
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,19 +8,17 @@
|
||||||
## Misc. Tools
|
## Misc. Tools
|
||||||
metronome # GTK metronome
|
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
|
## Digital Audio Workstations
|
||||||
audacity # Audio editing and DAW
|
audacity # Audio editing and DAW
|
||||||
reaper # Digital audio workstation
|
reaper # Digital audio workstation
|
||||||
ardour # 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
|
## Models and synths
|
||||||
neural-amp-modeler-lv2 # Guitar amp emulator
|
neural-amp-modeler-lv2 # Guitar amp emulator
|
||||||
#cardinal # vcv-rack but as an open source VST
|
#cardinal # vcv-rack but as an open source VST
|
||||||
|
|
@ -31,6 +29,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
## Neovim plugins for Supercollider synth
|
## Neovim plugins for Supercollider synth
|
||||||
|
## - full nvim environment for supercollider is WIP
|
||||||
programs.nixvim.extraPlugins = with pkgs.vimPlugins;
|
programs.nixvim.extraPlugins = with pkgs.vimPlugins;
|
||||||
[ nvim-treesitter-parsers.supercollider ];
|
[ nvim-treesitter-parsers.supercollider ];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,40 +10,22 @@
|
||||||
# need to set up auto luks unlock with sops-nix
|
# need to set up auto luks unlock with sops-nix
|
||||||
|
|
||||||
## Provides LUKS key for Asphodel
|
## Provides LUKS key for Asphodel
|
||||||
environment.etc."crypttab".text = ''
|
#environment.etc."crypttab".text = ''
|
||||||
data /dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4 ${config.sops.secrets.Asphodel-key.path}
|
#data /dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4 ${config.sops.secrets.Asphodel-key.path}
|
||||||
'';
|
#'';
|
||||||
|
|
||||||
## Mounts Asphodel to typical media location
|
## Mounts Asphodel to typical media location
|
||||||
fileSystems."/run/media/${primaryUser}/Asphodel".device =
|
#fileSystems."/run/media/${primaryUser}/Asphodel".device = "/dev/mapper/Asphodel";
|
||||||
"/dev/mapper/Asphodel";
|
|
||||||
|
|
||||||
home = {
|
home.file = { # Files and directories to copy to ${homeDir}
|
||||||
|
|
||||||
## Directories to copy to /home/${username/}
|
## Example format for home.file
|
||||||
file = {
|
#"Foo" = { # Name for the copied file
|
||||||
|
#source = ./Foo; # Source is relative to this file
|
||||||
## Path to automount disks to
|
#target = "Desired/Path/To/Foo"; # Target path for Foo within ${homeDir}
|
||||||
#"Disks" = {
|
#recursive = true; # Unsure if necessary for most things
|
||||||
#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;
|
|
||||||
#};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
## Related services
|
## Related services
|
||||||
|
|
@ -59,6 +41,13 @@
|
||||||
#};
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
## Syncthing program service
|
||||||
|
syncthing = {
|
||||||
|
enable = true;
|
||||||
|
tray.enable = true;
|
||||||
|
#guiAddress = "home.syncthing";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
31
home/programs/sync/postActivation.nix
Normal file
31
home/programs/sync/postActivation.nix
Normal 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"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
|
|
||||||
services = {
|
|
||||||
|
|
||||||
syncthing = {
|
|
||||||
enable = false;
|
|
||||||
#tray.enable = true;
|
|
||||||
#guiAddress = "home.syncthing";
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -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"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ ./automount ./startup.nix ./desktop.nix ./battery.nix ./nix-utils.nix ];
|
./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
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue