options follow my.schema to avoid conflicts

This commit is contained in:
Danilo Reyes 2024-04-19 23:19:21 -06:00
parent f1a1656155
commit 36f4b83c82
30 changed files with 1502 additions and 1657 deletions

View File

@ -1,5 +1,6 @@
{ config, lib, pkgs, options, ... }: { { config, lib, pkgs, options, ... }: {
imports = [ ./modules/apps.nix ./modules/dev.nix ]; imports =
[ ./modules/apps.nix ./modules/dev.nix ./modules/services.nix ./jawz.nix ];
system = { system = {
copySystemConfiguration = true; copySystemConfiguration = true;
stateVersion = "23.11"; stateVersion = "23.11";

View File

@ -24,7 +24,6 @@ in {
''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"''; ''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
cp = "cp -i"; cp = "cp -i";
mv = "mv -i"; mv = "mv -i";
mkcd = ''mkdir -pv "$1" && cd "$1" || exit'';
mkdir = "mkdir -p"; mkdir = "mkdir -p";
rm = "trash"; rm = "trash";
".." = "cd .."; ".." = "cd ..";
@ -50,12 +49,12 @@ in {
enableVteIntegration = true; enableVteIntegration = true;
initExtra = '' initExtra = ''
$HOME/.local/bin/pokemon-colorscripts -r --no-title $HOME/.local/bin/pokemon-colorscripts -r --no-title
# Lists
list_root="${config.xdg.configHome}"/jawz/lists/jawz list_root="${config.xdg.configHome}"/jawz/lists/jawz
export LW=$list_root/watch.txt export LW=$list_root/watch.txt
export LI=$list_root/instant.txt export LI=$list_root/instant.txt
export LC=$list_root/comic.txt export LC=$list_root/comic.txt
export command_timeout=30 export command_timeout=60
if command -v fzf-share >/dev/null; then if command -v fzf-share >/dev/null; then
source "$(fzf-share)/key-bindings.bash" source "$(fzf-share)/key-bindings.bash"
@ -64,8 +63,9 @@ in {
nixos-reload () { nixos-reload () {
NIXOSDIR=/home/jawz/Development/NixOS NIXOSDIR=/home/jawz/Development/NixOS
nix-store --add-fixed sha256 $NIXOSDIR/scripts/PureRef-1.11.1_x64.Appimage nix-store --add-fixed sha256 \
nixfmt $NIXOSDIR/workstation/*.nix $NIXOSDIR/PureRef-1.11.1_x64.Appimage
fd --full-path $NIXOSDIR -e nix -x nixfmt \;
sudo unbuffer nixos-rebuild switch -I \ sudo unbuffer nixos-rebuild switch -I \
nixos-config="$NIXOSDIR/hosts/$HOSTNAME/configuration.nix" \ nixos-config="$NIXOSDIR/hosts/$HOSTNAME/configuration.nix" \
|& nom |& nom

View File

@ -11,18 +11,17 @@ let
(builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") { (builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") {
config = config.nixpkgs.config; config = config.nixpkgs.config;
}; };
jawzManageLibrary = pkgs.writeScriptBin jawzManageLibrary = pkgs.writeScriptBin "manage-library"
"manage-library" (builtins.readFile ../scripts/manage-library.sh); (builtins.readFile ../scripts/manage-library.sh);
jawzTasks = pkgs.writeScriptBin jawzTasks =
"tasks" (builtins.readFile ../scripts/tasks.sh); pkgs.writeScriptBin "tasks" (builtins.readFile ../scripts/tasks.sh);
jawzSubs = pkgs.writeScriptBin jawzSubs =
"sub-sync" (builtins.readFile ../scripts/sub-sync.sh); pkgs.writeScriptBin "sub-sync" (builtins.readFile ../scripts/sub-sync.sh);
jawzStream = pkgs.writeScriptBin jawzStream =
"stream-dl" (builtins.readFile ../scripts/stream-dl.sh); pkgs.writeScriptBin "stream-dl" (builtins.readFile ../scripts/stream-dl.sh);
in in { # Remember to close this bracket at the end of the document
{ # Remember to close this bracket at the end of the document
imports = [ imports = [
./fstab.nix ./fstab.nix
./servers.nix ./servers.nix
./docker.nix ./docker.nix
@ -30,10 +29,10 @@ imports = [
# ./openldap.nix # ./openldap.nix
# <agenix/modules/age.nix> # <agenix/modules/age.nix>
(import "${home-manager}/nixos") (import "${home-manager}/nixos")
]; ];
powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
networking = { networking = {
useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true;
enableIPv6 = false; enableIPv6 = false;
hostName = "miniserver"; hostName = "miniserver";
@ -49,8 +48,7 @@ networking = {
2049 # nfs 2049 # nfs
]; ];
open_firewall_port_ranges = [ ]; open_firewall_port_ranges = [ ];
in in {
{
enable = true; enable = true;
allowPing = true; allowPing = true;
allowedTCPPorts = open_firewall_ports; allowedTCPPorts = open_firewall_ports;
@ -58,26 +56,25 @@ networking = {
allowedTCPPortRanges = open_firewall_port_ranges; allowedTCPPortRanges = open_firewall_port_ranges;
allowedUDPPortRanges = open_firewall_port_ranges; allowedUDPPortRanges = open_firewall_port_ranges;
}; };
};
time.timeZone = "America/Mexico_City";
i18n = {
defaultLocale = "en_CA.UTF-8";
extraLocaleSettings = {
LC_MONETARY = "es_MX.UTF-8";
}; };
};
console = { time.timeZone = "America/Mexico_City";
i18n = {
defaultLocale = "en_CA.UTF-8";
extraLocaleSettings = { LC_MONETARY = "es_MX.UTF-8"; };
};
console = {
font = "Lat2-Terminus16"; font = "Lat2-Terminus16";
keyMap = "us"; keyMap = "us";
# useXkbConfig = true; # use xkbOptions in tty. # useXkbConfig = true; # use xkbOptions in tty.
}; };
system = { system = {
copySystemConfiguration = true; copySystemConfiguration = true;
stateVersion = "${version}"; stateVersion = "${version}";
}; };
nix = let featuresList = [ nix = let
featuresList = [
"nixos-test" "nixos-test"
"benchmark" "benchmark"
"big-parallel" "big-parallel"
@ -85,20 +82,19 @@ nix = let featuresList = [
"gccarch-${cpuArchitecture}" "gccarch-${cpuArchitecture}"
"gccarch-znver3" "gccarch-znver3"
]; ];
in in {
{
gc = { gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
}; };
buildMachines = [ { buildMachines = [{
hostName = "workstation"; hostName = "workstation";
system = "x86_64-linux"; system = "x86_64-linux";
sshUser = "nixremote"; sshUser = "nixremote";
maxJobs = 14; maxJobs = 14;
speedFactor = 1; speedFactor = 1;
supportedFeatures = featuresList; supportedFeatures = featuresList;
} ]; }];
distributedBuilds = true; distributedBuilds = true;
settings = { settings = {
cores = 3; cores = 3;
@ -118,9 +114,9 @@ nix = let featuresList = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
]; ];
}; };
}; };
security = { security = {
acme = { acme = {
acceptTerms = true; acceptTerms = true;
defaults.email = myEmail; defaults.email = myEmail;
@ -136,24 +132,22 @@ security = {
item = "nofile"; item = "nofile";
value = "8192"; value = "8192";
}]; }];
}; };
nixpkgs = { nixpkgs = {
hostPlatform = lib.mkDefault "x86_64-linux"; hostPlatform = lib.mkDefault "x86_64-linux";
config = { config = {
allowUnfree = true; allowUnfree = true;
permittedInsecurePackages = [ permittedInsecurePackages = [ "openssl-1.1.1w" ];
"openssl-1.1.1w"
];
}; };
# localSystem = { # localSystem = {
# gcc.arch = cpuArchitecture; # gcc.arch = cpuArchitecture;
# gcc.tune = cpuArchitecture; # gcc.tune = cpuArchitecture;
# system = "x86_64-linux"; # system = "x86_64-linux";
# }; # };
}; };
users = { users = {
groups.nixremote = { groups.nixremote = {
name = "nixremote"; name = "nixremote";
gid = 555; gid = 555;
@ -168,17 +162,24 @@ users = {
"" ""
]; ];
}; };
}; };
users.users.jawz = { users.users.jawz = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker" extraGroups = [
"scanner" "lp" "piracy" "kavita" "wheel"
"render" "video" "networkmanager"
"docker"
"scanner"
"lp"
"piracy"
"kavita"
"render"
"video"
]; ];
initialPassword = "password"; initialPassword = "password";
openssh = { openssh = {
authorizedKeys.keys = [ authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacero\cdreyes@100CDREYES" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacerocdreyes@100CDREYES"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMkpeIV9G26W2/e9PsjBx3sNwPGoicJ807ExRGh4KjhW jawz@server" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMkpeIV9G26W2/e9PsjBx3sNwPGoicJ807ExRGh4KjhW jawz@server"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2wtsaMvfEUm//2YnFHyrc16o+TOXXBfIGPJ9nL8RMp jawz@workstation" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2wtsaMvfEUm//2YnFHyrc16o+TOXXBfIGPJ9nL8RMp jawz@workstation"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBEblxSDhWPEo33crSjooeUg4W02ruENxHLmmBqCuIo jawz@galaxy" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBEblxSDhWPEo33crSjooeUg4W02ruENxHLmmBqCuIo jawz@galaxy"
@ -186,54 +187,57 @@ users.users.jawz = {
]; ];
}; };
packages = (with pkgs; [ packages = (with pkgs; [
hunspell hunspell
hunspellDicts.it_IT hunspellDicts.it_IT
hunspellDicts.es_MX hunspellDicts.es_MX
hunspellDicts.en_CA hunspellDicts.en_CA
symbola symbola
unstable.yt-dlp # downloads videos from most video websites unstable.yt-dlp # downloads videos from most video websites
unstable.gallery-dl # similar to yt-dlp but for most image gallery websites unstable.gallery-dl # similar to yt-dlp but for most image gallery websites
fd # modern find, faster searches fd # modern find, faster searches
fzf # fuzzy finder! super cool and useful fzf # fuzzy finder! super cool and useful
gdu # disk-space utility, somewhat useful gdu # disk-space utility, somewhat useful
du-dust # rusty du du-dust # rusty du
trash-cli # oop! didn't meant to delete that trash-cli # oop! didn't meant to delete that
eza # like ls but with colors eza # like ls but with colors
rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS
smartmontools # check hard drie health smartmontools # check hard drie health
jawzManageLibrary jawzManageLibrary
jawzTasks jawzTasks
jawzSubs jawzSubs
jawzStream jawzStream
(writeScriptBin "ffmpeg4discord" (builtins.readFile ../scripts/ffmpeg4discord.py)) (writeScriptBin "ffmpeg4discord"
(writeScriptBin "ffmpreg" (builtins.readFile ../scripts/ffmpreg.sh)) (builtins.readFile ../scripts/ffmpeg4discord.py))
(writeScriptBin "split-dir" (builtins.readFile ../scripts/split-dir.sh)) (writeScriptBin "ffmpreg" (builtins.readFile ../scripts/ffmpreg.sh))
(writeScriptBin "pika-list" (builtins.readFile ../scripts/pika-list.sh)) (writeScriptBin "split-dir" (builtins.readFile ../scripts/split-dir.sh))
(writeScriptBin "run" (builtins.readFile ../scripts/run.sh)) (writeScriptBin "pika-list" (builtins.readFile ../scripts/pika-list.sh))
(writeScriptBin "find-dup-episodes" (builtins.readFile ../scripts/find-dup-episodes.sh)) (writeScriptBin "run" (builtins.readFile ../scripts/run.sh))
(writeScriptBin "find-dup-episodes"
(builtins.readFile ../scripts/find-dup-episodes.sh))
tldr # man for retards tldr # man for retards
# SH # SH
bats # testing system, required by Exercism bats # testing system, required by Exercism
bashdb # autocomplete bashdb # autocomplete
shellcheck # linting shellcheck # linting
shfmt # a shell parser and formatter shfmt # a shell parser and formatter
# NIX # NIX
expect # keep color when nom'ing expect # keep color when nom'ing
nix-output-monitor # autistic nix builds nix-output-monitor # autistic nix builds
nixfmt # linting nixfmt # linting
cachix # why spend time compiling? cachix # why spend time compiling?
# PYTHON. # PYTHON.
(python3.withPackages (ps: with ps; [ (python3.withPackages (ps:
with ps; [
flake8 # wraper for pyflakes, pycodestyle and mccabe flake8 # wraper for pyflakes, pycodestyle and mccabe
isort # sort Python imports isort # sort Python imports
nose # testing and running python scripts nose # testing and running python scripts
@ -243,19 +247,18 @@ cachix # why spend time compiling?
editorconfig # follow rules of contributin editorconfig # follow rules of contributin
black # Python code formatter black # Python code formatter
pylint # bug and style checker for python pylint # bug and style checker for python
])) # base language ])) # base language
]) ++ (with pkgs.python3Packages; [ ]) ++ (with pkgs.python3Packages; [
(buildPythonApplication rec { (buildPythonApplication rec {
pname = "download"; pname = "download";
version = "1.5"; version = "1.5";
src = ../scripts/download/.; src = ../scripts/download/.;
doCheck = false; doCheck = false;
buildInputs = [ setuptools ]; buildInputs = [ setuptools ];
propagatedBuildInputs = propagatedBuildInputs = [ pyyaml types-pyyaml ];
[ pyyaml types-pyyaml ]; })
}) (buildPythonApplication rec {
(buildPythonApplication rec {
pname = "ffpb"; pname = "ffpb";
version = "0.4.1"; version = "0.4.1";
src = fetchPypi { src = fetchPypi {
@ -264,23 +267,22 @@ cachix # why spend time compiling?
}; };
doCheck = false; doCheck = false;
buildInputs = [ setuptools ]; buildInputs = [ setuptools ];
propagatedBuildInputs = propagatedBuildInputs = [ tqdm ];
[ tqdm ]; })
}) # (buildPythonApplication rec {
# (buildPythonApplication rec { # pname = "qbit_manage";
# pname = "qbit_manage"; # version = "4.0.3";
# version = "4.0.3"; # src = fetchPypi {
# src = fetchPypi { # inherit pname version;
# inherit pname version; # sha256 = "sha256-7eVqbLpMHS1sBw2vYS4cTtyVdnnknGtEI8190VlXflk=";
# sha256 = "sha256-7eVqbLpMHS1sBw2vYS4cTtyVdnnknGtEI8190VlXflk="; # };
# }; # doCheck = true;
# doCheck = true; # buildInputs = [ setuptools ];
# buildInputs = [ setuptools ]; # propagatedBuildInputs =
# propagatedBuildInputs = # [ gitpython requests retrying ruamel-yaml schedule unstable.qbittorrent-api ];
# [ gitpython requests retrying ruamel-yaml schedule unstable.qbittorrent-api ]; # })
# })
]) ++ (with pkgs.nodePackages; [ ]) ++ (with pkgs.nodePackages; [
# Language servers # Language servers
dockerfile-language-server-nodejs dockerfile-language-server-nodejs
yaml-language-server yaml-language-server
@ -292,15 +294,16 @@ cachix # why spend time compiling?
prettier # Linter prettier # Linter
pnpm # Package manager pnpm # Package manager
]); }; # <--- end of package list ]);
}; # <--- end of package list
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
users.jawz = { config, pkgs, ... }:{ users.jawz = { config, pkgs, ... }: {
home.stateVersion = "${version}"; home.stateVersion = "${version}";
programs.bash = { programs.bash = {
enable = true; enable = true;
historyFile = "\${XDG_STATE_HOME}/bash/history"; historyFile = "\${XDG_STATE_HOME}/bash/history";
historyControl = [ "erasedups" "ignorespace" ]; historyControl = [ "erasedups" "ignorespace" ];
@ -308,11 +311,12 @@ programs.bash = {
hh = "hstr"; hh = "hstr";
ls = "eza --icons --group-directories-first"; ls = "eza --icons --group-directories-first";
edit = "emacsclient -t"; edit = "emacsclient -t";
comic = "download -u jawz -i \"$(cat $LC | fzf --multi --exact -i)\""; comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"'';
gallery = "download -u jawz -i \"$(cat $LW | fzf --multi --exact -i)\""; gallery =
''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
cp = "cp -i"; cp = "cp -i";
mv = "mv -i"; mv = "mv -i";
mkcd = "mkdir -pv \"$1\" && cd \"$1\" || exit"; mkcd = ''mkdir -pv "$1" && cd "$1" || exit'';
mkdir = "mkdir -p"; mkdir = "mkdir -p";
rm = "trash"; rm = "trash";
".." = "cd .."; ".." = "cd ..";
@ -326,11 +330,13 @@ programs.bash = {
f = "fzf --multi --exact -i"; f = "fzf --multi --exact -i";
sc = "systemctl --user"; sc = "systemctl --user";
jc = "journalctl --user -xefu"; jc = "journalctl --user -xefu";
open-gallery = "cd /mnt/pool/scrapping/JawZ/gallery-dl && open-gallery = ''
xdg-open $(fd . ./ Husbands -tdirectory -d 1 | fzf -i)\""; cd /mnt/pool/scrapping/JawZ/gallery-dl &&
unique-extensions = "fd -tf | rev | cut -d. -f1 | rev | xdg-open $(fd . ./ Husbands -tdirectory -d 1 | fzf -i)"'';
unique-extensions = ''
fd -tf | rev | cut -d. -f1 | rev |
tr '[:upper:]' '[:lower:]' | sort | tr '[:upper:]' '[:lower:]' | sort |
uniq --count | sort -rn"; uniq --count | sort -rn'';
}; };
enableVteIntegration = true; enableVteIntegration = true;
initExtra = '' initExtra = ''
@ -352,9 +358,9 @@ programs.bash = {
sudo unbuffer nixos-rebuild switch -I nixos-config=/home/jawz/Development/NixOS/miniserver/configuration.nix |& nom sudo unbuffer nixos-rebuild switch -I nixos-config=/home/jawz/Development/NixOS/miniserver/configuration.nix |& nom
} }
''; '';
}; };
xdg = { xdg = {
enable = true; enable = true;
userDirs = { userDirs = {
enable = true; enable = true;
@ -369,19 +375,18 @@ xdg = {
}; };
configFile = { configFile = {
"wgetrc".source = ../dotfiles/wget/wgetrc; "wgetrc".source = ../dotfiles/wget/wgetrc;
"configstore/update-notifier-npm-check.json".source = ../dotfiles/npm/update-notifier-npm-check.json; "configstore/update-notifier-npm-check.json".source =
../dotfiles/npm/update-notifier-npm-check.json;
"npm/npmrc".source = ../dotfiles/npm/npmrc; "npm/npmrc".source = ../dotfiles/npm/npmrc;
"gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json; "gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json;
"htop/htoprc".source = ../dotfiles/htop/htoprc; "htop/htoprc".source = ../dotfiles/htop/htoprc;
"python/pythonrc".source = ../dotfiles/pythonrc; "python/pythonrc".source = ../dotfiles/pythonrc;
"unpackerr.conf".source = ../dotfiles/unpackerr.conf; "unpackerr.conf".source = ../dotfiles/unpackerr.conf;
}; };
};
programs = {
helix = {
enable = true;
}; };
programs = {
helix = { enable = true; };
hstr.enable = true; hstr.enable = true;
emacs.enable = true; emacs.enable = true;
direnv = { direnv = {
@ -413,9 +418,9 @@ programs = {
enable = true; enable = true;
package = pkgs.htop-vim; package = pkgs.htop-vim;
}; };
}; };
services = { services = {
lorri.enable = true; lorri.enable = true;
emacs = { emacs = {
enable = true; enable = true;
@ -423,11 +428,12 @@ services = {
package = pkgs.emacs; package = pkgs.emacs;
startWithUserSession = "graphical"; startWithUserSession = "graphical";
}; };
}; };
}; }; };
};
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
wget wget
jellyfin-ffmpeg # coolest video converter! jellyfin-ffmpeg # coolest video converter!
@ -453,11 +459,11 @@ environment = {
GOPATH = "${XDG_DATA_HOME}/go"; GOPATH = "${XDG_DATA_HOME}/go";
NPM_CONFIG_USERCONFIG = "${XDG_CONFIG_HOME}/npm/npmrc"; NPM_CONFIG_USERCONFIG = "${XDG_CONFIG_HOME}/npm/npmrc";
PNPM_HOME = "${XDG_DATA_HOME}/pnpm"; PNPM_HOME = "${XDG_DATA_HOME}/pnpm";
PSQL_HISTORY="${XDG_DATA_HOME}/psql_history"; PSQL_HISTORY = "${XDG_DATA_HOME}/psql_history";
REDISCLI_HISTFILE="${XDG_DATA_HOME}/redis/rediscli_history"; REDISCLI_HISTFILE = "${XDG_DATA_HOME}/redis/rediscli_history";
WINEPREFIX="${XDG_DATA_HOME}/wine"; WINEPREFIX = "${XDG_DATA_HOME}/wine";
PYTHONSTARTUP="${XDG_CONFIG_HOME}/python/pythonrc"; PYTHONSTARTUP = "${XDG_CONFIG_HOME}/python/pythonrc";
STACK_ROOT="${XDG_DATA_HOME}/stack"; STACK_ROOT = "${XDG_DATA_HOME}/stack";
# OPTIONS # OPTIONS
HISTFILE = "${XDG_STATE_HOME}/bash/history"; HISTFILE = "${XDG_STATE_HOME}/bash/history";
@ -469,7 +475,7 @@ environment = {
WGETRC = "${XDG_CONFIG_HOME}/wgetrc"; WGETRC = "${XDG_CONFIG_HOME}/wgetrc";
XCOMPOSECACHE = "${XDG_CACHE_HOME}/X11/xcompose"; XCOMPOSECACHE = "${XDG_CACHE_HOME}/X11/xcompose";
"_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=${XDG_CONFIG_HOME}/java"; "_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=${XDG_CONFIG_HOME}/java";
DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"; DOCKER_CONFIG = "${XDG_CONFIG_HOME}/docker";
# NVIDIA # NVIDIA
CUDA_CACHE_PATH = "${XDG_CACHE_HOME}/nv"; CUDA_CACHE_PATH = "${XDG_CACHE_HOME}/nv";
@ -491,9 +497,9 @@ environment = {
# EXTRA_LDFLAGS = "-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib"; # EXTRA_LDFLAGS = "-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib";
# EXTRA_CCFLAGS = "-I/usr/include"; # EXTRA_CCFLAGS = "-I/usr/include";
}; };
}; };
programs = { programs = {
starship.enable = true; starship.enable = true;
tmux.enable = true; tmux.enable = true;
fzf.fuzzyCompletion = true; fzf.fuzzyCompletion = true;
@ -505,9 +511,9 @@ programs = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
}; };
}; };
services = { services = {
# minidlna = { # minidlna = {
# enable = true; # enable = true;
# openFirewall = true; # openFirewall = true;
@ -526,10 +532,7 @@ services = {
smartd.enable = true; smartd.enable = true;
btrfs.autoScrub = { btrfs.autoScrub = {
enable = true; enable = true;
fileSystems = [ fileSystems = [ "/" "/mnt/pool" ];
"/"
"/mnt/pool"
];
}; };
openssh = { openssh = {
enable = true; enable = true;
@ -540,16 +543,17 @@ services = {
KbdInteractiveAuthentication = false; KbdInteractiveAuthentication = false;
}; };
}; };
}; };
systemd = { systemd = {
packages = let packages = let
pkgs = import (builtins.fetchTarball { pkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/9957cd48326fe8dbd52fdc50dd2502307f188b0d.tar.gz"; url =
}) {}; "https://github.com/NixOS/nixpkgs/archive/9957cd48326fe8dbd52fdc50dd2502307f188b0d.tar.gz";
}) { };
myPkg = pkgs.qbittorrent-nox; myPkg = pkgs.qbittorrent-nox;
in [ myPkg ]; in [ myPkg ];
services = { services = {
"qbittorrent-nox@jawz" = { "qbittorrent-nox@jawz" = {
enable = true; enable = true;
@ -557,18 +561,14 @@ in [ myPkg ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
}; };
}; };
timers = { timers = { };
};
user = { user = {
services = { services = {
"stream@" = { "stream@" = {
description = "monitors a stream channel for online streams."; description = "monitors a stream channel for online streams.";
restartIfChanged = true; restartIfChanged = true;
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ path = [ pkgs.nix jawzStream ];
pkgs.nix
jawzStream
];
serviceConfig = { serviceConfig = {
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 30; RestartSec = 30;
@ -591,10 +591,7 @@ in [ myPkg ];
restartIfChanged = true; restartIfChanged = true;
description = "Run the manage library bash script"; description = "Run the manage library bash script";
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ path = [ pkgs.nix jawzManageLibrary ];
pkgs.nix
jawzManageLibrary
];
serviceConfig = { serviceConfig = {
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 30; RestartSec = 30;
@ -603,30 +600,27 @@ in [ myPkg ];
}; };
tasks = { tasks = {
restartIfChanged = true; restartIfChanged = true;
description = "Run a tasks script which keeps a lot of things organized"; description =
"Run a tasks script which keeps a lot of things organized";
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ path = [ pkgs.nix jawzTasks ];
pkgs.nix
jawzTasks
];
serviceConfig = { serviceConfig = {
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 30; RestartSec = 30;
ExecStart = "${jawzTasks}/bin/tasks"; ExecStart = "${jawzTasks}/bin/tasks";
}; };
}; };
qbit_manage = let qbit_dir = "/home/jawz/Development/Git/qbit_manage"; in { qbit_manage = let qbit_dir = "/home/jawz/Development/Git/qbit_manage";
in {
restartIfChanged = true; restartIfChanged = true;
description = "Tidy up my torrents"; description = "Tidy up my torrents";
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ path = [ pkgs.python3 pkgs.pipenv ];
pkgs.python3
pkgs.pipenv
];
serviceConfig = { serviceConfig = {
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 30; RestartSec = 30;
ExecStart = "${qbit_dir}/venv/bin/python3 ${qbit_dir}/qbit_manage.py -r -c ${qbit_dir}/config.yml"; ExecStart =
"${qbit_dir}/venv/bin/python3 ${qbit_dir}/qbit_manage.py -r -c ${qbit_dir}/config.yml";
}; };
}; };
}; };
@ -649,41 +643,36 @@ in [ myPkg ];
"stream@tomayto\\x20picarto" = streamTimer // { }; "stream@tomayto\\x20picarto" = streamTimer // { };
tasks = { tasks = {
enable = true; enable = true;
description = "Run a tasks script which keeps a lot of things organized"; description =
"Run a tasks script which keeps a lot of things organized";
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = { OnCalendar = "*:0/10"; };
OnCalendar = "*:0/10";
};
}; };
manage-library = { manage-library = {
enable = true; enable = true;
description = "Run the manage library bash script"; description = "Run the manage library bash script";
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = { OnCalendar = "00:30"; };
OnCalendar = "00:30";
};
}; };
qbit_manage = { qbit_manage = {
enable = true; enable = true;
description = "Tidy up my torrents"; description = "Tidy up my torrents";
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = { OnCalendar = "*:0/10"; };
OnCalendar = "*:0/10";
}; };
}; };
}; };
}; };
};
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
hardware = { hardware = {
cpu.intel.updateMicrocode = lib.mkDefault true; cpu.intel.updateMicrocode = lib.mkDefault true;
opengl = { opengl = {
enable = true; enable = true;
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
}; };
}; };
} }

View File

@ -11,18 +11,17 @@ let
(builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") { (builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") {
config = config.nixpkgs.config; config = config.nixpkgs.config;
}; };
jawzManageLibrary = pkgs.writeScriptBin jawzManageLibrary = pkgs.writeScriptBin "manage-library"
"manage-library" (builtins.readFile ../scripts/manage-library.sh); (builtins.readFile ../scripts/manage-library.sh);
jawzTasks = pkgs.writeScriptBin jawzTasks =
"tasks" (builtins.readFile ../scripts/tasks.sh); pkgs.writeScriptBin "tasks" (builtins.readFile ../scripts/tasks.sh);
jawzSubs = pkgs.writeScriptBin jawzSubs =
"sub-sync" (builtins.readFile ../scripts/sub-sync.sh); pkgs.writeScriptBin "sub-sync" (builtins.readFile ../scripts/sub-sync.sh);
jawzStream = pkgs.writeScriptBin jawzStream =
"stream-dl" (builtins.readFile ../scripts/stream-dl.sh); pkgs.writeScriptBin "stream-dl" (builtins.readFile ../scripts/stream-dl.sh);
in in { # Remember to close this bracket at the end of the document
{ # Remember to close this bracket at the end of the document
imports = [ imports = [
./fstab.nix ./fstab.nix
./servers.nix ./servers.nix
./docker.nix ./docker.nix
@ -30,10 +29,10 @@ imports = [
# ./openldap.nix # ./openldap.nix
# <agenix/modules/age.nix> # <agenix/modules/age.nix>
(import "${home-manager}/nixos") (import "${home-manager}/nixos")
]; ];
powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
networking = { networking = {
useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true;
enableIPv6 = false; enableIPv6 = false;
hostName = "server"; hostName = "server";
@ -50,8 +49,7 @@ networking = {
2049 # nfs 2049 # nfs
]; ];
open_firewall_port_ranges = [ ]; open_firewall_port_ranges = [ ];
in in {
{
enable = true; enable = true;
allowPing = true; allowPing = true;
allowedTCPPorts = open_firewall_ports; allowedTCPPorts = open_firewall_ports;
@ -59,26 +57,25 @@ networking = {
allowedTCPPortRanges = open_firewall_port_ranges; allowedTCPPortRanges = open_firewall_port_ranges;
allowedUDPPortRanges = open_firewall_port_ranges; allowedUDPPortRanges = open_firewall_port_ranges;
}; };
};
time.timeZone = "America/Mexico_City";
i18n = {
defaultLocale = "en_CA.UTF-8";
extraLocaleSettings = {
LC_MONETARY = "es_MX.UTF-8";
}; };
};
console = { time.timeZone = "America/Mexico_City";
i18n = {
defaultLocale = "en_CA.UTF-8";
extraLocaleSettings = { LC_MONETARY = "es_MX.UTF-8"; };
};
console = {
font = "Lat2-Terminus16"; font = "Lat2-Terminus16";
keyMap = "us"; keyMap = "us";
# useXkbConfig = true; # use xkbOptions in tty. # useXkbConfig = true; # use xkbOptions in tty.
}; };
system = { system = {
copySystemConfiguration = true; copySystemConfiguration = true;
stateVersion = "${version}"; stateVersion = "${version}";
}; };
nix = let featuresList = [ nix = let
featuresList = [
"nixos-test" "nixos-test"
"benchmark" "benchmark"
"big-parallel" "big-parallel"
@ -86,20 +83,19 @@ nix = let featuresList = [
"gccarch-${cpuArchitecture}" "gccarch-${cpuArchitecture}"
"gccarch-znver3" "gccarch-znver3"
]; ];
in in {
{
gc = { gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
}; };
buildMachines = [ { buildMachines = [{
hostName = "workstation"; hostName = "workstation";
system = "x86_64-linux"; system = "x86_64-linux";
sshUser = "nixremote"; sshUser = "nixremote";
maxJobs = 14; maxJobs = 14;
speedFactor = 1; speedFactor = 1;
supportedFeatures = featuresList; supportedFeatures = featuresList;
} ]; }];
distributedBuilds = true; distributedBuilds = true;
settings = { settings = {
cores = 6; cores = 6;
@ -119,9 +115,9 @@ nix = let featuresList = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
]; ];
}; };
}; };
security = { security = {
acme = { acme = {
acceptTerms = true; acceptTerms = true;
defaults.email = myEmail; defaults.email = myEmail;
@ -137,24 +133,22 @@ security = {
item = "nofile"; item = "nofile";
value = "8192"; value = "8192";
}]; }];
}; };
nixpkgs = { nixpkgs = {
hostPlatform = lib.mkDefault "x86_64-linux"; hostPlatform = lib.mkDefault "x86_64-linux";
config = { config = {
allowUnfree = true; allowUnfree = true;
permittedInsecurePackages = [ permittedInsecurePackages = [ "openssl-1.1.1w" ];
"openssl-1.1.1w"
];
}; };
# localSystem = { # localSystem = {
# gcc.arch = cpuArchitecture; # gcc.arch = cpuArchitecture;
# gcc.tune = cpuArchitecture; # gcc.tune = cpuArchitecture;
# system = "x86_64-linux"; # system = "x86_64-linux";
# }; # };
}; };
users = { users = {
groups.nixremote = { groups.nixremote = {
name = "nixremote"; name = "nixremote";
gid = 555; gid = 555;
@ -168,70 +162,80 @@ users = {
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICiyTwryzw8CblPldplDpVUkXD9C1fXVgO8LeXdE5cuR root@workstation" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICiyTwryzw8CblPldplDpVUkXD9C1fXVgO8LeXdE5cuR root@workstation"
]; ];
}; };
}; };
users.users.jawz = { users.users.jawz = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker" extraGroups = [
"scanner" "lp" "piracy" "kavita" "wheel"
"render" "video" "networkmanager"
"docker"
"scanner"
"lp"
"piracy"
"kavita"
"render"
"video"
]; ];
initialPassword = "password"; initialPassword = "password";
openssh = { openssh = {
authorizedKeys.keys = [ authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacero\cdreyes@100CDREYES" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacerocdreyes@100CDREYES"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2wtsaMvfEUm//2YnFHyrc16o+TOXXBfIGPJ9nL8RMp jawz@workstation" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2wtsaMvfEUm//2YnFHyrc16o+TOXXBfIGPJ9nL8RMp jawz@workstation"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBEblxSDhWPEo33crSjooeUg4W02ruENxHLmmBqCuIo jawz@galaxy" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBEblxSDhWPEo33crSjooeUg4W02ruENxHLmmBqCuIo jawz@galaxy"
]; ];
}; };
packages = (with pkgs; [ packages = (with pkgs; [
hunspell hunspell
hunspellDicts.it_IT hunspellDicts.it_IT
hunspellDicts.es_MX hunspellDicts.es_MX
hunspellDicts.en_CA hunspellDicts.en_CA
symbola symbola
unstable.yt-dlp # downloads videos from most video websites unstable.yt-dlp # downloads videos from most video websites
unstable.gallery-dl # similar to yt-dlp but for most image gallery websites unstable.gallery-dl # similar to yt-dlp but for most image gallery websites
fd # modern find, faster searches fd # modern find, faster searches
fzf # fuzzy finder! super cool and useful fzf # fuzzy finder! super cool and useful
gdu # disk-space utility, somewhat useful gdu # disk-space utility, somewhat useful
du-dust # rusty du du-dust # rusty du
trash-cli # oop! didn't meant to delete that trash-cli # oop! didn't meant to delete that
eza # like ls but with colors eza # like ls but with colors
rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS
smartmontools # check hard drie health smartmontools # check hard drie health
jawzManageLibrary jawzManageLibrary
jawzTasks jawzTasks
jawzSubs jawzSubs
jawzStream jawzStream
(writeScriptBin "ffmpeg4discord" (builtins.readFile ../scripts/ffmpeg4discord.py)) (writeScriptBin "ffmpeg4discord"
(writeScriptBin "ffmpreg" (builtins.readFile ../scripts/ffmpreg.sh)) (builtins.readFile ../scripts/ffmpeg4discord.py))
(writeScriptBin "split-dir" (builtins.readFile ../scripts/split-dir.sh)) (writeScriptBin "ffmpreg" (builtins.readFile ../scripts/ffmpreg.sh))
(writeScriptBin "pika-list" (builtins.readFile ../scripts/pika-list.sh)) (writeScriptBin "split-dir" (builtins.readFile ../scripts/split-dir.sh))
(writeScriptBin "run" (builtins.readFile ../scripts/run.sh)) (writeScriptBin "pika-list" (builtins.readFile ../scripts/pika-list.sh))
(writeScriptBin "find-dup-episodes" (builtins.readFile ../scripts/find-dup-episodes.sh)) (writeScriptBin "run" (builtins.readFile ../scripts/run.sh))
(writeScriptBin "find-dup-episodes"
(builtins.readFile ../scripts/find-dup-episodes.sh))
tldr # man for retards tldr # man for retards
# SH # SH
bats # testing system, required by Exercism bats # testing system, required by Exercism
bashdb # autocomplete bashdb # autocomplete
shellcheck # linting shellcheck # linting
shfmt # a shell parser and formatter shfmt # a shell parser and formatter
# NIX # NIX
expect # keep color when nom'ing expect # keep color when nom'ing
nix-output-monitor # autistic nix builds nix-output-monitor # autistic nix builds
nixfmt # linting nixfmt # linting
cachix # why spend time compiling? cachix # why spend time compiling?
# PYTHON. # PYTHON.
(python3.withPackages (ps: with ps; [ (python3.withPackages (ps:
with ps; [
flake8 # wraper for pyflakes, pycodestyle and mccabe flake8 # wraper for pyflakes, pycodestyle and mccabe
isort # sort Python imports isort # sort Python imports
nose # testing and running python scripts nose # testing and running python scripts
@ -241,19 +245,18 @@ cachix # why spend time compiling?
editorconfig # follow rules of contributin editorconfig # follow rules of contributin
black # Python code formatter black # Python code formatter
pylint # bug and style checker for python pylint # bug and style checker for python
])) # base language ])) # base language
]) ++ (with pkgs.python3Packages; [ ]) ++ (with pkgs.python3Packages; [
(buildPythonApplication rec { (buildPythonApplication rec {
pname = "download"; pname = "download";
version = "1.5"; version = "1.5";
src = ../scripts/download/.; src = ../scripts/download/.;
doCheck = false; doCheck = false;
buildInputs = [ setuptools ]; buildInputs = [ setuptools ];
propagatedBuildInputs = propagatedBuildInputs = [ pyyaml types-pyyaml ];
[ pyyaml types-pyyaml ]; })
}) (buildPythonApplication rec {
(buildPythonApplication rec {
pname = "ffpb"; pname = "ffpb";
version = "0.4.1"; version = "0.4.1";
src = fetchPypi { src = fetchPypi {
@ -262,23 +265,22 @@ cachix # why spend time compiling?
}; };
doCheck = false; doCheck = false;
buildInputs = [ setuptools ]; buildInputs = [ setuptools ];
propagatedBuildInputs = propagatedBuildInputs = [ tqdm ];
[ tqdm ]; })
}) # (buildPythonApplication rec {
# (buildPythonApplication rec { # pname = "qbit_manage";
# pname = "qbit_manage"; # version = "4.0.3";
# version = "4.0.3"; # src = fetchPypi {
# src = fetchPypi { # inherit pname version;
# inherit pname version; # sha256 = "sha256-7eVqbLpMHS1sBw2vYS4cTtyVdnnknGtEI8190VlXflk=";
# sha256 = "sha256-7eVqbLpMHS1sBw2vYS4cTtyVdnnknGtEI8190VlXflk="; # };
# }; # doCheck = true;
# doCheck = true; # buildInputs = [ setuptools ];
# buildInputs = [ setuptools ]; # propagatedBuildInputs =
# propagatedBuildInputs = # [ gitpython requests retrying ruamel-yaml schedule unstable.qbittorrent-api ];
# [ gitpython requests retrying ruamel-yaml schedule unstable.qbittorrent-api ]; # })
# })
]) ++ (with pkgs.nodePackages; [ ]) ++ (with pkgs.nodePackages; [
# Language servers # Language servers
dockerfile-language-server-nodejs dockerfile-language-server-nodejs
yaml-language-server yaml-language-server
@ -290,15 +292,16 @@ cachix # why spend time compiling?
prettier # Linter prettier # Linter
pnpm # Package manager pnpm # Package manager
]); }; # <--- end of package list ]);
}; # <--- end of package list
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
users.jawz = { config, pkgs, ... }:{ users.jawz = { config, pkgs, ... }: {
home.stateVersion = "${version}"; home.stateVersion = "${version}";
programs.bash = { programs.bash = {
enable = true; enable = true;
historyFile = "\${XDG_STATE_HOME}/bash/history"; historyFile = "\${XDG_STATE_HOME}/bash/history";
historyControl = [ "erasedups" "ignorespace" ]; historyControl = [ "erasedups" "ignorespace" ];
@ -306,11 +309,12 @@ programs.bash = {
hh = "hstr"; hh = "hstr";
ls = "eza --icons --group-directories-first"; ls = "eza --icons --group-directories-first";
edit = "emacsclient -t"; edit = "emacsclient -t";
comic = "download -u jawz -i \"$(cat $LC | fzf --multi --exact -i)\""; comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"'';
gallery = "download -u jawz -i \"$(cat $LW | fzf --multi --exact -i)\""; gallery =
''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
cp = "cp -i"; cp = "cp -i";
mv = "mv -i"; mv = "mv -i";
mkcd = "mkdir -pv \"$1\" && cd \"$1\" || exit"; mkcd = ''mkdir -pv "$1" && cd "$1" || exit'';
mkdir = "mkdir -p"; mkdir = "mkdir -p";
rm = "trash"; rm = "trash";
".." = "cd .."; ".." = "cd ..";
@ -324,11 +328,13 @@ programs.bash = {
f = "fzf --multi --exact -i"; f = "fzf --multi --exact -i";
sc = "systemctl --user"; sc = "systemctl --user";
jc = "journalctl --user -xefu"; jc = "journalctl --user -xefu";
open-gallery = "cd /mnt/pool/scrapping/JawZ/gallery-dl && open-gallery = ''
xdg-open $(fd . ./ Husbands -tdirectory -d 1 | fzf -i)\""; cd /mnt/pool/scrapping/JawZ/gallery-dl &&
unique-extensions = "fd -tf | rev | cut -d. -f1 | rev | xdg-open $(fd . ./ Husbands -tdirectory -d 1 | fzf -i)"'';
unique-extensions = ''
fd -tf | rev | cut -d. -f1 | rev |
tr '[:upper:]' '[:lower:]' | sort | tr '[:upper:]' '[:lower:]' | sort |
uniq --count | sort -rn"; uniq --count | sort -rn'';
}; };
enableVteIntegration = true; enableVteIntegration = true;
initExtra = '' initExtra = ''
@ -350,9 +356,9 @@ programs.bash = {
sudo unbuffer nixos-rebuild switch -I nixos-config=/home/jawz/Development/NixOS/server/configuration.nix |& nom sudo unbuffer nixos-rebuild switch -I nixos-config=/home/jawz/Development/NixOS/server/configuration.nix |& nom
} }
''; '';
}; };
xdg = { xdg = {
enable = true; enable = true;
userDirs = { userDirs = {
enable = true; enable = true;
@ -367,18 +373,17 @@ xdg = {
}; };
configFile = { configFile = {
"wgetrc".source = ../dotfiles/wget/wgetrc; "wgetrc".source = ../dotfiles/wget/wgetrc;
"configstore/update-notifier-npm-check.json".source = ../dotfiles/npm/update-notifier-npm-check.json; "configstore/update-notifier-npm-check.json".source =
../dotfiles/npm/update-notifier-npm-check.json;
"npm/npmrc".source = ../dotfiles/npm/npmrc; "npm/npmrc".source = ../dotfiles/npm/npmrc;
"gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json; "gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json;
"htop/htoprc".source = ../dotfiles/htop/htoprc; "htop/htoprc".source = ../dotfiles/htop/htoprc;
"python/pythonrc".source = ../dotfiles/pythonrc; "python/pythonrc".source = ../dotfiles/pythonrc;
}; };
};
programs = {
helix = {
enable = true;
}; };
programs = {
helix = { enable = true; };
hstr.enable = true; hstr.enable = true;
emacs.enable = true; emacs.enable = true;
direnv = { direnv = {
@ -410,9 +415,9 @@ programs = {
enable = true; enable = true;
package = pkgs.htop-vim; package = pkgs.htop-vim;
}; };
}; };
services = { services = {
lorri.enable = true; lorri.enable = true;
emacs = { emacs = {
enable = true; enable = true;
@ -420,11 +425,12 @@ services = {
package = pkgs.emacs; package = pkgs.emacs;
startWithUserSession = "graphical"; startWithUserSession = "graphical";
}; };
}; };
}; }; };
};
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
wget wget
jellyfin-ffmpeg # coolest video converter! jellyfin-ffmpeg # coolest video converter!
@ -450,11 +456,11 @@ environment = {
GOPATH = "${XDG_DATA_HOME}/go"; GOPATH = "${XDG_DATA_HOME}/go";
NPM_CONFIG_USERCONFIG = "${XDG_CONFIG_HOME}/npm/npmrc"; NPM_CONFIG_USERCONFIG = "${XDG_CONFIG_HOME}/npm/npmrc";
PNPM_HOME = "${XDG_DATA_HOME}/pnpm"; PNPM_HOME = "${XDG_DATA_HOME}/pnpm";
PSQL_HISTORY="${XDG_DATA_HOME}/psql_history"; PSQL_HISTORY = "${XDG_DATA_HOME}/psql_history";
REDISCLI_HISTFILE="${XDG_DATA_HOME}/redis/rediscli_history"; REDISCLI_HISTFILE = "${XDG_DATA_HOME}/redis/rediscli_history";
WINEPREFIX="${XDG_DATA_HOME}/wine"; WINEPREFIX = "${XDG_DATA_HOME}/wine";
PYTHONSTARTUP="${XDG_CONFIG_HOME}/python/pythonrc"; PYTHONSTARTUP = "${XDG_CONFIG_HOME}/python/pythonrc";
STACK_ROOT="${XDG_DATA_HOME}/stack"; STACK_ROOT = "${XDG_DATA_HOME}/stack";
# OPTIONS # OPTIONS
HISTFILE = "${XDG_STATE_HOME}/bash/history"; HISTFILE = "${XDG_STATE_HOME}/bash/history";
@ -466,7 +472,7 @@ environment = {
WGETRC = "${XDG_CONFIG_HOME}/wgetrc"; WGETRC = "${XDG_CONFIG_HOME}/wgetrc";
XCOMPOSECACHE = "${XDG_CACHE_HOME}/X11/xcompose"; XCOMPOSECACHE = "${XDG_CACHE_HOME}/X11/xcompose";
"_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=${XDG_CONFIG_HOME}/java"; "_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=${XDG_CONFIG_HOME}/java";
DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"; DOCKER_CONFIG = "${XDG_CONFIG_HOME}/docker";
# NVIDIA # NVIDIA
CUDA_CACHE_PATH = "${XDG_CACHE_HOME}/nv"; CUDA_CACHE_PATH = "${XDG_CACHE_HOME}/nv";
@ -488,9 +494,9 @@ environment = {
# EXTRA_LDFLAGS = "-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib"; # EXTRA_LDFLAGS = "-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib";
# EXTRA_CCFLAGS = "-I/usr/include"; # EXTRA_CCFLAGS = "-I/usr/include";
}; };
}; };
programs = { programs = {
starship.enable = true; starship.enable = true;
tmux.enable = true; tmux.enable = true;
fzf.fuzzyCompletion = true; fzf.fuzzyCompletion = true;
@ -502,17 +508,15 @@ programs = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
}; };
}; };
services = { services = {
minidlna = { minidlna = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
settings = { settings = {
inotify = "yes"; inotify = "yes";
media_dir = [ media_dir = [ "/mnt/pool/glue" ];
"/mnt/pool/glue"
];
}; };
}; };
avahi = { avahi = {
@ -523,10 +527,7 @@ services = {
smartd.enable = true; smartd.enable = true;
btrfs.autoScrub = { btrfs.autoScrub = {
enable = true; enable = true;
fileSystems = [ fileSystems = [ "/" "/mnt/pool" ];
"/"
"/mnt/pool"
];
}; };
openssh = { openssh = {
enable = true; enable = true;
@ -537,16 +538,17 @@ services = {
KbdInteractiveAuthentication = false; KbdInteractiveAuthentication = false;
}; };
}; };
}; };
systemd = { systemd = {
packages = let packages = let
pkgs = import (builtins.fetchTarball { pkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/9957cd48326fe8dbd52fdc50dd2502307f188b0d.tar.gz"; url =
}) {}; "https://github.com/NixOS/nixpkgs/archive/9957cd48326fe8dbd52fdc50dd2502307f188b0d.tar.gz";
}) { };
myPkg = pkgs.qbittorrent-nox; myPkg = pkgs.qbittorrent-nox;
in [ myPkg ]; in [ myPkg ];
services = { services = {
# "qbittorrent-nox@jawz" = { # "qbittorrent-nox@jawz" = {
# enable = true; # enable = true;
@ -587,10 +589,7 @@ in [ myPkg ];
description = "monitors a stream channel for online streams."; description = "monitors a stream channel for online streams.";
restartIfChanged = true; restartIfChanged = true;
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ path = [ pkgs.nix jawzStream ];
pkgs.nix
jawzStream
];
serviceConfig = { serviceConfig = {
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 30; RestartSec = 30;
@ -696,11 +695,11 @@ in [ myPkg ];
# }; # };
}; };
}; };
}; };
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
hardware = { hardware = {
nvidia = { nvidia = {
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = true; powerManagement.enable = true;
@ -711,6 +710,6 @@ hardware = {
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
}; };
}; };
} }

View File

@ -10,17 +10,31 @@ in {
./hardware-configuration.nix ./hardware-configuration.nix
../../base.nix ../../base.nix
../../gnome.nix ../../gnome.nix
../../jawz.nix
../../home-manager/default.nix ../../home-manager/default.nix
../../services/network.nix # ../../services/systemd-user/tasks.nix
../../services/nvidia.nix
../../services/printing.nix
../../services/sound.nix
../../services/systemd-user/tasks.nix
../../modules/apps.nix
../../modules/dev.nix
]; ];
myGaming.enable = true; my = {
apps = {
art.enable = true;
dictionaries.enable = true;
fonts.enable = true;
gaming.enable = true;
internet.enable = true;
office.enable = true;
};
dev = {
haskell.enable = true;
nix.enable = true;
python.enable = true;
gameDev.enable = true;
};
services = {
network.enable = true;
nvidia.enable = true;
printing.enable = true;
sound.enable = true;
};
};
networking = { networking = {
hostName = "workstation"; hostName = "workstation";
@ -66,7 +80,6 @@ in {
}; };
}; };
nixpkgs.overlays = [ (import ../../overlays/blanket.nix) ];
users = { users = {
groups.nixremote.gid = 555; groups.nixremote.gid = 555;
users = { users = {

View File

@ -1,83 +0,0 @@
{ inputs }:
let
myLib = (import ./default.nix) { inherit inputs; };
outputs = inputs.self.outputs;
in rec {
pkgsFor = sys: inputs.nixpkgs.legacyPackages.${sys};
# ========================== Buildables ========================== #
mkSystem = config:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs myLib; };
modules = [ config outputs.nixosModules.default ];
};
mkHome = sys: config:
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = pkgsFor sys;
extraSpecialArgs = { inherit inputs myLib outputs; };
modules = [ config outputs.homeManagerModules.default ];
};
# =========================== Functions ============================ #
filesIn = dir:
(map (fileName: dir + "/${fileName}")
(builtins.attrNames (builtins.readDir dir)));
dirsIn = dir:
inputs.nixpkgs.lib.filterAttrs (name: value: value == "directory")
(builtins.readDir dir);
fileNameOf = path: (builtins.head (builtins.split "\\." (baseNameOf path)));
# ========================== Extenders =========================== #
# Evaluates nixos/home-manager module and extends it's options / config
extendModule = { path, ... }@args:
{ pkgs, ... }@margs:
let
eval = if (builtins.isString path) || (builtins.isPath path) then
import path margs
else
path margs;
evalNoImports = builtins.removeAttrs eval [ "imports" "options" ];
extra = if (builtins.hasAttr "extraOptions" args)
|| (builtins.hasAttr "extraConfig" args) then
[
({ ... }: {
options = args.extraOptions or { };
config = args.extraConfig or { };
})
]
else
[ ];
in {
imports = (eval.imports or [ ]) ++ extra;
options = if builtins.hasAttr "optionsExtension" args then
(args.optionsExtension (eval.options or { }))
else
(eval.options or { });
config = if builtins.hasAttr "configExtension" args then
(args.configExtension (eval.config or evalNoImports))
else
(eval.config or evalNoImports);
};
# Applies extendModules to all modules
# modules can be defined in the same way
# as regular imports, or taken from "filesIn"
extendModules = extension: modules:
map (f:
let name = fileNameOf f;
in (extendModule ((extension name) // { path = f; }))) modules;
# ============================ Shell ============================= #
forAllSystems = pkgs:
inputs.nixpkgs.lib.genAttrs [ "x86_64-linux" ]
(system: pkgs inputs.nixpkgs.legacyPackages.${system});
}

View File

@ -9,11 +9,15 @@
./apps/internet.nix ./apps/internet.nix
./apps/office.nix ./apps/office.nix
]; ];
myArt.enable = lib.mkDefault false; my = {
myGameDev.enable = lib.mkDefault false; dev.gameDev.enable = lib.mkDefault false;
# myDictionaries.enable = lib.mkDefault false; apps = {
# myFonts.enable = lib.mkDefault false; art.enable = lib.mkDefault false;
myGaming.enable = lib.mkDefault false; dictionaries.enable = lib.mkDefault false;
# myInternet.enable = lib.mkDefault false; fonts.enable = lib.mkDefault false;
# myOffice.enable = lib.mkDefault false; gaming.enable = lib.mkDefault false;
internet.enable = lib.mkDefault false;
office.enable = lib.mkDefault false;
};
};
} }

View File

@ -1,11 +1,15 @@
{ config, pkgs, lib, unstable, ... }: { config, pkgs, lib, unstable, ... }:
let
{ unstable = import
options = { (builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") {
myArt.enable = lib.mkEnableOption "enable"; config = config.nixpkgs.config;
myGameDev.enable = lib.mkEnableOption "enable";
}; };
config = lib.mkIf config.myArt.enable { in {
options.my = {
apps.art.enable = lib.mkEnableOption "enable";
dev.gameDev.enable = lib.mkEnableOption "enable";
};
config = lib.mkIf config.my.apps.art.enable {
users.users.jawz.packages = with pkgs; users.users.jawz.packages = with pkgs;
([ ([
gimp # the coolest bestest art program to never exist gimp # the coolest bestest art program to never exist
@ -16,7 +20,7 @@
# drawpile # arty party with friends!! # drawpile # arty party with friends!!
pureref # create inspiration/reference boards pureref # create inspiration/reference boards
blender # cgi animation and sculpting blender # cgi animation and sculpting
]) ++ (if config.myGameDev.enable then [ ]) ++ (if config.my.dev.gameDev.enable then [
godot_4 # game development godot_4 # game development
unstable.gdtoolkit # gdscript language server unstable.gdtoolkit # gdscript language server
] else ] else

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, lib, unstable, ... }:
{ {
options.my.apps.dictionaries.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.apps.dictionaries.enable {
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; ([
hunspell hunspell
hunspellDicts.it_IT hunspellDicts.it_IT
@ -8,4 +10,5 @@
hunspellDicts.es_ES hunspellDicts.es_ES
hunspellDicts.en_CA-large hunspellDicts.en_CA-large
]); ]);
};
} }

View File

@ -1,10 +1,13 @@
{ config, pkgs, ... }: { config, pkgs, lib, unstable, ... }:
{ {
options.my.apps.fonts.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.apps.fonts.enable {
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; ([
(nerdfonts.override { (nerdfonts.override {
fonts = [ "CascadiaCode" "ComicShannsMono" "Iosevka" ]; fonts = [ "CascadiaCode" "ComicShannsMono" "Iosevka" ];
}) })
symbola symbola
]); ]);
};
} }

View File

@ -1,15 +1,13 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
options = { myGaming.enable = lib.mkEnableOption "enable"; }; options.my.apps.gaming.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.myGaming.enable { config = lib.mkIf config.my.apps.gaming.enable {
programs = { programs.steam = {
steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true;
}; };
};
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; ([
(lutris.override { (lutris.override {
extraPkgs = pkgs: [ extraPkgs = pkgs: [

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, lib, unstable, ... }:
{ {
options.my.apps.internet.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.apps.internet.enable {
programs = { programs = {
geary.enable = true; geary.enable = true;
firefox = { firefox = {
@ -24,4 +26,5 @@
}) })
# hugo # website engine # hugo # website engine
]); ]);
};
} }

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, lib, unstable, ... }:
{ {
options.my.apps.office.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.apps.office.enable {
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; ([
libreoffice # office, but based libreoffice # office, but based
calibre # ugly af eBook library manager calibre # ugly af eBook library manager
@ -10,4 +12,5 @@
# wike # gtk wikipedia wow! # wike # gtk wikipedia wow!
# denaro # manage your finances # denaro # manage your finances
]); ]);
};
} }

View File

@ -1,55 +0,0 @@
{ lib, config, inputs, outputs, myLib, pkgs, ... }:
let cfg = config.myNixOS;
in {
options.myNixOS.home-users = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule {
options = {
userConfig = lib.mkOption {
default = ./../../home-manager/work.nix;
example = "DP-1";
};
userSettings = lib.mkOption {
default = { };
example = "{}";
};
};
});
default = { };
};
config = {
programs.zsh.enable = true;
programs.hyprland.enable = cfg.sharedSettings.hyprland.enable;
services.xserver = lib.mkIf cfg.sharedSettings.hyprland.enable {
displayManager = { defaultSession = "hyprland"; };
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
inherit myLib;
outputs = inputs.self.outputs;
};
users = builtins.mapAttrs (name: user:
{ ... }: {
imports =
[ (import user.userConfig) outputs.homeManagerModules.default ];
}) (config.myNixOS.home-users);
};
users.users = builtins.mapAttrs (name: user:
{
isNormalUser = true;
initialPassword = "12345";
description = "";
shell = pkgs.zsh;
extraGroups = [ "libvirtd" "networkmanager" "wheel" ];
} // user.userSettings) (config.myNixOS.home-users);
};
}

View File

@ -2,7 +2,9 @@
{ {
imports = [ ./dev/haskell.nix ./dev/nix.nix ./dev/python.nix ]; imports = [ ./dev/haskell.nix ./dev/nix.nix ./dev/python.nix ];
myHaskell.enable = lib.mkDefault false; my.dev = {
myNix.enable = lib.mkDefault true; haskell.enable = lib.mkDefault false;
myPython.enable = lib.mkDefault false; nix.enable = lib.mkDefault false;
python.enable = lib.mkDefault false;
};
} }

View File

@ -1,8 +1,8 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
options = { myHaskell.enable = lib.mkEnableOption "enable"; }; options.my.dev.haskell.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.myHaskell.enable { config = lib.mkIf config.my.dev.haskell.enable {
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; ([
ghc # compiler ghc # compiler
haskell-language-server # lsp haskell-language-server # lsp

View File

@ -1,8 +1,8 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
options = { myNix.enable = lib.mkEnableOption "enable"; }; options.my.dev.nix.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.myNix.enable { config = lib.mkIf config.my.dev.nix.enable {
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; ([
expect # keep color when nom'ing expect # keep color when nom'ing
nix-output-monitor # autistic nix builds nix-output-monitor # autistic nix builds

View File

@ -1,8 +1,8 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
options = { myPython.enable = lib.mkEnableOption "enable"; }; options.my.dev.python.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.myPython.enable { config = lib.mkIf config.my.dev.python.enable {
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; ([
pipenv # python development workflow for humans pipenv # python development workflow for humans
(python3.withPackages (ps: (python3.withPackages (ps:

View File

@ -1,18 +0,0 @@
{
nix.settings = {
substituters = [
"https://nix-gaming.cachix.org"
"https://nixpkgs-python.cachix.org"
"https://devenv.cachix.org"
"https://cuda-maintainers.cachix.org"
"https://ai.cachix.org"
];
trusted-public-keys = [
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
"nixpkgs-python.cachix.org-1:hxjI7pFxTyuTHn2NkvWCrAUcNZLNS3ZAvfYNuYifcEU="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
"ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
];
};
}

16
modules/services.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
imports = [
./services/network.nix
./services/nvidia.nix
./services/printing.nix
./services/sound.nix
];
my.services = {
network.enable = lib.mkDefault false;
nvidia.enable = lib.mkDefault false;
printing.enable = lib.mkDefault false;
sound.enable = lib.mkDefault false;
};
}

View File

@ -1,47 +0,0 @@
{ config, pkgs, lib, ... }:
with lib; {
users.users.satisfactory = {
home = "/var/lib/satisfactory";
createHome = true;
isSystemUser = true;
group = "satisfactory";
};
users.groups.satisfactory = { };
# boot.kernel.sysctl."net.ipv6.conf.eth0.disable_ipv6" = true;
networking.enableIPv6 = false;
# nixpkgs.config.allowUnfree = true;
#
networking = {
firewall = {
allowedUDPPorts = [ 15777 15000 7777 27015 ];
allowedUDPPortRanges = [{
from = 27031;
to = 27036;
}];
allowedTCPPorts = [ 27015 27036 ];
};
};
# -beta experimental \
systemd.services.satisfactory = {
preStart = ''
${pkgs.steamcmd}/bin/steamcmd \
+force_install_dir /var/lib/satisfactory/SatisfactoryServer \
+login anonymous \
+app_update 1690800 \
validate \
+quit
'';
script = ''
${pkgs.steam-run}/bin/steam-run /var/lib/satisfactory/SatisfactoryServer/FactoryServer.sh -DisablePacketRouting
'';
serviceConfig = {
Nice = "-5";
Restart = "always";
User = "satisfactory";
WorkingDirectory = "/var/lib/satisfactory";
};
};
}

View File

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
{
options.my.services.network.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.services.network.enable {
networking = {
useDHCP = lib.mkDefault true;
enableIPv6 = false;
networkmanager.enable = true;
extraHosts = ''
192.168.1.64 workstation
192.168.1.69 server
192.168.1.100 miniserver
'';
firewall = { enable = true; };
};
};
}

View File

@ -0,0 +1,25 @@
{ config, pkgs, lib, ... }:
{
options.my.services.nvidia.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.services.nvidia.enable {
services.xserver.videoDrivers = [ "nvidia" ];
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
nvidia-vaapi-driver
vaapiVdpau
libvdpau-va-gl
];
};
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
};
};
};
}

View File

@ -0,0 +1,16 @@
{ config, pkgs, lib, ... }:
let printingDrivers = [ pkgs.hplip pkgs.hplipWithPlugin ];
in {
options.my.services.printing.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.services.printing.enable {
services.printing = {
enable = true;
drivers = printingDrivers;
};
hardware.sane = {
enable = true;
extraBackends = printingDrivers;
};
users.users.jawz.packages = [ pkgs.gnome.simple-scan ];
};
}

View File

@ -0,0 +1,27 @@
{ config, pkgs, lib, ... }:
# let
# nixGaming = import (builtins.fetchTarball
# "https://github.com/fufexan/nix-gaming/archive/master.tar.gz");
# in
{
imports = [
# nixGaming.nixosModules.pipewireLowLatency
];
options.my.services.sound.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.services.sound.enable {
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
sound.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# lowLatency = {
# enable = true;
# quantum = 64;
# rate = 48000;
# };
};
};
}

View File

@ -1,17 +0,0 @@
{ config, pkgs, lib, ... }:
{
networking = {
useDHCP = lib.mkDefault true;
enableIPv6 = false;
networkmanager.enable = true;
extraHosts = ''
192.168.1.64 workstation
192.168.1.69 server
192.168.1.100 miniserver
'';
firewall = {
enable = true;
};
};
}

View File

@ -1,22 +0,0 @@
{ config, lib, pkgs, ... }:
{
services.xserver.videoDrivers = [ "nvidia" ];
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
nvidia-vaapi-driver
vaapiVdpau
libvdpau-va-gl
];
};
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
};
};
}

View File

@ -1,13 +0,0 @@
{ config, lib, pkgs, ... }:
let printingDrivers = [ pkgs.hplip pkgs.hplipWithPlugin ];
in {
services.printing = {
enable = true;
drivers = printingDrivers;
};
hardware.sane = {
enable = true;
extraBackends = printingDrivers;
};
users.users.jawz.packages = [ pkgs.gnome.simple-scan ];
}

View File

@ -1,24 +0,0 @@
{ config, lib, pkgs, ... }:
# let
# nixGaming = import (builtins.fetchTarball
# "https://github.com/fufexan/nix-gaming/archive/master.tar.gz");
# in
{
imports = [
# nixGaming.nixosModules.pipewireLowLatency
];
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
sound.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# lowLatency = {
# enable = true;
# quantum = 64;
# rate = 48000;
# };
};
}