From 16bff540f864dac32fb5a803c14f1fd04cd4ec7b Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Fri, 5 May 2023 21:47:14 -0600 Subject: [PATCH] settings for the NVME baremetal install --- configuration.nix | 1029 ++++++++++++++++++------------------ configuration.org | 106 ++-- hardware-configuration.nix | 56 +- 3 files changed, 631 insertions(+), 560 deletions(-) diff --git a/configuration.nix b/configuration.nix index fc5d648..b2257fc 100644 --- a/configuration.nix +++ b/configuration.nix @@ -3,565 +3,588 @@ let VERSION = "22.11"; # HOME-MANAGER = builtins.fetchTarball # "https://github.com/nix-community/home-manager/archive/master.tar.gz"; - UNSTABLE_TARBALL = builtins.fetchTarball - https://github.com/nixos/nixpkgs/tarball/master; - unstable = import UNSTABLE_TARBALL { - config = config.nixpkgs.config; + UNSTABLE_TARBALL = + builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master"; + unstable = import UNSTABLE_TARBALL { config = config.nixpkgs.config; }; +in { # Remember to close this bracket at the end of the document + + imports = [ ./hardware-configuration.nix ]; + + networking.hostName = "workstation"; + + # networking.wireless.enable = true; + networking.networkmanager.enable = true; + + time.timeZone = "America/Mexico_City"; + + i18n = { + defaultLocale = "en_CA.UTF-8"; + extraLocaleSettings = { LC_MONETARY = "es_MX.UTF-8"; }; }; -in -{ # Remember to close this bracket at the end of the document - -imports = [ - ./hardware-configuration.nix - -]; - -networking.hostName = "workstation"; - -# networking.wireless.enable = true; -networking.networkmanager.enable = true; - -time.timeZone = "America/Mexico_City"; - -i18n = { - defaultLocale = "en_CA.UTF-8"; - extraLocaleSettings = { - LC_MONETARY = "es_MX.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "us"; + # useXkbConfig = true; # use xkbOptions in tty. }; -}; -console = { - font = "Lat2-Terminus16"; - keyMap = "us"; - # useXkbConfig = true; # use xkbOptions in tty. -}; -services = { - xserver = { + services = { + xserver = { + enable = true; + videoDrivers = [ "nvidia" ]; + displayManager.gdm.enable = true; + desktopManager.gnome.enable = true; + # wacom.enable = true; + layout = "us"; + libinput.enable = true; # Wacom required? + }; + }; + + environment.gnome.excludePackages = (with pkgs; [ + gnome-photos + gnome-tour + gnome-text-editor + gnome-connections + # gnome-shell-extensions + baobab + ]) ++ (with pkgs.gnome; [ + # totem + gedit + gnome-music + epiphany + gnome-characters + yelp + simple-scan + gnome-font-viewer + ]); + + hardware.pulseaudio.enable = false; + sound.enable = false; + security.rtkit.enable = true; + services.pipewire = { enable = true; - videoDrivers = [ "nvidia" ]; - displayManager.gdm.enable = true; - desktopManager.gnome.enable = true; - layout = "us"; - libinput.enable = true; # Wacom required? + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; }; -}; -environment.gnome.excludePackages = (with pkgs; [ - gnome-photos - gnome-tour - gnome-text-editor - gnome-connections - baobab -]) -++ (with pkgs.gnome; [ - totem - gedit - gnome-music - epiphany - gnome-characters - yelp - simple-scan - gnome-font-viewer -]); + security.sudo = { + enable = true; + wheelNeedsPassword = false; + }; -hardware.pulseaudio.enable = false; -sound.enable = false; -security.rtkit.enable = true; -services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; -}; + # security.sudo.enable = false; + # security.doas.enable = true; + # security.doas.extraRules = [{ + # users = [ "jawz" ]; + # keepEnv = true; + # #persist = true; + # noPass = true; + # }]; -security.sudo = { - enable = true; - wheelNeedsPassword = false; -}; + nixpkgs.config = { allowUnfree = true; }; -# security.sudo.enable = false; -# security.doas.enable = true; -# security.doas.extraRules = [{ -# users = [ "jawz" ]; -# keepEnv = true; -# #persist = true; -# noPass = true; -# }]; + users.users.jawz = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" "docker" ]; + initialPassword = "password"; + shell = pkgs.fish; + packages = (with pkgs; [ -nixpkgs.config = { - allowUnfree = true; -}; + blender # cgi animation and sculpting + godot # game development + unstable.gdtoolkit # gdscript language server + krita # art to your heart desire! + drawpile # arty party with friends!! + mypaint # not the best art program + mypaint-brushes # but it's got some + mypaint-brushes1 # nice damn brushes + unstable.pureref # create inspiration/reference boards + unstable.gimp # the coolest bestest art program to never exist -users.users.jawz = { - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" "docker" ]; - initialPassword = "password"; - shell = pkgs.fish; - packages = (with pkgs; [ + lutris # game/emulator manager + # grapejuice # roblox manager + minecraft # minecraft official launcher + parsec-bin # remote gaming with friends + unstable.protonup-qt # update proton-ge -blender # cgi animation and sculpting -godot # game development -unstable.gdtoolkit # gdscript language server -krita # art to your heart desire! -drawpile # arty party with friends!! -mypaint # not the best art program -mypaint-brushes # but it's got some -mypaint-brushes1 # nice damn brushes -unstable.pureref # create inspiration/reference boards -unstable.gimp # the coolest bestest art program to never exist + libreoffice-fresh # office, but based + calibre # ugly af eBook library manager + foliate # gtk eBook reader + gnome.simple-scan # document scanner + gnome-feeds # feed reader, maybe will replace with nextcloud -lutris # game/emulator manager -# grapejuice # roblox manager -minecraft # minecraft official launcher -parsec-bin # remote gaming with friends -unstable.protonup-qt # update proton-ge + # sequeler # friendly SQL client + blanket # background noise + unstable.czkawka # duplicate finder + pika-backup # backups + # tilix # used to be my favourite terminal, but it's so outdated, that each time I use it less and less… + gnome-obfuscate # censor private information + metadata-cleaner # remove any metadata and geolocation from files + gnome-recipes # migrate these to mealie and delete + unstable.denaro # manage your finances + # unstable.celeste # sync tool for any cloud provider + # libgda # for pano shell extension -libreoffice-fresh # office, but based -calibre # ugly af eBook library manager -foliate # gtk eBook reader -gnome.simple-scan # document scanner -gnome-feeds # feed reader, maybe will replace with nextcloud + celluloid # video player + cozy # audiobooks player + gnome-podcasts # podcast player + handbrake # video converter, may be unnecessary + curtail # image compressor + pitivi # video editor + unstable.identity # compare images or videos + mousai # poor man shazam + tagger # tag music files + # bottles # wine prefix manager + obs-studio # screen recorder & streamer + shortwave # listen to world radio + nextcloud-client # teehee -# sequeler # friendly SQL client -blanket # background noise -unstable.czkawka # duplicate finder -pika-backup # backups -# tilix # used to be my favourite terminal, but it's so outdated, that each time I use it less and less… -gnome-obfuscate # censor private information -metadata-cleaner # remove any metadata and geolocation from files -gnome-recipes # migrate these to mealie and delete -unstable.denaro # manage your finances -# unstable.celeste # sync tool for any cloud provider + discord # chat + google-chrome # web browser with spyware included + firefox # web browser that allows to disable spyware + librewolf # no spyware web browser + tor-browser-bundle-bin # dark web, so dark! + # hugo # website engine + nicotine-plus # remember Ares? + warp # never used, but supposedly cool for sharing files + HentaiAtHome # uh-oh -celluloid # video player -cozy # audiobooks player -gnome-podcasts # podcast player -handbrake # video converter, may be unnecessary -curtail # image compressor -pitivi # video editor -unstable.identity # compare images or videos -mousai # poor man shazam -tagger # tag music files -# bottles # wine prefix manager -obs-studio # screen recorder & streamer -shortwave # listen to world radio + 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 + gocryptfs # encrypted filesystem! shhh!!! + exa # like ls but with colors + trash-cli # oop! didn't meant to delete that + ffmpeg_5 # coolest video converter! + neofetch # use once for brag, never again + rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS + tldr # man for retards + # ffmpegthumbnailer # create video thumbnails for nautilus, in absence of totem + vcsi # video thumbnails for torrents, can I replace it with ^? + mediainfo # technical info about videos, needed by some of my scripts + tree-sitter # code parsing, required by Doom emacs + xdg-ninja # help declutter $HOME + torrenttools # create torrent files from the terminal! + lm_sensors # for extension, displays cpu temp + # unstable.pokemon-colorscripts-mac # pokemon on your terminal! -discord # chat -google-chrome # web browser with spyware included -firefox # web browser that allows to disable spyware -librewolf # no spyware web browser -tor-browser-bundle-bin # dark web, so dark! -# hugo # website engine -nicotine-plus # remember Ares? -warp # never used, but supposedly cool for sharing files + # required by doom emacs, but still are rather useful. + fd # modern find, faster searches + fzf # fuzzy finder! super cool and useful + ripgrep # modern grep + languagetool # proofreader for English. check if works without the service + graphviz # graphs + # these two are for doom everywhere + xorg.xwininfo + xdotool -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 -gocryptfs # encrypted filesystem! shhh!!! -exa # like ls but with colors -trash-cli # oop! didn't meant to delete that -ffmpeg_5 # coolest video converter! -neofetch # use once for brag, never again -rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS -tldr # man for retards -ffmpegthumbnailer # create video thumbnails for nautilus, in absence of totem -vcsi # video thumbnails for torrents, can I replace it with ^? -mediainfo # technical info about videos, needed by some of my scripts -tree-sitter # code parsing, required by Doom emacs -xdg-ninja # help declutter $HOME -torrenttools # create torrent files from the terminal! + # development environment + nix-direnv # creates ephimeral environments + direnv # manages development environment + exercism # learn to code -# required by doom emacs, but still are rather useful. -fd # modern find, faster searches -fzf # fuzzy finder! super cool and useful -ripgrep # modern grep -languagetool # proofreader for English. check if works without the service -graphviz # graphs -# these two are for doom everywhere -xorg.xwininfo -xdotool + # SH + bats # testing system, required by Exercism + bashdb # autocomplete + shellcheck # linting + shfmt # a shell parser and formatter + nodePackages.bash-language-server # LSP support + file # required by my tasks script? + gnome.zenity # dependency of my scripts + xclip # manipulate clipboard from scripts -# development environment -nix-direnv # creates ephimeral environments -direnv # manages development environment -exercism # learn to code + # NIX + nixfmt # linting -# SH -bats # testing system, required by Exercism -bashdb # autocomplete -shellcheck # linting -shfmt # a shell parser and formatter -nodePackages.bash-language-server # LSP support -file # required by my tasks script? -gnome.zenity # dependency of my scripts -xclip # manipulate clipboard from scripts + # PYTHON. + python3 # base language + pipenv # python development workflow for humans -# NIX -nixfmt # linting + # C# & Rust + omnisharp-roslyn # c# linter and code formatter -# PYTHON. -python3 # base language -pipenv # python development workflow for humans + # HASKELL + # cabal-install # haskell interface -# C# & Rust -omnisharp-roslyn # c# linter and code formatter + # JS + # jq # linting + nodejs # not as bad as I thought -# HASKELL -# cabal-install # haskell interface + hunspell + hunspellDicts.it_IT + hunspellDicts.es_MX + hunspellDicts.en_CA -# JS -# jq # linting -nodejs # not as bad as I thought + # Themes + adwaita-qt + unstable.adw-gtk3 + unstable.gradience # theme customizer, allows you to modify adw-gtk3 themes + gnome.gnome-tweaks # tweaks for the gnome desktop environment -gnome.gnome-tweaks # tweaks for the gnome desktop environment + # Fonts + (nerdfonts.override { + fonts = [ + "Agave" + "CascadiaCode" + "SourceCodePro" + "Ubuntu" + "FiraCode" + "Iosevka" + ]; + }) + symbola -gnomeExtensions.appindicator -gnomeExtensions.gsconnect + (papirus-icon-theme.override { color = "adwaita"; }) -hunspell -hunspellDicts.it_IT -hunspellDicts.es_MX -hunspellDicts.en_CA + ]) ++ (with pkgs.python310Packages; [ + black # Python code formatter + flake8 # wraper for pyflakes, pycodestyle and mccabe + isort # sort Python imports + nose # testing and running python scripts + pipx # install python packages in a virtual environment + poetry # dependency management made easy + pyflakes # checks source code for errors + pylint # bug and style checker for python + pytest # framework for writing tests + speedtest-cli # check internet speed from the comand line + editorconfig # follow rules of contributin -# Themes -adwaita-qt -unstable.adw-gtk3 -unstable.gradience # theme customizer, allows you to modify adw-gtk3 themes + ]) ++ (with pkgs.fishPlugins; [ + sponge # keep history clean from typos + fzf-fish # fish command line with fzf keybindings + colored-man-pages # self explanatory + autopair-fish # who has time for a closing bracket? + bass # integrate bash utilities on fish -# Fonts -(nerdfonts.override { - fonts = [ "Agave" "CascadiaCode" "SourceCodePro" "Ubuntu" "FiraCode" "Iosevka" ]; -}) -symbola + ]) ++ (with pkgs.gnomeExtensions; [ + appindicator + gsconnect + freon + panel-scroll + reading-strip + tactile + pano -# (papirus-icon-theme.override { -# color = "grey"; -# }) + ]) ++ (with pkgs.nodePackages; [ + dockerfile-language-server-nodejs + markdownlint-cli + prettier + pnpm + ]); + }; # <--- end of package list -]) ++ (with pkgs.python310Packages; [ - black # Python code formatter - flake8 # wraper for pyflakes, pycodestyle and mccabe - isort # sort Python imports - nose # testing and running python scripts - pipx # install python packages in a virtual environment - poetry # dependency management made easy - pyflakes # checks source code for errors - pylint # bug and style checker for python - pytest # framework for writing tests - speedtest-cli # check internet speed from the comand line - editorconfig # follow rules of contributin + fonts.fontconfig.enable = true; -]) ++ (with pkgs.fishPlugins; [ - sponge # keep history clean from typos - fzf-fish # fish command line with fzf keybindings - colored-man-pages # self explanatory - autopair-fish # who has time for a closing bracket? - bass # integrate bash utilities on fish + home-manager.useUserPackages = true; + home-manager.useGlobalPkgs = true; -]) ++ (with pkgs.nodePackages; [ - dockerfile-language-server-nodejs - markdownlint-cli - prettier - pnpm -]); }; # <--- end of package list - -fonts.fontconfig.enable = true; - -home-manager.useUserPackages = true; -home-manager.useGlobalPkgs = true; - -home-manager.users.jawz = { config, pkgs, ... }:{ + home-manager.users.jawz = { config, pkgs, ... }: { # imports = [ ./dotfiles/dconf.nix ]; home.stateVersion = VERSION; home.packages = with pkgs; [ ]; -programs.starship.enable = true; -programs.fish = { - enable = true; - # useBabelfish = true; This setting doens't work from inside home-manager - shellAliases = { - ls = "exa --icons --group-directories-first --no-permissions --no-user --no-time"; - 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 = "open (find /mnt/disk2/scrapping/JawZ/gallery-dl -type d | fzf)"; - unique_extensions = "find . -type f | string match -r '([^.\/]+)\$' | sort -u"; - cp = "cp -i"; - mv = "mv -i"; - mkdir = "mkdir -p"; - rm = "trash"; - ".." = "cd .."; - "..." = "cd ../.."; - ".3" = "cd ../../.."; - ".4" = "cd ../../../.."; - ".5" = "cd ../../../../.."; + programs.starship.enable = true; + programs.fish = { + enable = true; + # useBabelfish = true; This setting doens't work from inside home-manager + shellAliases = { + ls = + "exa --icons --group-directories-first --no-permissions --no-user --no-time"; + 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 = + "open (find /mnt/disk2/scrapping/JawZ/gallery-dl -type d | fzf)"; + unique_extensions = + "find . -type f | string match -r '([^./]+)$' | sort -u"; + cp = "cp -i"; + mv = "mv -i"; + mkdir = "mkdir -p"; + rm = "trash"; + ".." = "cd .."; + "..." = "cd ../.."; + ".3" = "cd ../../.."; + ".4" = "cd ../../../.."; + ".5" = "cd ../../../../.."; + }; + shellAbbrs = { + dl = "download -u jawz -i"; + ex = "ls"; + e = "edit"; + c = "cat"; + f = "fzf --multi --exact -i"; + sc = "systemctl --user"; + jc = "journalctl --user -xeu"; + }; + interactiveShellInit = '' + + function fish_greeting + pokemon-colorscripts -r + end + # Lists + set -l list_root ${config.home.homeDirectory}/.config/jawz/lists/jawz + set lw $list_root/watch.txt + set li $list_root/instant.txt + set lc $list_root/comic.txt + set command_timeout = 30 + + set GPG_TTY (tty) + + # Set EMACS/VI mode + function fish_user_key_bindings + # fish_default_key_bindings + fish_vi_key_bindings + end + + ''; + + functions = { + nixos-magic = '' + + set -l nix_file "$HOME/Development/NixOS/configuration.nix" + set -l hardware_file "$HOME/Development/NixOS/hardware-configuration.nix" + nixfmt $nix_file + nixfmt $hardware_file + sudo nixos-rebuild switch -I nixos-config=$nix_file + + ''; + mkcd = '' + + mkdir -pv $argv + cd $argv + + ''; + }; + }; + + programs = { + bat = { + enable = true; + config = { + # map-syntax = [ "*.jenkinsfile:Groovy" "*.props:Java Properties" ]; + pager = "less -FR"; + theme = "base16"; + }; + }; + git = { + enable = true; + userName = "Danilo Reyes"; + userEmail = "CaptainJawZ@outlook.com"; + }; + # gpg = { + # enable = true; + # homedir = "${config.xdg.dataHome}/gnupg"; + # }; + htop = { + enable = true; + package = pkgs.htop-vim; + }; + }; + + xdg = { + enable = true; + userDirs = { + enable = true; + # createDirectories = true; + desktop = "${config.home.homeDirectory}"; + documents = "${config.home.homeDirectory}/Documents"; + download = "${config.home.homeDirectory}/Downloads"; + music = "${config.home.homeDirectory}/Music"; + pictures = "${config.home.homeDirectory}/Pictures"; + # publicShare = "${config.home.homeDirectory}/.local/hd/Public"; + templates = "${config.home.homeDirectory}/.local/share/Templates"; + videos = "${config.home.homeDirectory}/Videos"; + }; + configFile = { + "wgetrc".source = ./dotfiles/wget/wgetrc; + "configstore/update-notifier-npm-check.json".source = + ./dotfiles/npm/update-notifier-npm-check.json; + "npm/npmrc".source = ./dotfiles/npm/npmrc; + "gallery-dl/config.json".source = ./dotfiles/gallery-dl/config.json; + "htop/htoprc".source = ./dotfiles/htop/htoprc; + }; + }; + + services = { + emacs = { + enable = true; + defaultEditor = true; + package = pkgs.emacs; + }; + }; + }; - shellAbbrs = { - dl = "download -u jawz -i"; - ex = "ls"; - e = "edit"; - c = "cat"; - f = "fzf --multi --exact -i"; - sc = "systemctl --user"; - jc = "journalctl --user -xeu"; - }; - interactiveShellInit = '' -set fish_greeting "pika pika chu!!!! also remember fisher!" -# Lists -set -l list_root ${config.home.homeDirectory}/.config/jawz/lists/jawz -set lw $list_root/watch.txt -set li $list_root/instant.txt -set lc $list_root/comic.txt -set command_timeout = 30 - -set GPG_TTY (tty) - -# Set EMACS/VI mode -function fish_user_key_bindings - # fish_default_key_bindings - fish_vi_key_bindings -end - -''; - -functions = { - nixos-magic = '' - -set -l nix_file "$HOME/Development/NixOS/configuration.nix" -echo $nix_file -nixfmt $nix_file -sudo nixos-rebuild switch -I nixos-config=$nix_file - - ''; - mkcd = '' - - mkdir -pv $argv - cd $argv - - ''; - }; -}; - -programs = { - bat = { - enable = true; - config = { - # map-syntax = [ "*.jenkinsfile:Groovy" "*.props:Java Properties" ]; - pager = "less -FR"; - theme = "base16"; }; - }; - git = { - enable = true; - userName = "Danilo Reyes"; - userEmail = "CaptainJawZ@outlook.com"; - }; - gpg = { - enable = true; - homedir = "${config.xdg.dataHome}/gnupg"; - }; - htop = { - enable = true; - package = pkgs.htop-vim; - }; -}; - -xdg = { - enable = true; - userDirs = { - enable = true; - # createDirectories = true; - desktop = "${config.home.homeDirectory}"; - documents = "${config.home.homeDirectory}/Documents"; - download = "${config.home.homeDirectory}/Downloads"; - music = "${config.home.homeDirectory}/Music"; - pictures = "${config.home.homeDirectory}/Pictures"; - # publicShare = "${config.home.homeDirectory}/.local/hd/Public"; - templates = "${config.home.homeDirectory}/.local/share/Templates"; - videos = "${config.home.homeDirectory}/Videos"; - }; - configFile = { - "wgetrc".source = ./dotfiles/wget/wgetrc; - "configstore/update-notifier-npm-check.json".source = ./dotfiles/npm/update-notifier-npm-check.json; - "npm/npmrc".source = ./dotfiles/npm/npmrc; - "gallery-dl/config.json".source = ./dotfiles/gallery-dl/config.json; - "htop/htoprc".source = ./dotfiles/htop/htoprc; - }; -}; - -# services = { -# emacs = { -# enable = true; -# defaultEditor = true; -# package = pkgs.emacs; -# }; -# }; - -}; - -environment.systemPackages = with pkgs; [ - wget - neovim - docker-compose # easy way to migrate my docker anywhere! -]; - -environment.variables = rec { - # PATH - XDG_CACHE_HOME = "\${HOME}/.cache"; - XDG_CONFIG_HOME = "\${HOME}/.config"; - XDG_BIN_HOME = "\${HOME}/.local/bin"; - XDG_DATA_HOME = "\${HOME}/.local/share"; - XDG_STATE_HOME = "\${HOME}/.local/state"; - - SCRIPTS = "\${HOME}/Development/Scripts"; - - # DEV PATH - CABAL_CONFIG = "\${XDG_CONFIG_HOME}/cabal/config"; - CABAL_DIR = "\${XDG_CACHE_HOME}/cabal"; - CARGO_HOME = "\${XDG_DATA_HOME}/cargo"; - GEM_HOME = "\${XDG_DATA_HOME}/ruby/gems"; - GEM_PATH = "\${XDG_DATA_HOME}/ruby/gems"; - GEM_SPEC_CACHE = "\${XDG_DATA_HOME}/ruby/specs"; - GOPATH = "\${XDG_DATA_HOME}/go"; - NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc"; - PNPM_HOME = "\${XDG_DATA_HOME}/pnpm"; - # OPTIONS - LESSHISTFILE = "-"; - GHCUP_USE_XDG_DIRS = "true"; - RIPGREP_CONFIG_PATH = "\${XDG_CONFIG_HOME}/ripgrep/ripgreprc"; - ELECTRUMDIR = "\${XDG_DATA_HOME}/electrum"; - VISUAL = "emacsclient -ca emacs"; - WGETRC = "\${XDG_CONFIG_HOME}/wgetrc"; - "_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=\${XDG_CONFIG_HOME}/java"; - # NVIDIA - CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv"; - # GBM_BACKEND = "nvidia-drm"; - # "__GLX_VENDOR_LIBRARY_NAME" = "nvidia"; - - # Themes - # GTK_THEME = "Adwaita:light"; - # QT_QPA_PLATFORMTHEME = "adwaita-dark"; - # QT_STYLE_OVERRIDE = "adwaita"; - # CALIBRE_USE_SYSTEM_THEME = "1"; - - PATH = [ - "\${XDG_BIN_HOME}" - "\${XDG_CONFIG_HOME}/emacs/bin" - "\${XDG_DATA_HOME}/npm/bin" - "\${PNPM_HOME}" - "\${SCRIPTS}" + environment.systemPackages = with pkgs; [ + wget + neovim + docker-compose # easy way to migrate my docker anywhere! ]; -}; -virtualisation.docker = { + environment.variables = rec { + # PATH + XDG_CACHE_HOME = "\${HOME}/.cache"; + XDG_CONFIG_HOME = "\${HOME}/.config"; + XDG_BIN_HOME = "\${HOME}/.local/bin"; + XDG_DATA_HOME = "\${HOME}/.local/share"; + XDG_STATE_HOME = "\${HOME}/.local/state"; + + SCRIPTS = "\${HOME}/Development/Scripts"; + + # DEV PATH + CABAL_CONFIG = "\${XDG_CONFIG_HOME}/cabal/config"; + CABAL_DIR = "\${XDG_CACHE_HOME}/cabal"; + CARGO_HOME = "\${XDG_DATA_HOME}/cargo"; + GEM_HOME = "\${XDG_DATA_HOME}/ruby/gems"; + GEM_PATH = "\${XDG_DATA_HOME}/ruby/gems"; + GEM_SPEC_CACHE = "\${XDG_DATA_HOME}/ruby/specs"; + GOPATH = "\${XDG_DATA_HOME}/go"; + NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc"; + PNPM_HOME = "\${XDG_DATA_HOME}/pnpm"; + # OPTIONS + HISTFILE = "\${XDG_STATE_HOME}/bash/history"; + LESSHISTFILE = "-"; + GHCUP_USE_XDG_DIRS = "true"; + RIPGREP_CONFIG_PATH = "\${XDG_CONFIG_HOME}/ripgrep/ripgreprc"; + ELECTRUMDIR = "\${XDG_DATA_HOME}/electrum"; + VISUAL = "emacsclient -ca emacs"; + WGETRC = "\${XDG_CONFIG_HOME}/wgetrc"; + XCOMPOSECACHE = "${XDG_CACHE_HOME}/X11/xcompose"; + "_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=\${XDG_CONFIG_HOME}/java"; + # NVIDIA + CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv"; + # GBM_BACKEND = "nvidia-drm"; + # "__GLX_VENDOR_LIBRARY_NAME" = "nvidia"; + + # Themes + # GTK_THEME = "Adwaita:light"; + # QT_QPA_PLATFORMTHEME = "adwaita"; + # QT_STYLE_OVERRIDE = "adwaita"; + CALIBRE_USE_SYSTEM_THEME = "1"; + + PATH = [ + "\${HOME}/.local/bin" + "\${XDG_CONFIG_HOME}/emacs/bin" + "\${XDG_DATA_HOME}/npm/bin" + "\${XDG_DATA_HOME}/pnpm" + ]; + }; + + virtualisation.docker = { enable = true; storageDriver = "btrfs"; enableNvidia = true; -}; + }; -snapraid = { - enable = true; - touchBeforeSync = true; - sync.interval = "02:00"; - scrub = { - plan = 10; - olderThan = 10; - interval = "4:00"; - }; - parityFiles = [ - "/mnt/parity/snapraid.parity" - ]; - extraConfig = '' - autosave 50 - ''; - exclude = [ - "/tmp/" - "/lost+found/" - "/multimedia/downloads/" - "/scrapping/nextcloud/" - ]; - dataDisks = { - d1 = "/mnt/disk1/"; - d2 = "/mnt/disk2/"; - }; - contentFiles = [ - "/var/snapraid.content" - "/mnt/disk1/snapraid.content" - "/mnt/disk2/snapraid.content" - ]; -}; - -programs = { - mtr.enable = true; - gnupg.agent = { + snapraid = { enable = true; - enableSSHSupport = true; - }; - geary = { - enable = true; - }; - steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - }; -}; - -services = { - printing.enable = true; - fstrim.enable = true; - btrfs.autoScrub = { - enable = true; - fileSystems = [ - "/" - "/mnt/disk1" - "/mnt/disk2" + touchBeforeSync = true; + sync.interval = "02:00"; + scrub = { + plan = 10; + olderThan = 10; + interval = "4:00"; + }; + parityFiles = [ "/mnt/parity/snapraid.parity" ]; + extraConfig = '' + autosave 50 + ''; + exclude = [ + "/tmp/" + "/lost+found/" + "/multimedia/downloads/" + "/scrapping/nextcloud/" + "/backups/" + ]; + dataDisks = { + d1 = "/mnt/disk1/"; + d2 = "/mnt/disk2/"; + }; + contentFiles = [ + "/var/snapraid.content" + "/mnt/disk1/snapraid.content" + "/mnt/disk2/snapraid.content" ]; }; - openssh = { - enable = true; - ports = [ 25152 ]; - }; - udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; - emacs = { - enable = true; - defaultEditor = true; - package = pkgs.emacs; - }; -}; -systemd.services = { - "docker-compose" = { - enable = true; - restartIfChanged = true; - description = "Start docker-compose servers"; - after = [ "docker.service" "docker.socket" ]; - requires = [ "docker.service" "docker.socket" ]; - wantedBy = [ "multi-user.target" ]; - environment = { - FILE = "/home/jawz/Development/Docker/docker-compose.yml"; + programs = { + mtr.enable = true; + gnupg.agent = { + enable = true; + enableSSHSupport = true; }; - path = [ - pkgs.docker-compose - ]; - serviceConfig = { - Restart = "on-failure"; - # Type = "simple"; - RestartSec = 30; - ExecStart = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} up --remove-orphans"; - ExecStop = "${pkgs.docker-compose}docker-compose -f \${FILE} down"; + geary = { enable = true; }; + steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; }; }; -}; -# networking.firewall.allowedTCPPorts = [ ... ]; -# networking.firewall.allowedUDPPorts = [ ... ]; -# Or disable the firewall altogether. -networking.firewall.enable = false; + services = { + printing.enable = true; + fstrim.enable = true; + btrfs.autoScrub = { + enable = true; + fileSystems = [ "/" "/mnt/disk1" "/mnt/disk2" ]; + }; + openssh = { + enable = true; + ports = [ 25152 ]; + }; + # udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; + emacs = { + enable = true; + defaultEditor = true; + package = pkgs.emacs; + }; + }; -system.copySystemConfiguration = true; + systemd.services = { + "docker-compose" = { + enable = true; + restartIfChanged = true; + description = "Start docker-compose servers"; + after = [ "docker.service" "docker.socket" ]; + requires = [ "docker.service" "docker.socket" ]; + wantedBy = [ "multi-user.target" ]; + environment = { + FILE = "/home/jawz/Development/Docker/docker-compose.yml"; + }; + path = [ pkgs.docker-compose ]; + serviceConfig = { + Restart = "on-failure"; + # Type = "simple"; + RestartSec = 30; + ExecStart = + "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} up --remove-orphans"; + ExecStop = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} down"; + }; + }; + }; + systemd.user.services = { + "HentaiAtHome" = { + enable = true; + restartIfChanged = true; + description = "Run hentai@home server"; + wantedBy = [ "multi-user.target" ]; + path = [ pkgs.HentaiAtHome ]; + serviceConfig = { + Restart = "on-failure"; + RestartSec = 30; + WorkingDirectory = "/mnt/hnbox"; + ExecStart = "${pkgs.HentaiAtHome}/bin/HentaiAtHome"; + }; + }; + }; -system.stateVersion = VERSION; + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + networking.firewall.enable = false; + + system.copySystemConfiguration = true; + + system.stateVersion = VERSION; } diff --git a/configuration.org b/configuration.org index bcc4d92..4b76a1c 100755 --- a/configuration.org +++ b/configuration.org @@ -141,6 +141,7 @@ services = { videoDrivers = [ "nvidia" ]; displayManager.gdm.enable = true; desktopManager.gnome.enable = true; + # wacom.enable = true; layout = "us"; libinput.enable = true; # Wacom required? }; @@ -151,10 +152,11 @@ environment.gnome.excludePackages = (with pkgs; [ gnome-tour gnome-text-editor gnome-connections + # gnome-shell-extensions baobab ]) ++ (with pkgs.gnome; [ - totem + # totem gedit gnome-music epiphany @@ -306,6 +308,7 @@ metadata-cleaner # remove any metadata and geolocation from files gnome-recipes # migrate these to mealie and delete unstable.denaro # manage your finances # unstable.celeste # sync tool for any cloud provider +# libgda # for pano shell extension #+end_src *** MULTIMEDIA @@ -326,6 +329,7 @@ tagger # tag music files # bottles # wine prefix manager obs-studio # screen recorder & streamer shortwave # listen to world radio +nextcloud-client # teehee #+end_src *** Web @@ -340,6 +344,7 @@ tor-browser-bundle-bin # dark web, so dark! # hugo # website engine nicotine-plus # remember Ares? warp # never used, but supposedly cool for sharing files +HentaiAtHome # uh-oh #+end_src ** COMMAND-LINE PACKAGES @@ -355,12 +360,14 @@ ffmpeg_5 # coolest video converter! neofetch # use once for brag, never again rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS tldr # man for retards -ffmpegthumbnailer # create video thumbnails for nautilus, in absence of totem +# ffmpegthumbnailer # create video thumbnails for nautilus, in absence of totem vcsi # video thumbnails for torrents, can I replace it with ^? mediainfo # technical info about videos, needed by some of my scripts tree-sitter # code parsing, required by Doom emacs xdg-ninja # help declutter $HOME torrenttools # create torrent files from the terminal! +lm_sensors # for extension, displays cpu temp +# unstable.pokemon-colorscripts-mac # pokemon on your terminal! #+end_src ** DEVELOPMENT PACKAGES @@ -409,15 +416,6 @@ omnisharp-roslyn # c# linter and code formatter nodejs # not as bad as I thought #+end_src -** GNOME EXTENSIONS - -#+begin_src nix -gnome.gnome-tweaks # tweaks for the gnome desktop environment - -gnomeExtensions.appindicator -gnomeExtensions.gsconnect -#+end_src - ** HUNSPELL These dictionaries work with Firefox, Doom Emacs and LibreOffice. @@ -437,6 +435,7 @@ main draws of Linux for me. adwaita-qt unstable.adw-gtk3 unstable.gradience # theme customizer, allows you to modify adw-gtk3 themes +gnome.gnome-tweaks # tweaks for the gnome desktop environment # Fonts (nerdfonts.override { @@ -444,9 +443,9 @@ unstable.gradience # theme customizer, allows you to modify adw-gtk3 themes }) symbola -# (papirus-icon-theme.override { -# color = "grey"; -# }) +(papirus-icon-theme.override { + color = "adwaita"; +}) #+end_src ** PYTHON @@ -477,7 +476,20 @@ symbola bass # integrate bash utilities on fish #+end_src -** NODE JS PACKAGES +** GNOME EXTENSIONS + +#+begin_src nix +]) ++ (with pkgs.gnomeExtensions; [ + appindicator + gsconnect + freon + panel-scroll + reading-strip + tactile + pano +#+end_src + +** NODEJS PACKAGES #+begin_src nix ]) ++ (with pkgs.nodePackages; [ @@ -558,8 +570,9 @@ programs.fish = { #+end_src #+begin_src fish - -set fish_greeting "pika pika chu!!!! also remember fisher!" +function fish_greeting + pokemon-colorscripts -r +end # Lists set -l list_root ${config.home.homeDirectory}/.config/jawz/lists/jawz set lw $list_root/watch.txt @@ -574,7 +587,6 @@ function fish_user_key_bindings # fish_default_key_bindings fish_vi_key_bindings end - #+end_src @@ -590,8 +602,9 @@ functions = { #+begin_src fish set -l nix_file "$HOME/Development/NixOS/configuration.nix" -echo $nix_file +set -l hardware_file "$HOME/Development/NixOS/hardware-configuration.nix" nixfmt $nix_file +nixfmt $hardware_file sudo nixos-rebuild switch -I nixos-config=$nix_file #+end_src #+begin_src nix @@ -624,10 +637,10 @@ programs = { userName = "Danilo Reyes"; userEmail = "CaptainJawZ@outlook.com"; }; - gpg = { - enable = true; - homedir = "${config.xdg.dataHome}/gnupg"; - }; + # gpg = { + # enable = true; + # homedir = "${config.xdg.dataHome}/gnupg"; + # }; htop = { enable = true; package = pkgs.htop-vim; @@ -665,13 +678,13 @@ xdg = { ** USER-SERVICES #+begin_src nix -# services = { -# emacs = { -# enable = true; -# defaultEditor = true; -# package = pkgs.emacs; -# }; -# }; +services = { + emacs = { + enable = true; + defaultEditor = true; + package = pkgs.emacs; + }; +}; #+end_src ** CLOSING HOME-MANAGER @@ -716,12 +729,14 @@ environment.variables = rec { NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc"; PNPM_HOME = "\${XDG_DATA_HOME}/pnpm"; # OPTIONS + HISTFILE = "\${XDG_STATE_HOME}/bash/history"; LESSHISTFILE = "-"; GHCUP_USE_XDG_DIRS = "true"; RIPGREP_CONFIG_PATH = "\${XDG_CONFIG_HOME}/ripgrep/ripgreprc"; ELECTRUMDIR = "\${XDG_DATA_HOME}/electrum"; VISUAL = "emacsclient -ca emacs"; WGETRC = "\${XDG_CONFIG_HOME}/wgetrc"; + XCOMPOSECACHE = "${XDG_CACHE_HOME}/X11/xcompose"; "_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=\${XDG_CONFIG_HOME}/java"; # NVIDIA CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv"; @@ -730,16 +745,15 @@ environment.variables = rec { # Themes # GTK_THEME = "Adwaita:light"; - # QT_QPA_PLATFORMTHEME = "adwaita-dark"; + # QT_QPA_PLATFORMTHEME = "adwaita"; # QT_STYLE_OVERRIDE = "adwaita"; - # CALIBRE_USE_SYSTEM_THEME = "1"; + CALIBRE_USE_SYSTEM_THEME = "1"; PATH = [ - "\${XDG_BIN_HOME}" + "\${HOME}/.local/bin" "\${XDG_CONFIG_HOME}/emacs/bin" "\${XDG_DATA_HOME}/npm/bin" - "\${PNPM_HOME}" - "\${SCRIPTS}" + "\${XDG_DATA_HOME}/pnpm" ]; }; #+end_src @@ -784,6 +798,7 @@ snapraid = { "/lost+found/" "/multimedia/downloads/" "/scrapping/nextcloud/" + "/backups/" ]; dataDisks = { d1 = "/mnt/disk1/"; @@ -833,7 +848,7 @@ services = { enable = true; ports = [ 25152 ]; }; - udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; + # udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; emacs = { enable = true; defaultEditor = true; @@ -866,7 +881,24 @@ systemd.services = { # Type = "simple"; RestartSec = 30; ExecStart = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} up --remove-orphans"; - ExecStop = "${pkgs.docker-compose}docker-compose -f \${FILE} down"; + ExecStop = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} down"; + }; + }; +}; +systemd.user.services = { + "HentaiAtHome" = { + enable = true; + restartIfChanged = true; + description = "Run hentai@home server"; + wantedBy = [ "multi-user.target" ]; + path = [ + pkgs.HentaiAtHome + ]; + serviceConfig = { + Restart = "on-failure"; + RestartSec = 30; + WorkingDirectory="/mnt/hnbox"; + ExecStart = "${pkgs.HentaiAtHome}/bin/HentaiAtHome"; }; }; }; diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 2730ace..a3a48bb 100755 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -19,12 +19,8 @@ }; }; initrd.luks.devices = { - root = { - device = "/dev/disk/by-uuid/2dc90b31-2a37-46a9-92e5-a648cd74a860"; - preLVM = true; - }; - root2 = { - device = "/dev/disk/by-uuid/b0414af9-bca9-44d0-9fe3-a6e4f0b1c28c"; + nvme = { + device = "/dev/disk/by-uuid/af72f45c-cf7c-4e7d-8eab-2a95ab754921"; preLVM = true; }; disk1 = { @@ -35,23 +31,31 @@ device = "/dev/disk/by-uuid/0ed12b83-4c56-4ba8-b4ea-75a9e927d771"; preLVM = true; }; + hnbox = { + device = "/dev/disk/by-uuid/c7dd2d5a-b0b3-46a0-aca9-3d4975c1f0bc"; + preLVM = true; + }; + seedbox = { + device = "/dev/disk/by-uuid/04f06a3e-a91f-476b-9a4b-b9c722ba99e7"; + preLVM = true; + }; }; kernelModules = [ "kvm-intel" ]; - kernel.sysctl = { "vm.swappiness" = 90; }; + kernel.sysctl = { "vm.swappiness" = 100; }; extraModulePackages = [ ]; initrd = { availableKernelModules = - [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + [ "xhci_pci" "ahci" "usbhid" "nvme" "usb_storage" "sd_mod" ]; kernelModules = [ ]; }; }; fileSystems."/" = { - device = "/dev/mapper/root"; + device = "/dev/mapper/nvme"; fsType = "btrfs"; options = [ "subvol=nix" - "ssd" + # "ssd" "compress=zstd:3" "x-systemd.device-timeout=0" "space_cache=v2" @@ -61,11 +65,11 @@ }; fileSystems."/home" = { - device = "/dev/mapper/root"; + device = "/dev/mapper/nvme"; fsType = "btrfs"; options = [ "subvol=home" - "ssd" + # "ssd" "compress=zstd:3" "x-systemd.device-timeout=0" "space_cache=v2" @@ -84,6 +88,19 @@ fsType = "btrfs"; options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ]; }; + + fileSystems."/mnt/hnbox" = { + device = "/dev/mapper/hnbox"; + fsType = "btrfs"; + options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ]; + }; + + fileSystems."/mnt/seedbox" = { + device = "/dev/mapper/seedbox"; + fsType = "btrfs"; + options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ]; + }; + fileSystems."/mnt/parity" = { device = "/dev/disk/by-uuid/643b727a-555d-425c-943c-62f5b93631c9"; fsType = "xfs"; @@ -91,17 +108,17 @@ }; fileSystems."/boot" = { - device = "/dev/disk/by-uuid/eb5b3650-f709-46a1-8d63-7f05ffd5e6d4"; + device = "/dev/disk/by-uuid/c574cb53-dc40-46db-beff-0fe8a4787156"; fsType = "ext4"; }; fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/78B5-4717"; + device = "/dev/disk/by-uuid/CBE7-5DEB"; fsType = "vfat"; }; swapDevices = - [{ device = "/dev/disk/by-uuid/7b9f7369-d24d-4b54-95a6-853626eb45a7"; }]; + [{ device = "/dev/disk/by-uuid/f41cc85e-9963-46c1-9385-0748e670638d"; }]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -117,10 +134,10 @@ cpu.intel.updateMicrocode = lib.mkDefault true; bluetooth.enable = true; # huion driver - opentabletdriver = { - enable = true; - daemon.enable = true; - }; + # opentabletdriver = { + # enable = true; + # daemon.enable = true; + # }; # nvidia driver nvidia.modesetting.enable = true; opengl = { @@ -132,4 +149,3 @@ # lib.mkDefault config.hardware.enableRedistributableFirmware; } -