massive lsp evaluated rewrite

This commit is contained in:
Danilo Reyes 2024-06-08 23:54:40 -06:00
parent 6ec6eb239a
commit fd340effd9
46 changed files with 227 additions and 242 deletions

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, outputs, ... }: { { lib, pkgs, inputs, outputs, ... }: {
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
./modules/apps.nix ./modules/apps.nix
@ -8,13 +8,13 @@
./modules/scripts.nix ./modules/scripts.nix
./jawz.nix ./jawz.nix
]; ];
system.stateVersion = "24.05";
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs outputs; }; extraSpecialArgs = { inherit inputs outputs; };
users.jawz = import ./home-manager.nix; users.jawz = import ./home-manager.nix;
}; };
system.stateVersion = "24.05";
time = { time = {
timeZone = "America/Mexico_City"; timeZone = "America/Mexico_City";
hardwareClockInLocalTime = true; hardwareClockInLocalTime = true;
@ -68,7 +68,7 @@
]; ];
}; };
}; };
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 ];

View File

@ -1,6 +1,5 @@
{ {
description = "A very basic flake"; description = "JawZ NixOS flake setup";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
@ -87,6 +86,8 @@
discord = super.discord.override { withOpenASAR = true; }; discord = super.discord.override { withOpenASAR = true; };
ripgrep = super.ripgrep.override { withPCRE2 = true; }; ripgrep = super.ripgrep.override { withPCRE2 = true; };
blender = super.blender.override { cudaSupport = true; }; blender = super.blender.override { cudaSupport = true; };
papirus-icon-theme =
super.papirus-icon-theme.override { color = "adwaita"; };
}) })
]; ];
}) })

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
services = { services = {
@ -37,24 +37,23 @@
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 gnome.gnome-tweaks # tweaks for the gnome desktop environment
gnome.gnome-tweaks # tweaks for the gnome desktop environment papirus-icon-theme # icon theme
(papirus-icon-theme.override { color = "adwaita"; }) # 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 pano # clipboard manager
pano # clipboard manager freon # hardware temperature monitor
freon # hardware temperature monitor # blur-my-shell # make the overview more visually appealing
# blur-my-shell # make the overview more visually appealing # gamemode # I guess I'm a gamer now?
# gamemode # I guess I'm a gamer now? # burn-my-windows
# burn-my-windows # forge # window manager
# forge # window manager ]);
]);
} }

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, outputs, ... }: { { config, ... }: {
home.stateVersion = "24.05"; home.stateVersion = "24.05";
programs.bash = { programs.bash = {
@ -51,7 +51,7 @@
templates = "${config.xdg.dataHome}/Templates"; templates = "${config.xdg.dataHome}/Templates";
videos = "${config.home.homeDirectory}/Videos"; videos = "${config.home.homeDirectory}/Videos";
}; };
configFile = { "wgetrc".source = ../dotfiles/wget/wgetrc; }; configFile = { "wgetrc".source = ./dotfiles/wget/wgetrc; };
}; };
programs = { programs = {
helix.enable = true; helix.enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ imports = [
# <agenix/modules/age.nix> # <agenix/modules/age.nix>
./hardware-configuration.nix ./hardware-configuration.nix
@ -46,7 +46,6 @@
ffmpeg4discord.enable = true; ffmpeg4discord.enable = true;
}; };
}; };
networking = { networking = {
hostName = "workstation"; hostName = "workstation";
firewall = let firewall = let
@ -64,7 +63,6 @@
allowedUDPPortRanges = openPortRanges; allowedUDPPortRanges = openPortRanges;
}; };
}; };
nix = let nix = let
featuresList = [ featuresList = [
"nixos-test" "nixos-test"
@ -83,12 +81,10 @@
system-features = featuresList; system-features = featuresList;
}; };
}; };
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
permittedInsecurePackages = [ ]; permittedInsecurePackages = [ ];
}; };
users = { users = {
groups.nixremote.gid = 555; groups.nixremote.gid = 555;
users = { users = {
@ -109,7 +105,6 @@
}; };
}; };
}; };
environment.etc = { environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = '' "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = { bluez_monitor.properties = {
@ -120,7 +115,6 @@
} }
''; '';
}; };
programs = { programs = {
kdeconnect = { kdeconnect = {
enable = true; enable = true;
@ -131,7 +125,6 @@
enableVirtualCamera = true; enableVirtualCamera = true;
}; };
}; };
services.resilio = { services.resilio = {
deviceName = "chichis"; deviceName = "chichis";
enable = true; enable = true;

View File

@ -48,13 +48,9 @@
device = "/dev/disk/by-uuid/e9618e85-a631-4374-b2a4-22c376d6e41b"; device = "/dev/disk/by-uuid/e9618e85-a631-4374-b2a4-22c376d6e41b";
preLVM = true; preLVM = true;
}; };
initrd = { initrd.availableKernelModules =
availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "nvme" "usb_storage" "sd_mod" ];
[ "xhci_pci" "ahci" "usbhid" "nvme" "usb_storage" "sd_mod" ];
kernelModules = [ ];
};
}; };
fileSystems = let fileSystems = let
nfsMount = (server: nfsDisk: { nfsMount = (server: nfsDisk: {
device = "${server}:/${nfsDisk}"; device = "${server}:/${nfsDisk}";

View File

@ -1,8 +1,7 @@
{ config, lib, pkgs, ... }: { ... }: {
{
users.users.jawz = { users.users.jawz = {
isNormalUser = true; isNormalUser = true;
initialPassword = "password";
extraGroups = [ extraGroups = [
"wheel" "wheel"
"networkmanager" "networkmanager"
@ -15,14 +14,11 @@
"libvirt" "libvirt"
"rslsync" "rslsync"
]; ];
initialPassword = "password"; openssh.authorizedKeys.keys = [
openssh = { "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacerocdreyes@100CDREYES"
authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMkpeIV9G26W2/e9PsjBx3sNwPGoicJ807ExRGh4KjhW jawz@server"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacerocdreyes@100CDREYES" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGjnNIggZweJ+GJKKvFEPhpLcs+t64xXjBmeuERsLFLL jawz@miniserver"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMkpeIV9G26W2/e9PsjBx3sNwPGoicJ807ExRGh4KjhW jawz@server" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBEblxSDhWPEo33crSjooeUg4W02ruENxHLmmBqCuIo jawz@galaxy"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGjnNIggZweJ+GJKKvFEPhpLcs+t64xXjBmeuERsLFLL jawz@miniserver" ];
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBEblxSDhWPEo33crSjooeUg4W02ruENxHLmmBqCuIo jawz@galaxy"
];
};
}; };
} }

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { lib, ... }: {
imports = [ imports = [
./apps/art.nix ./apps/art.nix
./apps/dictionaries.nix ./apps/dictionaries.nix

View File

@ -4,20 +4,21 @@
dev.gameDev.enable = lib.mkEnableOption "enable"; dev.gameDev.enable = lib.mkEnableOption "enable";
}; };
config = lib.mkIf config.my.apps.art.enable { config = lib.mkIf config.my.apps.art.enable {
users.users.jawz.packages = with pkgs; users.users.jawz.packages = (with pkgs; [
[ gimp # the coolest bestest art program to never exist
gimp # the coolest bestest art program to never exist krita # art to your heart desire!
krita # art to your heart desire! mypaint # not the best art program
mypaint # not the best art program mypaint-brushes # but it's got some
mypaint-brushes # but it's got some mypaint-brushes1 # nice damn brushes
mypaint-brushes1 # nice damn brushes pureref # create inspiration/reference boards
pureref # create inspiration/reference boards blender # cgi animation and sculpting
blender # cgi animation and sculpting # drawpile # arty party with friends!!
# drawpile # arty party with friends!! ]) ++ (if config.my.dev.gameDev.enable then
] ++ (if config.my.dev.gameDev.enable then [ with pkgs; [
godot_4 # game development godot_4 # game development
gdtoolkit # gdscript language server gdtoolkit # gdscript language server
] else ]
[ ]); else
[ ]);
}; };
} }

View File

@ -12,7 +12,7 @@ in {
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true;
}; };
}; };
users.users.jawz.packages = with pkgs; [ users.users.jawz.packages = (with pkgs; [
mangohud # fps & stats overlay mangohud # fps & stats overlay
lutris # games launcher & emulator hub lutris # games launcher & emulator hub
cartridges # games launcher cartridges # games launcher
@ -20,7 +20,6 @@ in {
heroic # install epic games heroic # install epic games
protonup-qt # update proton-ge protonup-qt # update proton-ge
#minecraft # minecraft official launcher #minecraft # minecraft official launcher
polymc # minecraft launcher with mod support
ns-usbloader # load games into my switch ns-usbloader # load games into my switch
# grapejuice # roblox manager # grapejuice # roblox manager
@ -32,6 +31,8 @@ in {
#citra-nightly # 3Ds emulator #citra-nightly # 3Ds emulator
snes9x-gtk # snes emulator snes9x-gtk # snes emulator
ryujinx # switch emulator ryujinx # switch emulator
]) ++ [
polymc # minecraft launcher with mod support
]; ];
}; };
} }

View File

@ -11,8 +11,7 @@ in {
}; };
}; };
services.psd.enable = true; services.psd.enable = true;
users.users.jawz.packages = with pkgs; [ users.users.jawz.packages = (with pkgs; [
vdhcoapp # video download helper assistant
nextcloud-client # self-hosted google-drive alternative nextcloud-client # self-hosted google-drive alternative
fragments # beautiful torrent client fragments # beautiful torrent client
protonmail-bridge # bridge for protonmail protonmail-bridge # bridge for protonmail
@ -23,6 +22,8 @@ in {
vesktop # screen share with audio discord vesktop # screen share with audio discord
discord # :3 discord # :3
# hugo # website engine # hugo # website engine
]) ++ [
vdhcoapp # video download helper assistant
]; ];
}; };
} }

View File

@ -1,6 +1,7 @@
{ 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 {
environment.variables.CALIBRE_USE_SYSTEM_THEME = "1";
users.users.jawz.packages = with pkgs; [ users.users.jawz.packages = with pkgs; [
libreoffice # office, but based libreoffice # office, but based
calibre # ugly af eBook library manager calibre # ugly af eBook library manager
@ -11,6 +12,5 @@
# 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,4 +1,4 @@
{ config, lib, pkgs, ... }: { { lib, ... }: {
imports = [ imports = [
./dev/sh.nix ./dev/sh.nix
./dev/nix.nix ./dev/nix.nix

View File

@ -1,8 +1,10 @@
{ 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 ])
++ (with pkgs.nodePackages; [ dockerfile-language-server-nodejs ]);
environment.variables.DOCKER_CONFIG = "\${XDG_CONFIG_HOME}/docker"; environment.variables.DOCKER_CONFIG = "\${XDG_CONFIG_HOME}/docker";
users.users.jawz.packages = with pkgs; [
dockfmt
nodePackages.dockerfile-language-server-nodejs
];
}; };
} }

View File

@ -1,10 +1,10 @@
{ 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 = { environment.variables = {
CABAL_DIR = "\${XDG_CACHE_HOME}/cabal"; CABAL_DIR = "\${XDG_CACHE_HOME}/cabal";
STACK_ROOT = "\${XDG_DATA_HOME}/stack"; STACK_ROOT = "\${XDG_DATA_HOME}/stack";

View File

@ -1,13 +1,12 @@
{ 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 {
home-manager.users.jawz.programs.xdg.configFile = { home-manager.users.jawz.xdg.configFile = {
"npm/npmrc".source = ../dotfiles/npm/npmrc; "npm/npmrc".source = ../../dotfiles/npm/npmrc;
"configstore/update-notifier-npm-check.json".source = "configstore/update-notifier-npm-check.json".source =
../dotfiles/npm/update-notifier-npm-check.json; ../../dotfiles/npm/update-notifier-npm-check.json;
}; };
users.users.jawz.packages = (with pkgs; [ nodejs ]) users.users.jawz.packages = with pkgs; [ nodejs nodePackages.pnpm ];
++ (with pkgs.nodePackages; [ pnpm ]);
environment.variables = { environment.variables = {
NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc"; NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc";
PNPM_HOME = "\${XDG_DATA_HOME}/pnpm"; PNPM_HOME = "\${XDG_DATA_HOME}/pnpm";

View File

@ -1,13 +1,13 @@
{ 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; [
expect # keep color when nom'ing expect # keep color when nom'ing
nix-output-monitor # autistic nix builds nix-output-monitor # autistic nix builds
nixfmt-classic # linting nixfmt-classic # linting
nixfmt-rfc-style # linting nixfmt-rfc-style # linting
cachix # why spend time compiling? cachix # why spend time compiling?
nixd # language server nixd # language server
]); ];
}; };
} }

View File

@ -1,11 +1,13 @@
{ 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 {
home-manager.users.jawz.programs.xdg.configFile = { home-manager.users.jawz.xdg.configFile = {
"python/pythonrc".source = ../dotfiles/pythonrc; "python/pythonrc".source = ../../dotfiles/pythonrc;
}; };
users.users.jawz.packages = (with pkgs; ([ environment.variables.PYTHONSTARTUP = "\${XDG_CONFIG_HOME}/python/pythonrc";
users.users.jawz.packages = with pkgs; [
pipenv # python development workflow for humans pipenv # python development workflow for humans
nodePackages.pyright # LSP
(python3.withPackages (ps: (python3.withPackages (ps:
with ps; [ with ps; [
black # Python code formatter black # Python code formatter
@ -19,10 +21,6 @@
# poetry # dependency management made easy # poetry # dependency management made easy
# pytest # framework for writing tests # pytest # framework for writing tests
])) ]))
])) ++ (with pkgs.nodePackages; ];
[
pyright # LSP
]);
environment.variables.PYTHONSTARTUP = "\${XDG_CONFIG_HOME}/python/pythonrc";
}; };
} }

View File

@ -1,10 +1,11 @@
{ 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 = with pkgs; [
bashdb # autocomplete bashdb # autocomplete
shellcheck # linting shellcheck # linting
shfmt # a shell parser and formatter shfmt # a shell parser and formatter
]) ++ (with pkgs.nodePackages; [ bash-language-server ]); nodePackages.bash-language-server # LSP
];
}; };
} }

View File

@ -2,13 +2,23 @@
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 {
home-manager.users.jawz = { home-manager.users.jawz = {
programs.bash.shellAliases = {
edit = "emacsclient -t";
e = "edit";
};
services.lorri.enable = true; services.lorri.enable = true;
programs.bash = {
initExtra = ''
emacs-sqlite-fix () {
nix-shell -p cmake sqlite --command "doom sync &&
sc restart emacs &&
emacsclient -e '(org-roam-db-sync)'" &&
doom sync
}
'';
shellAliases = {
edit = "emacsclient -t";
e = "edit";
};
};
}; };
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 fzf # fuzzy finder! super cool and useful
ripgrep # modern grep ripgrep # modern grep
@ -25,7 +35,7 @@
# lsps # lsps
yaml-language-server yaml-language-server
markdownlint-cli markdownlint-cli
])) ++ (with pkgs.nodePackages; [ ]) ++ (with pkgs.nodePackages; [
vscode-json-languageserver vscode-json-languageserver
# linters # linters
prettier prettier
@ -34,16 +44,8 @@
enable = true; enable = true;
package = with pkgs; package = with pkgs;
((emacsPackagesFor emacs-gtk).emacsWithPackages ((emacsPackagesFor emacs-gtk).emacsWithPackages
(epkgs: with epkgs; ([ vterm ]))); (epkgs: with epkgs; [ vterm ]));
defaultEditor = true; defaultEditor = true;
}; };
home-manager.users.jawz.programs.bash.initExtra = ''
emacs-sqlite-fix () {
nix-shell -p cmake sqlite --command "doom sync &&
sc restart emacs &&
emacsclient -e '(org-roam-db-sync)'" &&
doom sync
}
'';
}; };
} }

View File

@ -1,20 +1,29 @@
{ config, lib, pkgs, ... }: { { lib, ... }: {
imports = [ imports = [
./scripts/run.nix
./scripts/tasks.nix
./scripts/split-dir.nix
./scripts/pika-list.nix
./scripts/download.nix ./scripts/download.nix
./scripts/ffmpreg.nix
./scripts/ffmpeg4discord.nix ./scripts/ffmpeg4discord.nix
./scripts/ffmpreg.nix
./scripts/find-dup-episode.nix
./scripts/manage-library.nix
./scripts/nextcloud-cronjob.nix
./scripts/pika-list.nix
./scripts/run.nix
./scripts/split-dir.nix
./scripts/sub-sync.nix
./scripts/tasks.nix
./scripts/update-dns.nix
]; ];
my.scripts = { my.scripts = {
run.enable = lib.mkDefault false;
tasks.enable = lib.mkDefault false;
split-dir.enable = lib.mkDefault false;
pika-list.enable = lib.mkDefault false;
download.enable = lib.mkDefault false; download.enable = lib.mkDefault false;
ffmpreg.enable = lib.mkDefault false;
ffmpeg4discord.enable = lib.mkDefault false; ffmpeg4discord.enable = lib.mkDefault false;
ffmpreg.enable = lib.mkDefault false;
find-dup-episodes.enable = lib.mkDefault false;
manage-library.enable = lib.mkDefault false;
pika-list.enable = lib.mkDefault false;
run.enable = lib.mkDefault false;
split-dir.enable = lib.mkDefault false;
sub-sync.enable = lib.mkDefault false;
tasks.enable = lib.mkDefault false;
update-dns.enable = lib.mkDefault false;
}; };
} }

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
options.my.scripts = lib.mkOption { options.my.scripts = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule ({ type = lib.types.attrsOf (lib.types.submodule {
options = { options = {
enable = lib.mkEnableOption "Whether to enable this script"; enable = lib.mkEnableOption "Whether to enable this script";
install = lib.mkEnableOption "Whether to install the script package"; install = lib.mkEnableOption "Whether to install the script package";
@ -23,7 +23,7 @@
description = "Package containing the executable script."; description = "Package containing the executable script.";
}; };
}; };
})); });
default = { }; default = { };
description = "Configuration for multiple scripts."; description = "Configuration for multiple scripts.";
}; };

View File

@ -1,11 +1,11 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config = { config = {
home-manager.users.jawz = { home-manager.users.jawz = {
xdg.configFile."gallery-dl/config.json".source =
../../dotfiles/gallery-dl/config.json;
services.lorri.enable = true;
programs = { programs = {
xdg.configFile = {
"gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json;
};
bash = { bash = {
shellAliases = { shellAliases = {
comic = comic =
@ -15,27 +15,25 @@
dl = "download -u jawz -i"; dl = "download -u jawz -i";
}; };
initExtra = '' initExtra = ''
list_root="${config.xdg.configHome}"/jawz/lists/jawz list_root=$XDG_CONFIG_HOME/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
''; '';
}; };
}; };
services.lorri.enable = true;
}; };
users.users.jawz.packages = (with pkgs; [ gallery-dl ]); users.users.jawz.packages = [ 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 {
pname = "download"; pname = "download";
version = "2.5"; version = "2.5";
src = ../../scripts/download/.; src = ../../scripts/download/.;
doCheck = false;
buildInputs = [ setuptools ]; buildInputs = [ setuptools ];
propagatedBuildInputs = [ pyyaml types-pyyaml yt-dlp ]; propagatedBuildInputs = [ pyyaml types-pyyaml yt-dlp ];
}); });

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.ffmpeg4discord = { config.my.scripts.ffmpeg4discord = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.ffmpreg = { config.my.scripts.ffmpreg = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.find-dup-episodes = { config.my.scripts.find-dup-episodes = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.manage-library = { config.my.scripts.manage-library = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.nextcloud-cronjob = { config.my.scripts.nextcloud-cronjob = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.pika-list = { config.my.scripts.pika-list = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.run = { config.my.scripts.run = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.split-dir = { config.my.scripts.split-dir = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.sub-sync = { config.my.scripts.sub-sync = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.tasks = { config.my.scripts.tasks = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
imports = [ ./base.nix ]; imports = [ ./base.nix ];
config.my.scripts.update-dns = { config.my.scripts.update-dns = {
enable = true; enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { lib, ... }: {
imports = [ imports = [
./services/network.nix ./services/network.nix
./services/nvidia.nix ./services/nvidia.nix

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { config, lib, ... }: {
options.my.services.network.enable = lib.mkEnableOption "enable"; options.my.services.network.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.services.network.enable { config = lib.mkIf config.my.services.network.enable {
networking = { networking = {

View File

@ -3,6 +3,7 @@ let printingDrivers = [ pkgs.hplip pkgs.hplipWithPlugin ];
in { in {
options.my.services.printing.enable = lib.mkEnableOption "enable"; options.my.services.printing.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.services.printing.enable { config = lib.mkIf config.my.services.printing.enable {
users.users.jawz.packages = [ pkgs.gnome.simple-scan ];
services.printing = { services.printing = {
enable = true; enable = true;
drivers = printingDrivers; drivers = printingDrivers;
@ -11,6 +12,5 @@ in {
enable = true; enable = true;
extraBackends = printingDrivers; extraBackends = printingDrivers;
}; };
users.users.jawz.packages = [ pkgs.gnome.simple-scan ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { config, lib, ... }: {
imports = [ imports = [
# nixGaming.nixosModules.pipewireLowLatency # nixGaming.nixosModules.pipewireLowLatency
]; ];

View File

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

View File

@ -1,9 +1,9 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
options.my.shell.exercism.enable = lib.mkEnableOption "enable"; options.my.shell.exercism.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.shell.exercism.enable { config = lib.mkIf config.my.shell.exercism.enable {
users.users.jawz.packages = with pkgs; ([ users.users.jawz.packages = with pkgs; [
exercism # learn to code exercism # learn to code
bats # testing system, required by Exercism bats # testing system, required by Exercism
]); ];
}; };
} }

View File

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

View File

@ -1,51 +1,53 @@
{ 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 = { home-manager.users.jawz = {
bash = { xdg.configFile."htop/htoprc".source = ../../dotfiles/htop/htoprc;
initExtra = '' programs = {
if command -v fzf-share >/dev/null; then hstr.enable = true;
source "$(fzf-share)/key-bindings.bash" htop = {
source "$(fzf-share)/completion.bash" enable = true;
fi package = pkgs.htop-vim;
'';
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'';
}; };
}; zoxide = {
xdg.configFile = { "htop/htoprc".source = ../dotfiles/htop/htoprc; }; enable = true;
hstr.enable = true; enableBashIntegration = true;
htop = { };
enable = true; bash = {
package = pkgs.htop-vim; initExtra = ''
}; if command -v fzf-share >/dev/null; then
zoxide = { source "$(fzf-share)/key-bindings.bash"
enable = true; source "$(fzf-share)/completion.bash"
enableBashIntegration = true; fi
}; '';
bat = { shellAliases = {
enable = true; cd = "z";
config = { hh = "hstr";
pager = "less -FR"; ls = "eza --icons --group-directories-first";
theme = "base16"; 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'';
};
};
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!
];
}; };
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 = { programs = {

View File

@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, alsa-lib, ffmpeg, kdePackages { stdenv, lib, fetchFromGitHub, cmake, pkg-config, alsa-lib, ffmpeg, kdePackages
, kdsingleapplication, openssl, pipewire, taglib, zlib }: , kdsingleapplication, pipewire, taglib }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "fooyin"; pname = "fooyin";
@ -28,8 +28,6 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [ cmakeFlags = [
(lib.cmakeBool "BUILD_TESTING" (finalAttrs.doCheck or false)) (lib.cmakeBool "BUILD_TESTING" (finalAttrs.doCheck or false))
# we need INSTALL_FHS to be true as the various artifacts are otherwise just dumped in the root
# of $out and the fixupPhase cleans things up anyway
(lib.cmakeBool "INSTALL_FHS" true) (lib.cmakeBool "INSTALL_FHS" true)
]; ];

View File

@ -1,21 +1,16 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
with lib;
let cfg = config.programs.obs-studio; let cfg = config.programs.obs-studio;
in { in {
options.programs.obs-studio = { options.programs.obs-studio = {
enable = mkEnableOption "OBS Studio program"; enable = lib.mkEnableOption "OBS Studio program";
package = lib.mkOption {
package = mkOption { type = lib.types.package;
type = types.package;
default = pkgs.obs-studio; default = pkgs.obs-studio;
defaultText = "pkgs.obs-studio"; defaultText = "pkgs.obs-studio";
description = "Set obs-studio package to use."; description = "Set obs-studio package to use.";
}; };
enableVirtualCamera = lib.mkOption {
enableVirtualCamera = mkOption { type = lib.types.bool;
type = types.bool;
default = false; default = false;
description = '' description = ''
Installs and sets up the v4l2loopback kernel module, necesary for OBS Installs and sets up the v4l2loopback kernel module, necesary for OBS
@ -23,20 +18,15 @@ in {
''; '';
}; };
}; };
config = lib.mkIf cfg.enable {
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ]; environment.systemPackages = [ cfg.package ];
boot = lib.mkIf cfg.enableVirtualCamera {
boot = mkIf cfg.enableVirtualCamera {
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
extraModprobeConfig = '' extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
''; '';
}; };
security.polkit.enable = lib.mkIf cfg.enableVirtualCamera true;
security.polkit.enable = mkIf cfg.enableVirtualCamera true;
}; };
meta.maintainers = [ lib.maintainers.CaptainJawZ ];
meta.maintainers = with lib.maintainers; [ CaptainJawZ ];
} }

View File

@ -6,10 +6,10 @@
let let
polymc = let polymc = let
binpath = lib.makeBinPath ([ xorg.xrandr glxinfo pciutils ]); binpath = lib.makeBinPath [ xorg.xrandr glxinfo pciutils ];
libpath = with xorg; libpath = with xorg;
lib.makeLibraryPath ([ lib.makeLibraryPath [
libX11 libX11
libXext libXext
libXcursor libXcursor
@ -23,7 +23,7 @@ let
udev udev
flite flite
stdenv.cc.cc.lib stdenv.cc.cc.lib
]); ];
gameLibraryPath = libpath + ":${addOpenGLRunpath.driverLink}/lib"; gameLibraryPath = libpath + ":${addOpenGLRunpath.driverLink}/lib";
@ -107,7 +107,7 @@ let
ln -s $src/share $out/share ln -s $src/share $out/share
''; '';
postFixup = let javaPaths = lib.makeSearchPath "bin/java" (extraJDKs); postFixup = let javaPaths = lib.makeSearchPath "bin/java" extraJDKs;
in '' in ''
wrapProgram $out/bin/polymc \ wrapProgram $out/bin/polymc \
--suffix LD_LIBRARY_PATH : "${libsPath}" \ --suffix LD_LIBRARY_PATH : "${libsPath}" \

View File

@ -12,11 +12,11 @@ appimageTools.wrapType1 rec {
curl "https://www.pureref.com/files/build.php?build=LINUX64.Appimage&version=${version}&downloadKey=$key" --output $out curl "https://www.pureref.com/files/build.php?build=LINUX64.Appimage&version=${version}&downloadKey=$key" --output $out
''; '';
meta = with lib; { meta = {
description = "Reference Image Viewer"; description = "Reference Image Viewer";
homepage = "https://www.pureref.com"; homepage = "https://www.pureref.com";
license = licenses.unfree; license = lib.licenses.unfree;
maintainers = with maintainers; [ elnudev ]; maintainers = [ lib.maintainers.elnudev ];
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
}; };