From f6f113b968510737b797371215179ef97a73e401 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sun, 17 Sep 2023 11:35:31 -0600 Subject: [PATCH] adjustments, mostly org rewrite, and some packages dsjlas sajdaslkj dsakd --- workstation/configuration.org | 58 ++++++++++++++--------------------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/workstation/configuration.org b/workstation/configuration.org index a624836..0f233e4 100755 --- a/workstation/configuration.org +++ b/workstation/configuration.org @@ -1,4 +1,4 @@ -#+TITLE: JawZ NixOS main Configuration +#+TITLE: JawZ NixOS workstation configuration #+AUTHOR: Danilo Reyes #+PROPERTY: header-args :tangle configuration.nix #+auto_tangle: t @@ -10,16 +10,6 @@ - [ ] Figure out how to get rid of xterm -* ABOUT -Setting up the document. Also this should allow me to set up variables, and -other functions. -- Global version number so NixOS and Home-Manager are in sync -- The unstable part allows me to build packages from the unstable channel by - prepending "unstable" to a package name. -- The next part creates a simple build of some of my simple scripts, turning - them into binaries which then I can integrate into the nix-store as well as - declared systemd units. - * DECLARATION Here I will declare the dependencies and variables that will be used multiple times through the config file, such as the current version of NixOS, @@ -27,6 +17,12 @@ repositories and even some scripts that will be reused on systemd configurations. ** VARIABLES +- Global version number so NixOS and Home-Manager are in sync +- The unstable part allows me to build packages from the unstable channel by + prepending "unstable" to a package name. +- The next part creates a simple build of some of my simple scripts, turning + them into binaries which then I can integrate into the nix-store as well as + declared systemd units. #+begin_src nix { config, pkgs, ... }: @@ -82,16 +78,12 @@ networking = { firewall = let open_firewall_ports = [ 6969 # HentaiAtHome - 25152 # ssh 51413 # torrent sedding 9091 # qbittorrent 2049 # nfs ]; - open_firewall_port_ranges = [ - { from = 1714; to = 1764; } # kdeconnect - ]; - in - { + open_firewall_port_ranges = [ ]; + in { enable = true; allowedTCPPorts = open_firewall_ports; allowedUDPPorts = open_firewall_ports; @@ -226,15 +218,11 @@ unstable.yt-dlp # downloads videos from most video websites unstable.gallery-dl # similar to yt-dlp but for most image gallery websites gdu # disk-space utility, somewhat useful du-dust # rusty du -gocryptfs # encrypted filesystem! shhh!!! exa # like ls but with colors trashy # oop! didn't meant to delete that rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS tldr # man for retards -vcsi # video thumbnails for torrents, can I replace it with ^? tree-sitter # code parsing, required by Doom emacs -torrenttools # create torrent files from the terminal! -lm_sensors # for extension, displays cpu temp #+end_src ** MY SCRIPTS @@ -305,9 +293,6 @@ main draws of Linux for me. "Ubuntu" "FiraCode" "Iosevka" ]; }) symbola -(papirus-icon-theme.override { - color = "adwaita"; -}) #+end_src ** PYTHON @@ -408,8 +393,8 @@ programs.bash = { edit = "emacsclient -t"; comic = "download -u jawz -i \"$(cat $LC | fzf --multi --exact -i)\""; gallery = "download -u jawz -i \"$(cat $LW | fzf --multi --exact -i)\""; - open_gallery = "cd /mnt/disk2/scrapping/JawZ/gallery-dl && xdg-open $(fd . ./ Husbands -tdirectory -d 1 | fzf -i)\""; - unique_extensions = "fd -tf | rev | cut -d. -f1 | rev | tr '[:upper:]' '[:lower:]' | sort | uniq --count | sort -rn"; + open-gallery = "cd /mnt/disk2/scrapping/JawZ/gallery-dl && xdg-open $(fd . ./ Husbands -tdirectory -d 1 | fzf -i)\""; + unique-extensions = "fd -tf | rev | cut -d. -f1 | rev | tr '[:upper:]' '[:lower:]' | sort | uniq --count | sort -rn"; cp = "cp -i"; mv = "mv -i"; mkcd = "mkdir -pv \"$1\" && cd \"$1\" || exit"; @@ -434,7 +419,7 @@ programs.bash = { #+begin_src bash $HOME/.local/bin/pokemon-colorscripts -r --no-title # Lists -list_root="${config.home.homeDirectory}"/.config/jawz/lists/jawz +list_root="${config.xdg.configHome}"/jawz/lists/jawz export LW=$list_root/watch.txt export LI=$list_root/instant.txt export LC=$list_root/comic.txt @@ -502,7 +487,7 @@ xdg = { download = "${config.home.homeDirectory}/Downloads"; music = "${config.home.homeDirectory}/Music"; pictures = "${config.home.homeDirectory}/Pictures"; - templates = "${config.home.homeDirectory}/.local/share/Templates"; + templates = "${config.xdg.dataHome}/Templates"; videos = "${config.home.homeDirectory}/Videos"; }; configFile = { @@ -578,7 +563,7 @@ environment.variables = rec { ELECTRUMDIR = "\${XDG_DATA_HOME}/electrum"; VISUAL = "emacsclient -ca emacs"; 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"; DOCKER_CONFIG="\${XDG_CONFIG_HOME}/docker"; @@ -589,7 +574,6 @@ environment.variables = rec { # "__GLX_VENDOR_LIBRARY_NAME" = "nvidia"; # Themes - # GTK_THEME = "Adwaita:light"; CALIBRE_USE_SYSTEM_THEME = "1"; PATH = [ @@ -692,8 +676,10 @@ services = { ]; }; }; - avahi.enable = true; - avahi.nssmdns = true; + avahi = { + enable = true; + nssmdns = true; + }; fstrim.enable = true; btrfs.autoScrub = { enable = true; @@ -703,9 +689,10 @@ services = { "/mnt/disk2" ]; }; - openssh = { + openssh = let sshPort = 25152; in { enable = true; - ports = [ 25152 ]; + ports = [ sshPort ]; + openFirewall = true; settings = { PasswordAuthentication = false; KbdInteractiveAuthentication = false; @@ -714,7 +701,7 @@ services = { listenAddresses = [ { addr = "0.0.0.0"; - port = 25152; + port = sshPort; } ]; }; @@ -875,6 +862,7 @@ services.nfs = { }; }; #+end_src + * FINAL SYSTEM CONFIGURATIONS The first setting creates a copy the NixOS configuration file and link it from the resulting system (/run/current-system/configuration.nix). This is useful in