adjustments, mostly org rewrite, and some packages
dsjlas sajdaslkj dsakd
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#+TITLE: JawZ NixOS main Configuration
|
#+TITLE: JawZ NixOS workstation configuration
|
||||||
#+AUTHOR: Danilo Reyes
|
#+AUTHOR: Danilo Reyes
|
||||||
#+PROPERTY: header-args :tangle configuration.nix
|
#+PROPERTY: header-args :tangle configuration.nix
|
||||||
#+auto_tangle: t
|
#+auto_tangle: t
|
||||||
@@ -10,16 +10,6 @@
|
|||||||
- [ ] Figure out how to get rid of xterm
|
- [ ] 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
|
* DECLARATION
|
||||||
Here I will declare the dependencies and variables that will be used multiple
|
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,
|
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.
|
configurations.
|
||||||
|
|
||||||
** VARIABLES
|
** 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
|
#+begin_src nix
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
@@ -82,16 +78,12 @@ networking = {
|
|||||||
firewall = let
|
firewall = let
|
||||||
open_firewall_ports = [
|
open_firewall_ports = [
|
||||||
6969 # HentaiAtHome
|
6969 # HentaiAtHome
|
||||||
25152 # ssh
|
|
||||||
51413 # torrent sedding
|
51413 # torrent sedding
|
||||||
9091 # qbittorrent
|
9091 # qbittorrent
|
||||||
2049 # nfs
|
2049 # nfs
|
||||||
];
|
];
|
||||||
open_firewall_port_ranges = [
|
open_firewall_port_ranges = [ ];
|
||||||
{ from = 1714; to = 1764; } # kdeconnect
|
in {
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = open_firewall_ports;
|
allowedTCPPorts = open_firewall_ports;
|
||||||
allowedUDPPorts = 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
|
unstable.gallery-dl # similar to yt-dlp but for most image gallery websites
|
||||||
gdu # disk-space utility, somewhat useful
|
gdu # disk-space utility, somewhat useful
|
||||||
du-dust # rusty du
|
du-dust # rusty du
|
||||||
gocryptfs # encrypted filesystem! shhh!!!
|
|
||||||
exa # like ls but with colors
|
exa # like ls but with colors
|
||||||
trashy # oop! didn't meant to delete that
|
trashy # oop! didn't meant to delete that
|
||||||
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
|
||||||
tldr # man for retards
|
tldr # man for retards
|
||||||
vcsi # video thumbnails for torrents, can I replace it with ^?
|
|
||||||
tree-sitter # code parsing, required by Doom emacs
|
tree-sitter # code parsing, required by Doom emacs
|
||||||
torrenttools # create torrent files from the terminal!
|
|
||||||
lm_sensors # for extension, displays cpu temp
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** MY SCRIPTS
|
** MY SCRIPTS
|
||||||
@@ -305,9 +293,6 @@ main draws of Linux for me.
|
|||||||
"Ubuntu" "FiraCode" "Iosevka" ];
|
"Ubuntu" "FiraCode" "Iosevka" ];
|
||||||
})
|
})
|
||||||
symbola
|
symbola
|
||||||
(papirus-icon-theme.override {
|
|
||||||
color = "adwaita";
|
|
||||||
})
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** PYTHON
|
** PYTHON
|
||||||
@@ -408,8 +393,8 @@ programs.bash = {
|
|||||||
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)\"";
|
||||||
open_gallery = "cd /mnt/disk2/scrapping/JawZ/gallery-dl && xdg-open $(fd . ./ Husbands -tdirectory -d 1 | fzf -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";
|
unique-extensions = "fd -tf | rev | cut -d. -f1 | rev | tr '[:upper:]' '[:lower:]' | sort | uniq --count | sort -rn";
|
||||||
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";
|
||||||
@@ -434,7 +419,7 @@ programs.bash = {
|
|||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
$HOME/.local/bin/pokemon-colorscripts -r --no-title
|
$HOME/.local/bin/pokemon-colorscripts -r --no-title
|
||||||
# Lists
|
# 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 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
|
||||||
@@ -502,7 +487,7 @@ xdg = {
|
|||||||
download = "${config.home.homeDirectory}/Downloads";
|
download = "${config.home.homeDirectory}/Downloads";
|
||||||
music = "${config.home.homeDirectory}/Music";
|
music = "${config.home.homeDirectory}/Music";
|
||||||
pictures = "${config.home.homeDirectory}/Pictures";
|
pictures = "${config.home.homeDirectory}/Pictures";
|
||||||
templates = "${config.home.homeDirectory}/.local/share/Templates";
|
templates = "${config.xdg.dataHome}/Templates";
|
||||||
videos = "${config.home.homeDirectory}/Videos";
|
videos = "${config.home.homeDirectory}/Videos";
|
||||||
};
|
};
|
||||||
configFile = {
|
configFile = {
|
||||||
@@ -578,7 +563,7 @@ environment.variables = rec {
|
|||||||
ELECTRUMDIR = "\${XDG_DATA_HOME}/electrum";
|
ELECTRUMDIR = "\${XDG_DATA_HOME}/electrum";
|
||||||
VISUAL = "emacsclient -ca emacs";
|
VISUAL = "emacsclient -ca emacs";
|
||||||
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";
|
||||||
|
|
||||||
@@ -589,7 +574,6 @@ environment.variables = rec {
|
|||||||
# "__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
|
# "__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
|
||||||
|
|
||||||
# Themes
|
# Themes
|
||||||
# GTK_THEME = "Adwaita:light";
|
|
||||||
CALIBRE_USE_SYSTEM_THEME = "1";
|
CALIBRE_USE_SYSTEM_THEME = "1";
|
||||||
|
|
||||||
PATH = [
|
PATH = [
|
||||||
@@ -692,8 +676,10 @@ services = {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
avahi.enable = true;
|
avahi = {
|
||||||
avahi.nssmdns = true;
|
enable = true;
|
||||||
|
nssmdns = true;
|
||||||
|
};
|
||||||
fstrim.enable = true;
|
fstrim.enable = true;
|
||||||
btrfs.autoScrub = {
|
btrfs.autoScrub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -703,9 +689,10 @@ services = {
|
|||||||
"/mnt/disk2"
|
"/mnt/disk2"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
openssh = {
|
openssh = let sshPort = 25152; in {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [ 25152 ];
|
ports = [ sshPort ];
|
||||||
|
openFirewall = true;
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
KbdInteractiveAuthentication = false;
|
KbdInteractiveAuthentication = false;
|
||||||
@@ -714,7 +701,7 @@ services = {
|
|||||||
listenAddresses = [
|
listenAddresses = [
|
||||||
{
|
{
|
||||||
addr = "0.0.0.0";
|
addr = "0.0.0.0";
|
||||||
port = 25152;
|
port = sshPort;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -875,6 +862,7 @@ services.nfs = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* FINAL SYSTEM CONFIGURATIONS
|
* FINAL SYSTEM CONFIGURATIONS
|
||||||
The first setting creates a copy the NixOS configuration file and link it from
|
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
|
the resulting system (/run/current-system/configuration.nix). This is useful in
|
||||||
|
|||||||
Reference in New Issue
Block a user