probably broken, car ride modularizing

This commit is contained in:
Danilo Reyes 2024-06-07 17:07:21 -06:00
parent f9a7f9d8de
commit 46cdbd8a09
23 changed files with 639 additions and 360 deletions

View File

@ -1,4 +1,12 @@
{ config, lib, pkgs, inputs, outputs, ... }: { {
config,
lib,
pkgs,
inputs,
outputs,
...
}:
{
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
./modules/apps.nix ./modules/apps.nix
@ -11,8 +19,10 @@
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs outputs; }; extraSpecialArgs = {
users.jawz = import ./home-manager/default.nix; inherit inputs outputs;
};
users.jawz = import ./home-manager.nix;
}; };
system.stateVersion = "24.05"; system.stateVersion = "24.05";
time = { time = {
@ -21,7 +31,9 @@
}; };
i18n = { i18n = {
defaultLocale = "en_CA.UTF-8"; defaultLocale = "en_CA.UTF-8";
extraLocaleSettings = { LC_MONETARY = "es_MX.UTF-8"; }; extraLocaleSettings = {
LC_MONETARY = "es_MX.UTF-8";
};
}; };
console = { console = {
font = "Lat2-Terminus16"; font = "Lat2-Terminus16";
@ -34,12 +46,14 @@
enable = true; enable = true;
wheelNeedsPassword = false; wheelNeedsPassword = false;
}; };
pam.loginLimits = [{ pam.loginLimits = [
domain = "*"; {
type = "soft"; domain = "*";
item = "nofile"; type = "soft";
value = "8192"; item = "nofile";
}]; value = "8192";
}
];
}; };
nix = { nix = {
optimise.automatic = true; optimise.automatic = true;
@ -49,7 +63,10 @@
}; };
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [
"nix-command"
"flakes"
];
substituters = [ substituters = [
"https://nix-gaming.cachix.org" "https://nix-gaming.cachix.org"
"https://nixpkgs-python.cachix.org" "https://nixpkgs-python.cachix.org"
@ -68,7 +85,9 @@
]; ];
}; };
}; };
documentation = { enable = false; }; documentation = {
enable = false;
};
users.groups.piracy.gid = 985; users.groups.piracy.gid = 985;
environment = { environment = {
systemPackages = with pkgs; [ wget ]; systemPackages = with pkgs; [ wget ];
@ -81,56 +100,31 @@
XDG_STATE_HOME = "\${HOME}/.local/state"; XDG_STATE_HOME = "\${HOME}/.local/state";
# DEV PATH # DEV PATH
CABAL_DIR = "${XDG_CACHE_HOME}/cabal";
CARGO_HOME = "${XDG_DATA_HOME}/cargo";
GEM_HOME = "${XDG_DATA_HOME}/ruby/gems"; GEM_HOME = "${XDG_DATA_HOME}/ruby/gems";
GEM_PATH = "${XDG_DATA_HOME}/ruby/gems"; GEM_PATH = "${XDG_DATA_HOME}/ruby/gems";
GEM_SPEC_CACHE = "${XDG_DATA_HOME}/ruby/specs"; GEM_SPEC_CACHE = "${XDG_DATA_HOME}/ruby/specs";
GOPATH = "${XDG_DATA_HOME}/go"; GOPATH = "${XDG_DATA_HOME}/go";
NPM_CONFIG_USERCONFIG = "${XDG_CONFIG_HOME}/npm/npmrc";
PNPM_HOME = "${XDG_DATA_HOME}/pnpm";
PSQL_HISTORY = "${XDG_DATA_HOME}/psql_history"; PSQL_HISTORY = "${XDG_DATA_HOME}/psql_history";
REDISCLI_HISTFILE = "${XDG_DATA_HOME}/redis/rediscli_history"; REDISCLI_HISTFILE = "${XDG_DATA_HOME}/redis/rediscli_history";
WINEPREFIX = "${XDG_DATA_HOME}/wine"; WINEPREFIX = "${XDG_DATA_HOME}/wine";
PYTHONSTARTUP = "${XDG_CONFIG_HOME}/python/pythonrc";
STACK_ROOT = "${XDG_DATA_HOME}/stack";
# OPTIONS # 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"; ELECTRUMDIR = "${XDG_DATA_HOME}/electrum";
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";
# NVIDIA # NVIDIA
CUDA_CACHE_PATH = "${XDG_CACHE_HOME}/nv"; CUDA_CACHE_PATH = "${XDG_CACHE_HOME}/nv";
# Themes # Themes
# WEBKIT_DISABLE_COMPOSITING_MODE = "1"; # WEBKIT_DISABLE_COMPOSITING_MODE = "1";
CALIBRE_USE_SYSTEM_THEME = "1";
PATH = [ PATH = [ "\${HOME}/.local/bin" ];
"\${HOME}/.local/bin"
"${XDG_CONFIG_HOME}/emacs/bin"
"${XDG_DATA_HOME}/npm/bin"
"${XDG_DATA_HOME}/pnpm"
];
}; };
}; };
programs = { programs = {
nh.enable = true; nh.enable = true;
starship.enable = true;
tmux.enable = true;
fzf.fuzzyCompletion = true;
neovim = {
enable = true;
vimAlias = true;
};
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;

View File

@ -9,35 +9,38 @@
displayManager.gdm.enable = true; displayManager.gdm.enable = true;
desktopManager.gnome = { desktopManager.gnome = {
enable = true; enable = true;
# extraGSettingsOverridePackages = [ pkgs.gnome.mutter ]; extraGSettingsOverridePackages = [ pkgs.gnome.mutter ];
# extraGSettingsOverrides = '' extraGSettingsOverrides = ''
# [org.gnome.mutter] [org.gnome.mutter]
# experimental-features=['variable-refresh-rate', 'scale-monitor-framebuffer'] experimental-features=['variable-refresh-rate', 'scale-monitor-framebuffer']
# ''; '';
}; };
}; };
}; };
environment.gnome.excludePackages = (with pkgs; [ environment.gnome.excludePackages =
gnome-photos (with pkgs; [
gnome-tour gnome-photos
gnome-text-editor gnome-tour
gnome-connections gnome-text-editor
# gnome-shell-extensions gnome-connections
baobab # gnome-shell-extensions
]) ++ (with pkgs.gnome; [ baobab
# totem ])
gnome-music ++ (with pkgs.gnome; [
epiphany # totem
gnome-characters gnome-music
yelp epiphany
gnome-font-viewer gnome-characters
cheese yelp
]); gnome-font-viewer
cheese
]);
qt = { qt = {
enable = true; enable = true;
style = "adwaita"; style = "adwaita";
}; };
users.users.jawz.packages = with pkgs; users.users.jawz.packages =
with pkgs;
([ ([
# ffmpegthumbnailer # generate thumbnails # ffmpegthumbnailer # generate thumbnails
adw-gtk3 # theme legacy applications adw-gtk3 # theme legacy applications
@ -46,7 +49,8 @@
# gradience # theme customizer, allows you to modify adw-gtk3 themes # gradience # theme customizer, allows you to modify adw-gtk3 themes
# lm_sensors # for extension, displays cpu temp # lm_sensors # for extension, displays cpu temp
libgda # for pano shell extension libgda # for pano shell extension
]) ++ (with pkgs.gnomeExtensions; [ ])
++ (with pkgs.gnomeExtensions; [
appindicator # applets for open applications appindicator # applets for open applications
reading-strip # like putting a finger on every line I read reading-strip # like putting a finger on every line I read
tactile # window manager tactile # window manager

83
home-manager.nix Normal file
View File

@ -0,0 +1,83 @@
{
config,
lib,
pkgs,
inputs,
outputs,
...
}:
{
home.stateVersion = "24.05";
programs.bash = {
enable = true;
historyFile = "\${XDG_STATE_HOME}/bash/history";
historyControl = [
"erasedups"
"ignorespace"
"ignoredups"
];
shellAliases = {
cp = "cp -i";
mv = "mv -i";
mkdir = "mkdir -p";
".." = "cd ..";
"..." = "cd ../..";
".3" = "cd ../../..";
".4" = "cd ../../../..";
".5" = "cd ../../../../..";
c = "cat";
sc = "systemctl --user";
jc = "journalctl --user -xefu";
open-gallery = ''
cd /mnt/pool/scrapping/JawZ/gallery-dl &&
xdg-open "$(fd . ./ Husbands -tdirectory -d 1 | fzf -i)"'';
};
enableVteIntegration = true;
initExtra = ''
$HOME/.local/bin/pokemon-colorscripts -r --no-title
export command_timeout=60
nixos-reload () {
NIXOSDIR=/home/jawz/Development/NixOS
# nix-store --add-fixed sha256 \
# $NIXOSDIR/PureRef-1.11.1_x64.Appimage
fd --full-path $NIXOSDIR -e nix -x nixfmt \;
sudo nixos-rebuild switch \
--flake "$NIXOSDIR/#$HOSTNAME" \
| nom
}
'';
};
xdg = {
enable = true;
userDirs = {
enable = true;
createDirectories = false;
desktop = "${config.home.homeDirectory}";
documents = "${config.home.homeDirectory}/Documents";
download = "${config.home.homeDirectory}/Downloads";
music = "${config.home.homeDirectory}/Music";
pictures = "${config.home.homeDirectory}/Pictures";
templates = "${config.xdg.dataHome}/Templates";
videos = "${config.home.homeDirectory}/Videos";
};
configFile = {
"wgetrc".source = ../dotfiles/wget/wgetrc;
};
};
programs = {
helix.enable = true;
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
git = {
enable = true;
userName = "Danilo Reyes";
userEmail = "CaptainJawZ@protonmail.com";
};
};
}

View File

@ -1,125 +0,0 @@
{ config, lib, pkgs, inputs, outputs, ... }: {
home.stateVersion = "24.05";
programs.bash = {
enable = true;
historyFile = "\${XDG_STATE_HOME}/bash/history";
historyControl = [ "erasedups" "ignorespace" "ignoredups" ];
shellAliases = {
hh = "hstr";
ls = "eza --icons --group-directories-first";
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)"'';
cp = "cp -i";
mv = "mv -i";
mkdir = "mkdir -p";
rm = "trash";
".." = "cd ..";
"..." = "cd ../..";
".3" = "cd ../../..";
".4" = "cd ../../../..";
".5" = "cd ../../../../..";
dl = "download -u jawz -i";
e = "edit";
c = "cat";
b = "bat";
f = "fzf --multi --exact -i";
sc = "systemctl --user";
jc = "journalctl --user -xefu";
open-gallery = ''
cd /mnt/pool/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'';
};
enableVteIntegration = true;
initExtra = ''
$HOME/.local/bin/pokemon-colorscripts -r --no-title
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
export command_timeout=60
if command -v fzf-share >/dev/null; then
source "$(fzf-share)/key-bindings.bash"
source "$(fzf-share)/completion.bash"
fi
nixos-reload () {
NIXOSDIR=/home/jawz/Development/NixOS
# nix-store --add-fixed sha256 \
# $NIXOSDIR/PureRef-1.11.1_x64.Appimage
fd --full-path $NIXOSDIR -e nix -x nixfmt \;
sudo nixos-rebuild switch \
--flake "$NIXOSDIR/#$HOSTNAME" \
| nom
}
'';
};
xdg = {
enable = true;
userDirs = {
enable = true;
createDirectories = false;
desktop = "${config.home.homeDirectory}";
documents = "${config.home.homeDirectory}/Documents";
download = "${config.home.homeDirectory}/Downloads";
music = "${config.home.homeDirectory}/Music";
pictures = "${config.home.homeDirectory}/Pictures";
templates = "${config.xdg.dataHome}/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;
"python/pythonrc".source = ../dotfiles/pythonrc;
};
};
programs = {
helix = { enable = true; };
hstr.enable = true;
zoxide = {
enable = true;
enableBashIntegration = true;
};
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
bat = {
enable = true;
config = {
pager = "less -FR";
theme = "base16";
};
extraPackages = with pkgs.bat-extras; [
batman # man pages
batpipe # piping
batgrep # ripgrep
batdiff # this is getting crazy!
batwatch # probably my next best friend
prettybat # trans your sourcecode!
];
};
git = {
enable = true;
userName = "Danilo Reyes";
userEmail = "CaptainJawZ@protonmail.com";
};
htop = {
enable = true;
package = pkgs.htop-vim;
};
};
services = { lorri.enable = true; };
}

View File

@ -1,15 +1,17 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
imports = [ imports = [
# <agenix/modules/age.nix> # <agenix/modules/age.nix>
./hardware-configuration.nix ./hardware-configuration.nix
../../base.nix ../../base.nix
../../gnome.nix ../../gnome.nix
./obs-studio.nix ../../pkgs/obs-studio.nix
]; ];
programs.obs-studio = {
enable = true;
enableVirtualCamera = true;
};
my = { my = {
emacs.enable = true; emacs.enable = true;
apps = { apps = {
@ -53,40 +55,46 @@
networking = { networking = {
hostName = "workstation"; hostName = "workstation";
firewall = let firewall =
openPorts = [ let
6674 # ns-usbloader openPorts = [
]; 6674 # ns-usbloader
openPortRanges = [{ ];
from = 1714; # kdeconnect openPortRanges = [
to = 1764; # kdeconnect {
}]; from = 1714; # kdeconnect
in { to = 1764; # kdeconnect
allowedTCPPorts = openPorts; }
allowedUDPPorts = openPorts; ];
allowedTCPPortRanges = openPortRanges; in
allowedUDPPortRanges = openPortRanges; {
}; allowedTCPPorts = openPorts;
allowedUDPPorts = openPorts;
allowedTCPPortRanges = openPortRanges;
allowedUDPPortRanges = openPortRanges;
};
}; };
nix = let nix =
featuresList = [ let
"nixos-test" featuresList = [
"benchmark" "nixos-test"
"big-parallel" "benchmark"
"kvm" "big-parallel"
"gccarch-znver3" "kvm"
"gccarch-skylake" "gccarch-znver3"
"gccarch-alderlake" "gccarch-skylake"
]; "gccarch-alderlake"
in { ];
distributedBuilds = true; in
settings = { {
cores = 16; distributedBuilds = true;
trusted-users = [ "nixremote" ]; settings = {
system-features = featuresList; cores = 16;
trusted-users = [ "nixremote" ];
system-features = featuresList;
};
}; };
};
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
@ -96,11 +104,14 @@
users = { users = {
groups.nixremote.gid = 555; groups.nixremote.gid = 555;
users = { users = {
jawz.packages = (with pkgs; [ jawz.packages = (
gocryptfs # encrypted filesystem! shhh!!! with pkgs;
torrenttools # create torrent files from the terminal! [
vcsi # video thumbnails for torrents, can I replace it with ^? gocryptfs # encrypted filesystem! shhh!!!
]); torrenttools # create torrent files from the terminal!
vcsi # video thumbnails for torrents, can I replace it with ^?
]
);
nixremote = { nixremote = {
isNormalUser = true; isNormalUser = true;
createHome = true; createHome = true;
@ -130,11 +141,10 @@
enable = true; enable = true;
package = pkgs.gnomeExtensions.gsconnect; package = pkgs.gnomeExtensions.gsconnect;
}; };
# nh = { obs-studio = {
# enable = true; enable = true;
# clean.enable = true; enableVirtualCamera = true;
# clean.extraArgs = "--keep-since 4d --keep 3"; };
# };
}; };
services.resilio = { services.resilio = {
@ -151,11 +161,7 @@
virtualisation = { virtualisation = {
podman = { podman = {
enable = true; enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true; dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true; defaultNetwork.settings.dns_enabled = true;
}; };
}; };

View File

@ -1,9 +1,15 @@
{ config, pkgs, modulesPath, lib, ... }: { {
config,
pkgs,
modulesPath,
lib,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
hardware = { hardware = {
cpu.amd.updateMicrocode = cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
lib.mkDefault config.hardware.enableRedistributableFirmware;
bluetooth = { bluetooth = {
enable = true; enable = true;
settings.General = { settings.General = {
@ -48,62 +54,74 @@
device = "/dev/disk/by-uuid/e9618e85-a631-4374-b2a4-22c376d6e41b"; device = "/dev/disk/by-uuid/e9618e85-a631-4374-b2a4-22c376d6e41b";
preLVM = true; preLVM = true;
}; };
# extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
# extraModprobeConfig = ''
# options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
# '';
initrd = { initrd = {
availableKernelModules = availableKernelModules = [
[ "xhci_pci" "ahci" "usbhid" "nvme" "usb_storage" "sd_mod" ]; "xhci_pci"
"ahci"
"usbhid"
"nvme"
"usb_storage"
"sd_mod"
];
kernelModules = [ ]; kernelModules = [ ];
}; };
}; };
fileSystems = let fileSystems =
nfsMount = (server: nfsDisk: { let
device = "${server}:/${nfsDisk}"; nfsMount = (
fsType = "nfs"; server: nfsDisk: {
options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ]; device = "${server}:/${nfsDisk}";
}); fsType = "nfs";
btrfsMount = subvol: { options = [
device = "/dev/mapper/nvme"; "x-systemd.automount"
fsType = "btrfs"; "noauto"
options = [ "x-systemd.idle-timeout=600"
"subvol=${subvol}" ];
"ssd" }
"compress=lzo" );
"x-systemd.device-timeout=0" btrfsMount = subvol: {
"space_cache=v2" device = "/dev/mapper/nvme";
"commit=120" fsType = "btrfs";
"datacow" options = [
] ++ (if subvol == "nixos" then [ "noatime" ] else [ ]); "subvol=${subvol}"
}; "ssd"
in { "compress=lzo"
"/" = btrfsMount "nixos" // { }; "x-systemd.device-timeout=0"
"/home" = btrfsMount "home" // { }; "space_cache=v2"
"/mnt/games" = btrfsMount "games" // { }; "commit=120"
"/mnt/miniserver/pool" = nfsMount "miniserver" "pool" // { }; "datacow"
"/mnt/miniserver/jawz" = nfsMount "miniserver" "jawz" // { }; ] ++ (if subvol == "nixos" then [ "noatime" ] else [ ]);
#"/mnt/server/pool" = nfsMount "server" "pool" // { }; };
#"/mnt/server/jawz" = nfsMount "server" "jawz" // { }; in
# "/mnt/miniserver/btrfs" = nfsMount "btrfs" // { }; {
"/boot" = { "/" = btrfsMount "nixos" // { };
device = "/dev/disk/by-uuid/ac6d349a-96b9-499e-9009-229efd7743a5"; "/home" = btrfsMount "home" // { };
fsType = "ext4"; "/mnt/games" = btrfsMount "games" // { };
}; "/mnt/miniserver/pool" = nfsMount "miniserver" "pool" // { };
"/boot/efi" = { "/mnt/miniserver/jawz" = nfsMount "miniserver" "jawz" // { };
device = "/dev/disk/by-uuid/B05D-B5FB"; #"/mnt/server/pool" = nfsMount "server" "pool" // { };
fsType = "vfat"; #"/mnt/server/jawz" = nfsMount "server" "jawz" // { };
}; # "/mnt/miniserver/btrfs" = nfsMount "btrfs" // { };
"/boot" = {
device = "/dev/disk/by-uuid/ac6d349a-96b9-499e-9009-229efd7743a5";
fsType = "ext4";
};
"/boot/efi" = {
device = "/dev/disk/by-uuid/B05D-B5FB";
fsType = "vfat";
};
};
swapDevices = [{
device = "/dev/disk/by-partuuid/c1bd22d7-e62c-440a-88d1-6464be1aa1b0";
randomEncryption = {
enable = true;
cipher = "aes-xts-plain64";
keySize = 512;
sectorSize = 4096;
}; };
}]; swapDevices = [
{
device = "/dev/disk/by-partuuid/c1bd22d7-e62c-440a-88d1-6464be1aa1b0";
randomEncryption = {
enable = true;
cipher = "aes-xts-plain64";
keySize = 512;
sectorSize = 4096;
};
}
];
} }

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
options.my.apps.office.enable = lib.mkEnableOption "enable"; options.my.apps.office.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.apps.office.enable { config = lib.mkIf config.my.apps.office.enable {
users.users.jawz.packages = with pkgs; [ users.users.jawz.packages = with pkgs; [
@ -11,5 +17,8 @@
# wike # gtk wikipedia wow! # wike # gtk wikipedia wow!
# denaro # manage your finances # denaro # manage your finances
]; ];
environment.variables = {
CALIBRE_USE_SYSTEM_THEME = "1";
};
}; };
} }

View File

@ -1,7 +1,16 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
options.my.dev.docker.enable = lib.mkEnableOption "enable"; options.my.dev.docker.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.docker.enable { config = lib.mkIf config.my.dev.docker.enable {
users.users.jawz.packages = (with pkgs; [ dockfmt ]) users.users.jawz.packages =
++ (with pkgs.nodePackages; [ dockerfile-language-server-nodejs ]); (with pkgs; [ dockfmt ]) ++ (with pkgs.nodePackages; [ dockerfile-language-server-nodejs ]);
};
environment.variables = {
DOCKER_CONFIG = "${XDG_CONFIG_HOME}/docker";
}; };
} }

View File

@ -1,9 +1,21 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
options.my.dev.haskell.enable = lib.mkEnableOption "enable"; options.my.dev.haskell.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.haskell.enable { config = lib.mkIf config.my.dev.haskell.enable {
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; ([
ghc # compiler ghc # compiler
haskell-language-server # lsp haskell-language-server # lsp
]); ]);
environment.variables = {
CABAL_DIR = "${XDG_CACHE_HOME}/cabal";
CARGO_HOME = "${XDG_DATA_HOME}/cargo";
STACK_ROOT = "${XDG_DATA_HOME}/stack";
GHCUP_USE_XDG_DIRS = "true";
};
}; };
} }

View File

@ -1,7 +1,28 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
options.my.dev.javascript.enable = lib.mkEnableOption "enable"; options.my.dev.javascript.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.javascript.enable { config = lib.mkIf config.my.dev.javascript.enable {
users.users.jawz.packages = (with pkgs; [ nodejs ]) home-manager.users.jawz.programs.xdg.configFile = {
++ (with pkgs.nodePackages; [ pnpm ]); "npm/npmrc".source = ../dotfiles/npm/npmrc;
"configstore/update-notifier-npm-check.json".source = ../dotfiles/npm/update-notifier-npm-check.json;
};
users.users.jawz.packages = (with pkgs; [ nodejs ]) ++ (with pkgs.nodePackages; [ pnpm ]);
environment.variables = {
NPM_CONFIG_USERCONFIG = "${XDG_CONFIG_HOME}/npm/npmrc";
PNPM_HOME = "${XDG_DATA_HOME}/pnpm";
PATH = [
"${XDG_DATA_HOME}/npm/bin"
"${XDG_DATA_HOME}/pnpm"
];
};
environment.variables = {
VISUAL = "emacsclient -ca emacs";
PATH = [ "${XDG_CONFIG_HOME}/emacs/bin" ];
};
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
options.my.dev.nix.enable = lib.mkEnableOption "enable"; options.my.dev.nix.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.nix.enable { config = lib.mkIf config.my.dev.nix.enable {
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; ([

View File

@ -1,24 +1,38 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
options.my.dev.python.enable = lib.mkEnableOption "enable"; options.my.dev.python.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.python.enable { config = lib.mkIf config.my.dev.python.enable {
users.users.jawz.packages = (with pkgs; ([ home-manager.users.jawz.programs.xdg.configFile = {
pipenv # python development workflow for humans "python/pythonrc".source = ../dotfiles/pythonrc;
(python3.withPackages (ps: };
with ps; [ users.users.jawz.packages =
black # Python code formatter (with pkgs; ([
editorconfig # follow rules of contributin pipenv # python development workflow for humans
flake8 # wraper for pyflakes, pycodestyle and mccabe (python3.withPackages (
isort # sort Python imports ps: with ps; [
pyflakes # checks source code for errors black # Python code formatter
pylint # bug and style checker for python editorconfig # follow rules of contributin
speedtest-cli # check internet speed from the comand line flake8 # wraper for pyflakes, pycodestyle and mccabe
# nose # testing and running python scripts isort # sort Python imports
# poetry # dependency management made easy pyflakes # checks source code for errors
# pytest # framework for writing tests pylint # bug and style checker for python
])) speedtest-cli # check internet speed from the comand line
])) ++ (with pkgs.nodePackages; # nose # testing and running python scripts
[ # poetry # dependency management made easy
# pytest # framework for writing tests
]
))
]))
++ (with pkgs.nodePackages; [
pyright # LSP pyright # LSP
]); ]);
environment.variables = {
PYTHONSTARTUP = "${XDG_CONFIG_HOME}/python/pythonrc";
};
}; };
} }

View File

@ -1,10 +1,18 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
options.my.dev.sh.enable = lib.mkEnableOption "enable"; options.my.dev.sh.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.sh.enable { config = lib.mkIf config.my.dev.sh.enable {
users.users.jawz.packages = (with pkgs; [ users.users.jawz.packages =
bashdb # autocomplete (with pkgs; [
shellcheck # linting bashdb # autocomplete
shfmt # a shell parser and formatter shellcheck # linting
]) ++ (with pkgs.nodePackages; [ bash-language-server ]); shfmt # a shell parser and formatter
])
++ (with pkgs.nodePackages; [ bash-language-server ]);
}; };
} }

View File

@ -1,33 +1,48 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
options.my.emacs.enable = lib.mkEnableOption "enable"; options.my.emacs.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.emacs.enable { config = lib.mkIf config.my.emacs.enable {
users.users.jawz.packages = (with pkgs; ([ home-manager.users.jawz = {
fd # modern find, faster searches programs.bash.shellAliases = {
fzf # fuzzy finder! super cool and useful edit = "emacsclient -t";
ripgrep # modern grep e = "edit";
tree-sitter # code parsing based on symbols and shit, I do not get it };
graphviz # graphs services.lorri.enable = true;
tetex # export pdf };
languagetool # proofreader for English users.users.jawz.packages =
(with pkgs; ([
fd # modern find, faster searches
fzf # fuzzy finder! super cool and useful
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 # doom everywhere
xorg.xwininfo xorg.xwininfo
xdotool xdotool
xclip xclip
# lsps # lsps
yaml-language-server yaml-language-server
markdownlint-cli markdownlint-cli
])) ++ (with pkgs.nodePackages; [ ]))
vscode-json-languageserver ++ (with pkgs.nodePackages; [
# linters vscode-json-languageserver
prettier # linters
]); prettier
]);
services.emacs = { services.emacs = {
enable = true; enable = true;
package = with pkgs; package =
((emacsPackagesFor emacs-gtk).emacsWithPackages with pkgs;
(epkgs: with epkgs; ([ vterm ]))); ((emacsPackagesFor emacs-gtk).emacsWithPackages (epkgs: with epkgs; ([ vterm ])));
defaultEditor = true; defaultEditor = true;
}; };
home-manager.users.jawz.programs.bash.initExtra = '' home-manager.users.jawz.programs.bash.initExtra = ''

View File

@ -1,20 +1,52 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config = { config = {
users.users.jawz.packages = (with pkgs; [ gallery-dl yt-dlp ]); home-manager.users.jawz = {
programs = {
xdg.configFile = {
"gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json;
};
bash = {
shellAliases = {
comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"'';
gallery = ''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
dl = "download -u jawz -i";
};
initExtra = ''
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
'';
};
};
services.lorri.enable = true;
};
users.users.jawz.packages = (with pkgs; [ gallery-dl ]);
my.scripts.download = { my.scripts.download = {
enable = true; enable = true;
install = true; install = true;
service = false; service = false;
name = "download"; name = "download";
package = with pkgs.python3Packages; package =
with pkgs.python3Packages;
(buildPythonApplication rec { (buildPythonApplication rec {
pname = "download"; pname = "download";
version = "2.0"; version = "2.5";
src = ../../scripts/download/.; src = ../../scripts/download/.;
doCheck = false; doCheck = false;
buildInputs = [ setuptools ]; buildInputs = [ setuptools ];
propagatedBuildInputs = [ pyyaml types-pyyaml ]; propagatedBuildInputs = [
pyyaml
types-pyyaml
yt-dlp
];
}); });
}; };
}; };

View File

@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./base.nix ];
config.my.scripts.find-dup-episodes = {
enable = true;
install = true;
service = false;
name = "find-dup-episodes";
package = pkgs.writeScriptBin "find-dup-episodes" (
builtins.readFile ../../scripts/find-dup-episodes.sh
);
};
}

View File

@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./base.nix ];
config.my.scripts.manage-library = {
enable = true;
install = true;
service = true;
name = "manage-library";
timer = "00:30";
description = "scans the library directory and sorts files";
package = pkgs.writeScriptBin "manage-library" (builtins.readFile ../../scripts/manage-library.sh);
};
}

View File

@ -0,0 +1,20 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./base.nix ];
config.my.scripts.nextcloud-cronjob = {
enable = true;
install = false;
service = true;
timer = "*:0/10";
name = "nextcloud-cronjob";
description = "runs tasks for nextcloud";
package = pkgs.writeScriptBin "nextcloud-cronjob" (
builtins.readFile ../../scripts/nextcloud-cronjob.sh
);
};
}

View File

@ -1,11 +1,16 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.run = { config.my.scripts.run = {
enable = true; enable = true;
install = true; install = true;
service = false; service = false;
name = "run"; name = "run";
package = package = pkgs.writeScriptBin "run" (builtins.readFile ../../scripts/run.sh);
pkgs.writeScriptBin "run" (builtins.readFile ../../scripts/run.sh);
}; };
} }

View File

@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./base.nix ];
config.my.scripts.sub-sync = {
enable = true;
install = true;
service = true;
name = "sub-sync";
timer = "22:00";
description = "Syncronixes subtitles downloaded and modified the last day";
package = pkgs.writeScriptBin "sub-sync" (builtins.readFile ../../scripts/sub-sync.sh);
};
}

View File

@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./base.nix ];
config.my.scripts.update-dns = {
enable = true;
install = true;
service = true;
name = "update-dns";
timer = "*:0/30";
description = "Updates the IP of all my domains";
package = pkgs.writeScriptBin "update-dns" (builtins.readFile ../../scripts/update-dns.sh);
};
}

View File

@ -1,6 +1,70 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
options.my.shell.tools.enable = lib.mkEnableOption "enable"; options.my.shell.tools.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.shell.tools.enable { config = lib.mkIf config.my.shell.tools.enable {
home-manager.users.jawz.programs = {
bash = {
initExtra = ''
if command -v fzf-share >/dev/null; then
source "$(fzf-share)/key-bindings.bash"
source "$(fzf-share)/completion.bash"
fi
'';
shellAliases = {
cd = "z";
hh = "hstr";
ls = "eza --icons --group-directories-first";
rm = "trash";
b = "bat";
f = "fzf --multi --exact -i";
unique-extensions = ''
fd -tf | rev | cut -d. -f1 | rev |
tr '[:upper:]' '[:lower:]' | sort |
uniq --count | sort -rn'';
};
};
xdg.configFile = {
"htop/htoprc".source = ../dotfiles/htop/htoprc;
};
hstr.enable = true;
htop = {
enable = true;
package = pkgs.htop-vim;
};
zoxide = {
enable = true;
enableBashIntegration = true;
};
bat = {
enable = true;
config = {
pager = "less -FR";
theme = "base16";
};
extraPackages = with pkgs.bat-extras; [
batman # man pages
batpipe # piping
batgrep # ripgrep
batdiff # this is getting crazy!
batwatch # probably my next best friend
prettybat # trans your sourcecode!
];
};
};
programs = {
starship.enable = true;
tmux.enable = true;
fzf.fuzzyCompletion = true;
neovim = {
enable = true;
vimAlias = true;
};
};
users.users.jawz.packages = with pkgs; [ users.users.jawz.packages = with pkgs; [
ripgrep # modern grep ripgrep # modern grep
du-dust # rusty du similar to gdu du-dust # rusty du similar to gdu
@ -14,4 +78,9 @@
jq # linting jq # linting
]; ];
}; };
environment.variables = {
HISTFILE = "${XDG_STATE_HOME}/bash/history";
LESSHISTFILE = "-";
RIPGREP_CONFIG_PATH = "${XDG_CONFIG_HOME}/ripgrep/ripgreprc";
};
} }

View File

@ -1,9 +1,16 @@
{ pkgs, lib, config, ... }: {
pkgs,
lib,
config,
...
}:
with lib; with lib;
let cfg = config.programs.obs-studio; let
in { cfg = config.programs.obs-studio;
in
{
options.programs.obs-studio = { options.programs.obs-studio = {
enable = mkEnableOption "OBS Studio program"; enable = mkEnableOption "OBS Studio program";