diff --git a/configuration.nix b/configuration.nix index a348560..03d5ff8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,7 +1,6 @@ { config, pkgs, ... }: let VERSION = "23.05"; - # 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"; @@ -21,7 +20,6 @@ in { # Remember to close this bracket at the end of the document ]; networking.hostName = "workstation"; - # networking.wireless.enable = true; networking.networkmanager.enable = true; @@ -123,7 +121,7 @@ in { # Remember to close this bracket at the end of the document gimp # the coolest bestest art program to never exist lutris # game/emulator manager - # grapejuice # roblox manager + grapejuice # roblox manager minecraft # minecraft official launcher parsec-bin # remote gaming with friends protonup-qt # update proton-ge @@ -160,7 +158,7 @@ in { # Remember to close this bracket at the end of the document # bottles # wine prefix manager obs-studio # screen recorder & streamer shortwave # listen to world radio - nextcloud-client # teehee + nextcloud-client # self-hosted google-drive alternative discord # chat google-chrome # web browser with spyware included @@ -179,7 +177,7 @@ in { # Remember to close this bracket at the end of the document gocryptfs # encrypted filesystem! shhh!!! exa # like ls but with colors trash-cli # oop! didn't meant to delete that - ffmpeg_5 # coolest video converter! + ffmpeg_6 # 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 @@ -187,7 +185,6 @@ in { # Remember to close this bracket at the end of the document 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 @@ -216,7 +213,6 @@ in { # Remember to close this bracket at the end of the document 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 @@ -299,21 +295,22 @@ in { # Remember to close this bracket at the end of the document bass # integrate bash utilities on fish ]) ++ (with pkgs.gnomeExtensions; [ - appindicator - gsconnect - freon - panel-scroll - reading-strip - tactile - pano + appindicator # applets for open applications + gsconnect # sync data and notifications from your phone + freon # hardware temperature monitor + panel-scroll # scroll well to change workspaces + reading-strip # like putting a finger on every line I read + tactile # window manager + pano # clipboard manager # ]) ++ (with unstable.pkgs.gnomeExtensions; [ ]) ++ (with pkgs.nodePackages; [ - dockerfile-language-server-nodejs - pyright - markdownlint-cli - prettier - pnpm + dockerfile-language-server-nodejs # LSP + bash-language-server # LSP + pyright # LSP + markdownlint-cli # Linter + prettier # Linter + pnpm # Package manager ]); }; # <--- end of package list @@ -477,6 +474,7 @@ in { # Remember to close this bracket at the end of the document 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 = "-"; @@ -487,6 +485,7 @@ in { # Remember to close this bracket at the end of the document 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"; @@ -670,9 +669,9 @@ in { # Remember to close this bracket at the end of the document }; }; - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - networking.firewall.enable = false; + networking.firewall.allowedTCPPorts = [ 25152 80 443 ]; + networking.firewall.allowedUDPPorts = [ 25152 80 443 ]; + # networking.firewall.enable = false; system.copySystemConfiguration = true; nix.gc = { diff --git a/configuration.org b/configuration.org index cf5dc08..bc1fca6 100755 --- a/configuration.org +++ b/configuration.org @@ -26,19 +26,22 @@ - [ ] Figure out how to get rid of xterm - [ ] wine-discord-ipc-bridge https://github.com/fufexan/nix-gaming - - [ ] make binaries of my own scripts - https://github.com/asimpson/dotfiles/blob/899b45e1586aac04d4e5541d638bbbffc66b4bba/nixos/scripts.nix * ABOUT -Setting up the document. Also in theory this should allow me to set up -variables, and other functions. +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. #+begin_src nix { config, pkgs, ... }: let VERSION = "23.05"; - # 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; @@ -57,8 +60,8 @@ in * IMPORTS These are files and modules which get loaded onto the configuration file, in the -future I may segment this file into different modules, but for the time being, -the two ones I need are hardware and home-manager. +future I may segment this file into different modules once it becomes too +cluttered, for example, I may create a module for systemd units. #+begin_src nix imports = [ @@ -73,31 +76,24 @@ imports = [ At the moment, I don't have a wireless card on this computer, however as I build a new system, such setting may come in handy. -#+begin_src nix -networking.hostName = "workstation"; -#+end_src - Pick *ONLY ONE* of the below networking options. - *wireless.enable* enables wireless support via wpa_supplicant. - *NetworkManager* it's the default of GNOME, and easiest to use and integrate. #+begin_src nix +networking.hostName = "workstation"; # networking.wireless.enable = true; networking.networkmanager.enable = true; #+end_src -** TIMEZONE - -#+begin_src nix -time.timeZone = "America/Mexico_City"; -#+end_src - -** LOCALE +** TIMEZONE & LOCALE For some reason, useXkbConfig throws an error when building the system, either way it is an unnecessary setting as my keyboards are the default en_US, only locale set to Canadian out because I prefer how it displays the date. #+begin_src nix +time.timeZone = "America/Mexico_City"; + i18n = { defaultLocale = "en_CA.UTF-8"; extraLocaleSettings = { @@ -189,8 +185,8 @@ security.sudo = { #+end_src ** OPENDOAS -It's mayor advantage over Sudo, is that is being a smaller package, being lessen known -means that there is less security risks associated with it, overall a less +It's mayor advantage over Sudo, is that is being a smaller package, being lessen +known means that there is less security risks associated with it, overall a less bloated more secure package. Which comes with the caveat that due to it's age, there is little support for it. Constantly having to resort to hack solutions such as patches or symlinks. @@ -271,7 +267,7 @@ anticipated, most everything seems to run seamlessly. #+begin_src nix lutris # game/emulator manager -# grapejuice # roblox manager +grapejuice # roblox manager minecraft # minecraft official launcher parsec-bin # remote gaming with friends protonup-qt # update proton-ge @@ -327,12 +323,12 @@ tagger # tag music files # bottles # wine prefix manager obs-studio # screen recorder & streamer shortwave # listen to world radio -nextcloud-client # teehee +nextcloud-client # self-hosted google-drive alternative #+end_src *** Web -Stuff that I use to interact with the web, web browsers, chats, downloaders, -etc. +Stuff that I use to interact with the web, web browsers, chats, download +managers, etc. #+begin_src nix discord # chat @@ -356,7 +352,7 @@ du-dust # rusty du gocryptfs # encrypted filesystem! shhh!!! exa # like ls but with colors trash-cli # oop! didn't meant to delete that -ffmpeg_5 # coolest video converter! +ffmpeg_6 # 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 @@ -364,7 +360,6 @@ tldr # man for retards 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 @@ -397,7 +392,6 @@ 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 @@ -503,13 +497,13 @@ symbola #+begin_src nix ]) ++ (with pkgs.gnomeExtensions; [ - appindicator - gsconnect - freon - panel-scroll - reading-strip - tactile - pano + appindicator # applets for open applications + gsconnect # sync data and notifications from your phone + freon # hardware temperature monitor + panel-scroll # scroll well to change workspaces + reading-strip # like putting a finger on every line I read + tactile # window manager + pano # clipboard manager # ]) ++ (with unstable.pkgs.gnomeExtensions; [ #+end_src @@ -517,11 +511,12 @@ symbola #+begin_src nix ]) ++ (with pkgs.nodePackages; [ - dockerfile-language-server-nodejs - pyright - markdownlint-cli - prettier - pnpm + dockerfile-language-server-nodejs # LSP + bash-language-server # LSP + pyright # LSP + markdownlint-cli # Linter + prettier # Linter + pnpm # Package manager ]); }; # <--- end of package list #+end_src @@ -745,6 +740,7 @@ environment.variables = rec { 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 = "-"; @@ -755,6 +751,7 @@ environment.variables = rec { 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"; @@ -990,9 +987,9 @@ Open ports in the firewall. =TIP= list what app a port belongs to in a table. #+begin_src nix -# networking.firewall.allowedTCPPorts = [ ... ]; -# networking.firewall.allowedUDPPorts = [ ... ]; -networking.firewall.enable = false; +networking.firewall.allowedTCPPorts = [ 25152 80 443 ]; +networking.firewall.allowedUDPPorts = [ 25152 80 443 ]; +# networking.firewall.enable = false; #+end_src * FINAL SYSTEM CONFIGURATIONS diff --git a/hardware-configuration.nix b/hardware-configuration.nix index dc985f1..e46678f 100755 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -117,8 +117,15 @@ fsType = "vfat"; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/f41cc85e-9963-46c1-9385-0748e670638d"; }]; + swapDevices = [{ + device = "/dev/disk/by-partuuid/cb0ad486-ebf8-4bfc-ad7c-96bdc68576ca"; + randomEncryption = { + enable = true; + cipher = "aes-xts-plain64"; + keySize = 512; + sectorSize = 4096; + }; + }]; # 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