further up modularization

This commit is contained in:
Danilo Reyes 2024-05-11 19:30:43 -06:00
parent 71a33608d9
commit 0380c32b9a
9 changed files with 114 additions and 88 deletions

View File

@ -22,6 +22,7 @@ in {
internet.enable = true; internet.enable = true;
multimedia.enable = true; multimedia.enable = true;
office.enable = true; office.enable = true;
# misc.enable = true;
}; };
dev = { dev = {
haskell.enable = true; haskell.enable = true;
@ -29,7 +30,11 @@ in {
python.enable = true; python.enable = true;
gameDev.enable = true; gameDev.enable = true;
}; };
shell = { exercism.enable = true; }; shell = {
exercism.enable = true;
# multimedia.enable = true;
# tools.enable = true;
};
services = { services = {
network.enable = true; network.enable = true;
nvidia.enable = true; nvidia.enable = true;
@ -42,7 +47,6 @@ in {
hostName = "workstation"; hostName = "workstation";
firewall = let firewall = let
openPorts = [ openPorts = [
7860 # chatgpt
6674 # ns-usbloader 6674 # ns-usbloader
]; ];
openPortRanges = [{ openPortRanges = [{
@ -75,11 +79,9 @@ in {
}; };
}; };
nixpkgs = { nixpkgs.config = {
config = { allowUnfree = true;
allowUnfree = true; permittedInsecurePackages = [ ];
permittedInsecurePackages = [ ];
};
}; };
users = { users = {
@ -97,32 +99,8 @@ in {
}; };
jawz = { jawz = {
packages = (with pkgs; [ packages = (with pkgs; [
obs-studio # screen recorder & streamer
pitivi # video editor
gocryptfs # encrypted filesystem! shhh!!! gocryptfs # encrypted filesystem! shhh!!!
# celeste # sync tool for any cloud provider
# czkawka # duplicate finder
# sequeler # friendly SQL client
blanket # background noise
metadata-cleaner # remove any metadata and geolocation from files
pika-backup # backups
gnome-obfuscate # censor private information
ripgrep # modern grep
du-dust # rusty du similar to gdu
eza # like ls but with colors
fd # modern find, faster searches
ffmpeg # not ffmpreg, the coolest video conversion tool!
fzf # fuzzy finder! super cool and useful
gallery-dl # similar to yt-dlp but for most image gallery websites
gdu # disk-space utility checker, somewhat useful
imagemagick # photoshop what??
rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS
tldr # man for retards
trash-cli # oop! did not meant to delete that
yt-dlp # downloads videos from most video websites
torrenttools # create torrent files from the terminal! torrenttools # create torrent files from the terminal!
vcsi # video thumbnails for torrents, can I replace it with ^? vcsi # video thumbnails for torrents, can I replace it with ^?
@ -137,16 +115,6 @@ in {
(writeScriptBin "pika-list" (writeScriptBin "pika-list"
(builtins.readFile ../../scripts/pika-list.sh)) (builtins.readFile ../../scripts/pika-list.sh))
# required (optionally) by doom emacs, but still are rather useful
tree-sitter # code parsing based on symbols and shit, I do not get it
graphviz # graphs
tetex
languagetool # proofreader for English
# these two are for doom everywhere
xorg.xwininfo
xdotool
xclip
# SH # SH
bashdb # autocomplete bashdb # autocomplete
shellcheck # linting shellcheck # linting
@ -159,39 +127,29 @@ in {
nodejs # not as bad as I thought nodejs # not as bad as I thought
jq # linting jq # linting
]) ++ (with pkgs.python3Packages; [ ]) ++ (with pkgs.python3Packages;
(buildPythonApplication rec { [
pname = "download"; (buildPythonApplication rec {
version = "1.5"; pname = "download";
src = ../../scripts/download/.; version = "1.5";
doCheck = false; src = ../../scripts/download/.;
buildInputs = [ setuptools ]; doCheck = false;
propagatedBuildInputs = [ pyyaml types-pyyaml ]; buildInputs = [ setuptools ];
}) propagatedBuildInputs = [ pyyaml types-pyyaml ];
(buildPythonApplication rec { })
pname = "ffpb";
version = "0.4.1";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-7eVqbLpMHS1sBw2vYS4cTtyVdnnknGtEI8190VlXflk=";
};
doCheck = false;
buildInputs = [ setuptools ];
propagatedBuildInputs = [ tqdm ];
})
]) ++ (with pkgs.nodePackages; [ ]) ++ (with pkgs.nodePackages; [
# Language servers # Language servers
dockerfile-language-server-nodejs dockerfile-language-server-nodejs
yaml-language-server yaml-language-server
bash-language-server bash-language-server
vscode-json-languageserver vscode-json-languageserver
pyright pyright
markdownlint-cli # Linter markdownlint-cli # Linter
prettier # Linter prettier # Linter
pnpm # Package manager pnpm # Package manager
]); ]);
}; # <--- end of package list }; # <--- end of package list
}; };
}; };
@ -207,17 +165,18 @@ in {
''; '';
}; };
programs.kdeconnect = { programs = {
enable = true; kdeconnect = {
package = pkgs.gnomeExtensions.gsconnect; enable = true;
package = pkgs.gnomeExtensions.gsconnect;
};
# nh = {
# enable = true;
# clean.enable = true;
# clean.extraArgs = "--keep-since 4d --keep 3";
# };
}; };
# programs.nh = {
# enable = true;
# clean.enable = true;
# clean.extraArgs = "--keep-since 4d --keep 3";
# };
services.resilio = { services.resilio = {
deviceName = "chichis"; deviceName = "chichis";
enable = true; enable = true;

View File

@ -7,6 +7,7 @@
./apps/internet.nix ./apps/internet.nix
./apps/multimedia.nix ./apps/multimedia.nix
./apps/office.nix ./apps/office.nix
./apps/misc.nix
]; ];
my = { my = {
dev.gameDev.enable = lib.mkDefault false; dev.gameDev.enable = lib.mkDefault false;
@ -18,6 +19,7 @@
internet.enable = lib.mkDefault false; internet.enable = lib.mkDefault false;
multimedia.enable = lib.mkDefault false; multimedia.enable = lib.mkDefault false;
office.enable = lib.mkDefault false; office.enable = lib.mkDefault false;
misx.enable = lib.mkDefault false;
}; };
}; };
} }

14
modules/apps/misc.nix Normal file
View File

@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }: {
options.my.apps.misc.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.apps.misc.enable {
users.users.jawz.packages = with pkgs; [
# celeste # sync tool for any cloud provider
# czkawka # duplicate finder
# sequeler # friendly SQL client
blanket # background noise
metadata-cleaner # remove any metadata and geolocation from files
pika-backup # backups
gnome-obfuscate # censor private information
];
};
}

View File

@ -2,6 +2,8 @@
options.my.apps.multimedia.enable = lib.mkEnableOption "enable"; options.my.apps.multimedia.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.apps.multimedia.enable { config = lib.mkIf config.my.apps.multimedia.enable {
users.users.jawz.packages = with pkgs; [ users.users.jawz.packages = with pkgs; [
obs-studio # screen recorder & streamer
pitivi # video editor
celluloid # video player celluloid # video player
curtail # image compressor curtail # image compressor
easyeffects # equalizer easyeffects # equalizer

View File

@ -6,6 +6,7 @@
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?
nixd # language server
]); ]);
}; };
} }

View File

@ -3,7 +3,17 @@
config = lib.mkIf config.my.emacs.enable { config = lib.mkIf config.my.emacs.enable {
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; ([
fd # modern find, faster searches fd # modern find, faster searches
fzf # fuzzy finder! super cool and useful
ripgrep # modern grep ripgrep # modern grep
tree-sitter # code parsing based on symbols and shit, I do not get it
graphviz # graphs
tetex # export pdf
languagetool # proofreader for English
# doom everywhere
xorg.xwininfo
xdotool
xclip
]); ]);
services.emacs = { services.emacs = {
enable = true; enable = true;
@ -17,8 +27,8 @@
nix-shell -p cmake sqlite --command "doom sync && nix-shell -p cmake sqlite --command "doom sync &&
sc restart emacs && sc restart emacs &&
emacsclient -e '(org-roam-db-sync)'" && emacsclient -e '(org-roam-db-sync)'" &&
doom sync doom sync
} }
''; '';
}; };
} }

View File

@ -1,10 +1,10 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
imports = [ ./shell/exercism.nix ./dev/python.nix ./dev/haskell.nix ]; imports = [ ./shell/exercism.nix ./shell/multimedia.nix ./shell/tools.nix ];
my = { my = {
shell = { exercism.enable = lib.mkDefault false; }; shell = {
dev = { exercism.enable = lib.mkDefault false;
haskell.enable = lib.mkDefault false; multimedia.enable = lib.mkDefault false;
python.enable = lib.mkDefault false; tools.enable = lib.mkDefault false;
}; };
}; };
} }

View File

@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }: {
options.my.shell.multimedia.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.shell.multimedia.enable {
users.users.jawz.packages = with pkgs; [
gallery-dl # similar to yt-dlp but for most image gallery websites
yt-dlp # downloads videos from most video websites
ffmpeg # not ffmpreg, the coolest video conversion tool!
imagemagick # photoshop what??
(buildPythonApplication rec {
pname = "ffpb";
version = "0.4.1";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-7eVqbLpMHS1sBw2vYS4cTtyVdnnknGtEI8190VlXflk=";
};
doCheck = false;
buildInputs = [ setuptools ];
propagatedBuildInputs = [ tqdm ];
})
];
};
}

16
modules/shell/tools.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }: {
options.my.shell.tools.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.shell.tools.enable {
users.users.jawz.packages = with pkgs; [
ripgrep # modern grep
du-dust # rusty du similar to gdu
eza # like ls but with colors
fd # modern find, faster searches
fzf # fuzzy finder! super cool and useful
gdu # disk-space utility checker, somewhat useful
rmlint # amazing dupe finder that integrates well with BTRFS
tldr # man for retards
trash-cli # oop! did not meant to delete that
];
};
}