Format with Alejandra. Prepare for flakes.

This commit is contained in:
Jimbo 2024-08-22 23:27:34 -04:00
parent e402113111
commit 85f4107c82
3 changed files with 1461 additions and 1204 deletions

View file

@ -1,10 +1,14 @@
{ config, pkgs, options, lib, ... }: {
let config,
pkgs,
options,
lib,
...
}: let
# Set common boot paramaters # Set common boot paramaters
commonKernelParams = [ commonKernelParams = [
# Nvidia settings # Nvidia settings
"nvidia_drm.fbdev=1" "nvidia_drm.fbdev=1"
"nouveau.config=NvGspRm=1"
# VM/GPU passthrough # VM/GPU passthrough
"amd_iommu=on" "amd_iommu=on"
@ -18,12 +22,11 @@ let
"pcie_acs_override=downstream,multifunction" "pcie_acs_override=downstream,multifunction"
"pci=routeirq" "pci=routeirq"
]; ];
in in {
{
# Import other nix files and firmware # Import other nix files and firmware
imports = let imports = let
homeManager = fetchTarball homeManager =
fetchTarball
"https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz"; "https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz";
in [ in [
./hardware-configuration.nix ./hardware-configuration.nix
@ -36,10 +39,16 @@ in
config = { config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
unstable = import (fetchTarball unstable =
import (
fetchTarball
"https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz" "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"
){ inherit pkgs; config.allowUnfree = true; }; ) {
nur = import (fetchTarball inherit pkgs;
config.allowUnfree = true;
};
nur = import (
fetchTarball
"https://github.com/nix-community/NUR/archive/master.tar.gz" "https://github.com/nix-community/NUR/archive/master.tar.gz"
) {inherit pkgs;}; ) {inherit pkgs;};
}; };
@ -50,8 +59,7 @@ in
# MPV scripts # MPV scripts
(self: super: { (self: super: {
mpv = super.mpv.override { mpv = super.mpv.override {
scripts = with self.mpvScripts; scripts = with self.mpvScripts; [mpris sponsorblock thumbnail];
[ mpris sponsorblock thumbnail ];
}; };
}) })
]; ];
@ -120,7 +128,11 @@ in
enable = true; enable = true;
extraRules = [ extraRules = [
# Give wheel root access, allow persistant session # Give wheel root access, allow persistant session
{ groups = [ "wheel" ]; keepEnv = true; persist = true; } {
groups = ["wheel"];
keepEnv = true;
persist = true;
}
]; ];
}; };
}; };
@ -138,17 +150,24 @@ in
users.users.jimbo = { users.users.jimbo = {
description = "Jimbo Awesome"; description = "Jimbo Awesome";
isNormalUser = true; isNormalUser = true;
hashedPassword = hashedPassword = "$6$gYpE.pG/zPXgin06$2kydjDfd0K62Dhf9P0PFvJhRNz6xIC/bHYaf/XYqyKcLyZNzPQpy8uy9tCRcSYlj1wwBhzVtTRyItwajOHCEj0";
"$6$gYpE.pG/zPXgin06$2kydjDfd0K62Dhf9P0PFvJhRNz6xIC/bHYaf/XYqyKcLyZNzPQpy8uy9tCRcSYlj1wwBhzVtTRyItwajOHCEj0";
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKC8Uqxb09V3msBgDv6lD/nETMYr/X0OgtpDo8ldcMK jimbo@JimDebianServer" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKC8Uqxb09V3msBgDv6lD/nETMYr/X0OgtpDo8ldcMK jimbo@JimDebianServer"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDLe/HioxCOkszFQdm1vb3ZwuzLzsOThqHNvEI4IXeXZ JimPhone" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDLe/HioxCOkszFQdm1vb3ZwuzLzsOThqHNvEI4IXeXZ JimPhone"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPeqiMCRXtpoP+BvKBmzvkL7oLKKCmbfdaQIF3yk/S8I jimbo@DV-JHAMPTON-NIXOS" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPeqiMCRXtpoP+BvKBmzvkL7oLKKCmbfdaQIF3yk/S8I jimbo@DV-JHAMPTON-NIXOS"
]; ];
extraGroups = [ extraGroups = [
"wheel" "audio" "video" "input" "disk" "wheel"
"dialout" "networkmanager" "rtkit" "audio"
"kvm" "libvirtd" "qemu-libvirtd" "video"
"input"
"disk"
"dialout"
"networkmanager"
"rtkit"
"kvm"
"libvirtd"
"qemu-libvirtd"
]; ];
uid = 1000; uid = 1000;
shell = pkgs.zsh; shell = pkgs.zsh;
@ -157,14 +176,19 @@ in
# Install programs system-wide # Install programs system-wide
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Essential system tools # Essential system tools
cifs-utils parted git cifs-utils
parted
git
# Printer control # Printer control
system-config-printer system-config-printer
# Virtual machines # Virtual machines
virt-manager virtiofsd dnsmasq virt-manager
spice-vdagent looking-glass-client virtiofsd
dnsmasq
spice-vdagent
looking-glass-client
]; ];
# Disable the HTML documentation link # Disable the HTML documentation link
@ -271,8 +295,13 @@ in
# Fonts # Fonts
fonts = { fonts = {
packages = with pkgs; [ packages = with pkgs; [
liberation_ttf twitter-color-emoji ubuntu_font_family noto-fonts sarasa-gothic liberation_ttf
orbitron (nerdfonts.override { fonts = [ "UbuntuMono" ]; }) twitter-color-emoji
ubuntu_font_family
noto-fonts
sarasa-gothic
orbitron
(nerdfonts.override {fonts = ["UbuntuMono"];})
]; ];
fontconfig.defaultFonts.emoji = ["Twitter Color Emoji"]; fontconfig.defaultFonts.emoji = ["Twitter Color Emoji"];
}; };

View file

@ -1,8 +1,11 @@
# This file was generated by 'nixos-generate-config' # This file was generated by 'nixos-generate-config', try not to modify too much
# and may be overwritten by future invocations.
{ config, lib, pkgs, modulesPath, ... }:
{ {
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];

View file

@ -1,5 +1,9 @@
{ config, pkgs, options, ... }: {
let config,
pkgs,
options,
...
}: let
# Global color palette # Global color palette
primeCol = ''3823C4''; #3823C4 primeCol = ''3823C4''; #3823C4
accentCol = ''1B1F59''; #1B1F59 accentCol = ''1B1F59''; #1B1F59
@ -47,10 +51,25 @@ let
}; };
# Define the workspace names # Define the workspace names
w0 = ''0:0''; w1 = ''1:1''; w2 = ''2:2''; w3 = ''3:3''; w4 = ''4:4''; w0 = ''0:0'';
w5 = ''5:5''; w6 = ''6:6''; w7 = ''7:7''; w8 = ''8:8''; w9 = ''9:9''; w1 = ''1:1'';
w1a = ''11:I''; w2a = ''22:II''; w3a = ''33:III''; w4a = ''44:IV''; w2 = ''2:2'';
w5a = ''55:V''; w6a = ''66:VI''; w7a = ''77:VII''; w8a = ''88:VIII''; w9a = ''99:IX''; w3 = ''3:3'';
w4 = ''4:4'';
w5 = ''5:5'';
w6 = ''6:6'';
w7 = ''7:7'';
w8 = ''8:8'';
w9 = ''9:9'';
w1a = ''11:I'';
w2a = ''22:II'';
w3a = ''33:III'';
w4a = ''44:IV'';
w5a = ''55:V'';
w6a = ''66:VI'';
w7a = ''77:VII'';
w8a = ''88:VIII'';
w9a = ''99:IX'';
# Define the primary monitor # Define the primary monitor
display1 = ''DP-3''; display1 = ''DP-3'';
@ -771,7 +790,8 @@ let
] ]
} }
''; '';
in pkgs.writeScriptBin "pfetch" in
pkgs.writeScriptBin "pfetch"
''fastfetch --config ${smallConf}''; ''fastfetch --config ${smallConf}'';
# Ranger's bookmarks # Ranger's bookmarks
@ -1083,42 +1103,82 @@ let
overflow: hidden !important; overflow: hidden !important;
} }
''; '';
in in {
{
# Define home manager programs and configs # Define home manager programs and configs
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users.jimbo = { config, pkgs, ... }: { users.jimbo = {
config,
pkgs,
...
}: {
# Install user programs # Install user programs
home.packages = (with pkgs; [ home.packages = with pkgs; [
# Useful programs # Useful programs
rofi-bluetooth bemoji imv qbittorrent rofi-bluetooth
libreoffice-fresh easyeffects vesktop bemoji
element-desktop ffmpegthumbnailer thunderbird imv
qbittorrent
libreoffice-fresh
easyeffects
vesktop
element-desktop
ffmpegthumbnailer
thunderbird
# Terminal programs # Terminal programs
dua vimv p7zip fastfetch gotop pciutils usbutils dua
pulsemixer tcptrack mpc-cli protonvpn-cli_2 vimv
p7zip
fastfetch
gotop
pciutils
usbutils
pulsemixer
tcptrack
mpc-cli
protonvpn-cli_2
# Scripts as global programs # Scripts as global programs
rofiScripts makoToggle swayLock screenShot pFetch rofiScripts
makoToggle
swayLock
screenShot
pFetch
# Production tools # Production tools
krita inkscape audacity blender sunvox krita
inkscape
audacity
blender
sunvox
# File manager # File manager
pcmanfm-qt gnome.file-roller imagemagick poppler_utils pcmanfm-qt
gnome.file-roller
imagemagick
poppler_utils
# School tools # School tools
remmina freerdp globalprotect-openconnect python3 zoom-us remmina
freerdp
globalprotect-openconnect
python3
zoom-us
# Audio/Video tools # Audio/Video tools
yt-dlp spotdl ani-cli playerctl ffmpeg yt-dlp
spotdl
ani-cli
playerctl
ffmpeg
# Unlimited games # Unlimited games
steam steam-run heroic prismlauncher steam
steam-run
heroic
prismlauncher
# Emulators # Emulators
#dolphin-emu cemu ryujinx duckstation pcsx2 unstable.lime3ds #dolphin-emu cemu ryujinx duckstation pcsx2 unstable.lime3ds
@ -1127,9 +1187,18 @@ in
#moonlight-qt #moonlight-qt
# Window manager apps # Window manager apps
swaybg wdisplays wl-clipboard clipman swaybg
libnotify bc grim slurp swappy jq lm_sensors wdisplays
]); wl-clipboard
clipman
libnotify
bc
grim
slurp
swappy
jq
lm_sensors
];
# Enable Sway and write some scripts # Enable Sway and write some scripts
wayland.windowManager.sway = let wayland.windowManager.sway = let
@ -1180,7 +1249,7 @@ in
''; '';
in { in {
enable = true; enable = true;
#package = pkgs.swayfx package = pkgs.unstable.sway;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
checkConfig = false; checkConfig = false;
config = { config = {
@ -1273,7 +1342,12 @@ in
workspaces1 = ["${w0}" "${w1}" "${w2}" "${w3}" "${w1a}" "${w2a}" "${w3a}"]; workspaces1 = ["${w0}" "${w1}" "${w2}" "${w3}" "${w1a}" "${w2a}" "${w3a}"];
workspaces2 = ["${w4}" "${w5}" "${w6}" "${w4a}" "${w5a}" "${w6a}"]; workspaces2 = ["${w4}" "${w5}" "${w6}" "${w4a}" "${w5a}" "${w6a}"];
workspaces3 = ["${w7}" "${w8}" "${w9}" "${w7a}" "${w8a}" "${w9a}"]; workspaces3 = ["${w7}" "${w8}" "${w9}" "${w7a}" "${w8a}" "${w9a}"];
assign = output: workspaces: map (workspace: { inherit workspace; inherit output; }) workspaces; assign = output: workspaces:
map (workspace: {
inherit workspace;
inherit output;
})
workspaces;
in in
(assign "${display1}" workspaces1) ++ (assign "${display2}" workspaces2) ++ (assign "${display3}" workspaces3); (assign "${display1}" workspaces1) ++ (assign "${display2}" workspaces2) ++ (assign "${display3}" workspaces3);
@ -1350,7 +1424,7 @@ in
"${primeMod}+${secMod}+Ctrl+r" = ''exec rofiscripts --resolutions''; "${primeMod}+${secMod}+Ctrl+r" = ''exec rofiscripts --resolutions'';
# Open NixOS configuration files # Open NixOS configuration files
"${primeMod}+F12" = ''exec bash -c "foot nvim /etc/nixos/{configuration,jimbo,hardware-configuration}.nix" | ${sendNotif} "Nix Config"''; "${primeMod}+F12" = ''exec foot ranger /etc/nixos | ${sendNotif} "Nix Config"'';
# Terminal, rofi, clipmenu, media script, power menu, show/hide waybar # Terminal, rofi, clipmenu, media script, power menu, show/hide waybar
"${primeMod}+Return" = ''exec foot''; "${primeMod}+Return" = ''exec foot'';
@ -1543,31 +1617,68 @@ in
titlebar = false; titlebar = false;
commands = [ commands = [
# Scratchpads # Scratchpads
{ criteria = { con_mark = "scratchpad"; }; {
command = ''floating enable, sticky enable, move scratchpad, mark borderless''; } criteria = {con_mark = "scratchpad";};
{ criteria = { app_id = "gotop"; }; command = ''floating enable, sticky enable, move scratchpad, mark borderless'';
command = ''mark scratchpad''; } }
{ criteria = { app_id = "music"; }; {
command = ''mark scratchpad''; } criteria = {app_id = "gotop";};
{ criteria = { app_id = "sound"; }; command = ''mark scratchpad'';
command = ''mark scratchpad''; } }
{ criteria = { app_id = "com.github.wwmm.easyeffects"; }; {
command = ''mark scratchpad, opacity 0.9''; } criteria = {app_id = "music";};
command = ''mark scratchpad'';
}
{
criteria = {app_id = "sound";};
command = ''mark scratchpad'';
}
{
criteria = {app_id = "com.github.wwmm.easyeffects";};
command = ''mark scratchpad, opacity 0.9'';
}
# Create a "Scratchpad" for apps I don't want to be seen when launched # Create a "Scratchpad" for apps I don't want to be seen when launched
{ criteria = { con_mark = "hiddenaway"; }; command = ''move scratchpad''; } {
criteria = {con_mark = "hiddenaway";};
command = ''move scratchpad'';
}
# Give apps that don't have them borders # Give apps that don't have them borders
{ criteria = { con_mark = "borderless"; }; command = ''border pixel ${borderWeight}''; } {
{ criteria = { app_id = "com.github.wwmm.easyeffects"; }; command = ''mark borderless''; } criteria = {con_mark = "borderless";};
{ criteria = { class = "steam"; }; command = ''mark borderless''; } command = ''border pixel ${borderWeight}'';
{ criteria = { app_id = "swappy"; }; command = ''mark borderless''; } }
{ criteria = { app_id = "virt-manager"; }; command = ''mark borderless''; } {
{ criteria = { window_role = "pop-up"; }; command = ''mark borderless''; } criteria = {app_id = "com.github.wwmm.easyeffects";};
command = ''mark borderless'';
}
{
criteria = {class = "steam";};
command = ''mark borderless'';
}
{
criteria = {app_id = "swappy";};
command = ''mark borderless'';
}
{
criteria = {app_id = "virt-manager";};
command = ''mark borderless'';
}
{
criteria = {window_role = "pop-up";};
command = ''mark borderless'';
}
# Floating or fullscreen rules # Floating or fullscreen rules
{ criteria = { app_id = "float"; }; command = ''floating enable''; } {
{ criteria = { title = "^GlobalShot"; }; command = ''floating enable, fullscreen enable global''; } criteria = {app_id = "float";};
command = ''floating enable'';
}
{
criteria = {title = "^GlobalShot";};
command = ''floating enable, fullscreen enable global'';
}
]; ];
}; };
assigns = { assigns = {
@ -1876,8 +1987,16 @@ in
output = [display1 "VGA-1"]; output = [display1 "VGA-1"];
modules-left = ["sway/workspaces" "sway/window"]; modules-left = ["sway/workspaces" "sway/window"];
modules-right = [ modules-right = [
"pulseaudio" "cpu" "memory" "custom/vram" "custom/clock-long" "pulseaudio"
"gamemode" "sway/scratchpad" "tray" "bluetooth" "network" "cpu"
"memory"
"custom/vram"
"custom/clock-long"
"gamemode"
"sway/scratchpad"
"tray"
"bluetooth"
"network"
]; ];
"sway/workspaces" = swayWorkspacesModule; "sway/workspaces" = swayWorkspacesModule;
"sway/window" = swayWindowsModule; "sway/window" = swayWindowsModule;
@ -1899,8 +2018,13 @@ in
output = [display2]; output = [display2];
modules-left = ["sway/workspaces" "sway/window"]; modules-left = ["sway/workspaces" "sway/window"];
modules-right = [ modules-right = [
"pulseaudio" "custom/media" "custom/notifs" "cpu" "pulseaudio"
"memory" "custom/vram" "custom/clock-long" "custom/media"
"custom/notifs"
"cpu"
"memory"
"custom/vram"
"custom/clock-long"
]; ];
"sway/workspaces" = swayWorkspacesModule; "sway/workspaces" = swayWorkspacesModule;
"sway/window" = swayWindowsModule; "sway/window" = swayWindowsModule;
@ -1919,7 +2043,12 @@ in
output = [display3]; output = [display3];
modules-left = ["sway/workspaces" "sway/window"]; modules-left = ["sway/workspaces" "sway/window"];
modules-right = [ modules-right = [
"pulseaudio" "custom/weather" "cpu" "memory" "custom/vram" "custom/clock-short" "pulseaudio"
"custom/weather"
"cpu"
"memory"
"custom/vram"
"custom/clock-short"
]; ];
"sway/workspaces" = swayWorkspacesModule; "sway/workspaces" = swayWorkspacesModule;
"sway/window" = swayWindowsModule; "sway/window" = swayWindowsModule;
@ -1937,8 +2066,21 @@ in
output = ["eDP-1" "LVDS-1" "DSI-1" "HDMI-A-1"]; output = ["eDP-1" "LVDS-1" "DSI-1" "HDMI-A-1"];
modules-left = ["sway/workspaces" "sway/window"]; modules-left = ["sway/workspaces" "sway/window"];
modules-right = [ modules-right = [
"pulseaudio" "custom/media" "custom/notifs" "custom/weather2" "cpu" "memory" "custom/vram" "backlight" "pulseaudio"
"battery" "custom/clock-long" "gamemode" "sway/scratchpad" "tray" "bluetooth" "network" "custom/media"
"custom/notifs"
"custom/weather2"
"cpu"
"memory"
"custom/vram"
"backlight"
"battery"
"custom/clock-long"
"gamemode"
"sway/scratchpad"
"tray"
"bluetooth"
"network"
]; ];
"sway/workspaces" = swayWorkspacesModule; "sway/workspaces" = swayWorkspacesModule;
"sway/window" = swayWindowsModule; "sway/window" = swayWindowsModule;
@ -2146,29 +2288,47 @@ in
# Enable Librewolf and extensions # Enable Librewolf and extensions
programs.firefox = let programs.firefox = let
commonExtensions = with pkgs.nur.repos.rycee.firefox-addons; [ commonExtensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin bitwarden darkreader sponsorblock return-youtube-dislikes no-pdf-download ublock-origin
bitwarden
darkreader
sponsorblock
return-youtube-dislikes
no-pdf-download
]; ];
commonSearch = { commonSearch = {
force = true; force = true;
default = "Google"; default = "Google";
engines = { engines = {
"Google" = { "Google" = {
urls = [{ urls = [
{
template = "https://www.google.com/search"; template = "https://www.google.com/search";
params = [ params = [
{ name = "q"; value = "{searchTerms}"; } {
name = "q";
value = "{searchTerms}";
}
];
}
]; ];
}];
definedAliases = ["@g"]; definedAliases = ["@g"];
}; };
"NixPKGs" = { "NixPKGs" = {
urls = [{ urls = [
{
template = "https://search.nixos.org/packages"; template = "https://search.nixos.org/packages";
params = [ params = [
{ name = "type"; value = "packages"; } {
{ name = "query"; value = "{searchTerms}"; } name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
]; ];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@pkgs"]; definedAliases = ["@pkgs"];
}; };
@ -2234,8 +2394,16 @@ in
settings = commonSettings; settings = commonSettings;
containersForce = true; containersForce = true;
containers = { containers = {
Google = { color = "green"; icon = "fingerprint"; id = 200; }; Google = {
Seneca = { color = "red"; icon = "briefcase"; id = 201; }; color = "green";
icon = "fingerprint";
id = 200;
};
Seneca = {
color = "red";
icon = "briefcase";
id = 201;
};
}; };
}; };
}; };
@ -2287,19 +2455,26 @@ in
vimAlias = true; vimAlias = true;
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
# Vim theme # Vim theme
vim-airline vim-airline-themes vim-airline
vim-airline-themes
# Internal clipboard # Internal clipboard
vim-vsnip cmp-vsnip vim-vsnip
cmp-vsnip
# Autocomplete manager # Autocomplete manager
lspkind-nvim lspkind-nvim
# Autocomplete plugins # Autocomplete plugins
cmp-nvim-lsp cmp-buffer cmp-path cmp-cmdline nvim-cmp cmp-nvim-lsp
cmp-buffer
cmp-path
cmp-cmdline
nvim-cmp
# Hex color visualizer and color theme # Hex color visualizer and color theme
nvim-colorizer-lua vim-monokai-pro nvim-colorizer-lua
vim-monokai-pro
]; ];
extraConfig = '' extraConfig = ''
lua <<EOF lua <<EOF
@ -2409,28 +2584,76 @@ in
}; };
rifle = [ rifle = [
# Text editing # Text editing
{ condition = ''ext xml|json|jsonc|m3u|m3u8|csv|tex|py|pl|rb|js|sh|php|md|nix''; command = ''vim -- "$@"''; } {
condition = ''ext xml|json|jsonc|m3u|m3u8|csv|tex|py|pl|rb|js|sh|php|md|nix'';
command = ''vim -- "$@"'';
}
# Media # Media
{ condition = ''mime ^image, has imv, X, flag f''; command = ''imv -- "$@"''; } {
{ condition = ''mime ^video, terminal, has mpv''; command = ''mpv -- "$@"''; } condition = ''mime ^image, has imv, X, flag f'';
{ condition = ''mime ^video, terminal, has mpv''; command = ''mpv --video-rotate=270 -- "$@"''; } command = ''imv -- "$@"'';
{ condition = ''mime ^audio|ogg$, terminal, has mpv''; command = ''mpv --no-audio-display -- "$@"''; } }
{ condition = ''mime ^audio|ogg$, terminal, has mpv''; command = ''mpv --shuffle --no-audio-display -- "$@"''; } {
{ condition = ''ext x?html?|pdf, has librewolf, X, flag f''; command = ''librewolf -- "$@"''; } condition = ''mime ^video, terminal, has mpv'';
{ condition = ''ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f''; command = ''libreoffice "$@"''; } command = ''mpv -- "$@"'';
}
{
condition = ''mime ^video, terminal, has mpv'';
command = ''mpv --video-rotate=270 -- "$@"'';
}
{
condition = ''mime ^audio|ogg$, terminal, has mpv'';
command = ''mpv --no-audio-display -- "$@"'';
}
{
condition = ''mime ^audio|ogg$, terminal, has mpv'';
command = ''mpv --shuffle --no-audio-display -- "$@"'';
}
{
condition = ''ext x?html?|pdf, has librewolf, X, flag f'';
command = ''librewolf -- "$@"'';
}
{
condition = ''ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f'';
command = ''libreoffice "$@"'';
}
# Scripts # Scripts
{ condition = ''sh''; command = ''sh -- "$1"''; } {
{ condition = ''py''; command = ''python -- "$1"''; } condition = ''sh'';
{ condition = ''pl''; command = ''perl -- "$1"''; } command = ''sh -- "$1"'';
{ condition = ''js''; command = ''node -- "$1"''; } }
{ condition = ''php''; command = ''php -- "$1"''; } {
condition = ''py'';
command = ''python -- "$1"'';
}
{
condition = ''pl'';
command = ''perl -- "$1"'';
}
{
condition = ''js'';
command = ''node -- "$1"'';
}
{
condition = ''php'';
command = ''php -- "$1"'';
}
# Misc # Misc
{ condition = ''ext exe|msi''; command = ''wine "$1"''; } {
{ condition = ''ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz|iso|jar|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has 7z''; command = ''7z x -- "$@"''; } condition = ''ext exe|msi'';
{ condition = ''label open, has xdg-open''; command = ''xdg-open -- "$@"''; } command = ''wine "$1"'';
}
{
condition = ''ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz|iso|jar|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has 7z'';
command = ''7z x -- "$@"'';
}
{
condition = ''label open, has xdg-open'';
command = ''xdg-open -- "$@"'';
}
]; ];
plugins = [ plugins = [
{ {
@ -2585,8 +2808,11 @@ in
programs.obs-studio = { programs.obs-studio = {
enable = true; enable = true;
plugins = with pkgs.obs-studio-plugins; [ plugins = with pkgs.obs-studio-plugins; [
obs-pipewire-audio-capture obs-webkitgtk obs-pipewire-audio-capture
obs-multi-rtmp obs-vkcapture obs-tuna obs-webkitgtk
obs-multi-rtmp
obs-vkcapture
obs-tuna
looking-glass-obs looking-glass-obs
]; ];
}; };
@ -2736,8 +2962,7 @@ in
spotdl = "spotdl --m3u --format opus"; spotdl = "spotdl --m3u --format opus";
# Flakes # Flakes
buildiso = buildiso = "${pkgs.nixos-generators}/bin/nixos-generate -f install-iso -c /home/jimbo/Downloads/NixISO/configuration.nix";
"${pkgs.nixos-generators}/bin/nixos-generate -f install-iso -c /home/jimbo/Downloads/NixISO/configuration.nix";
}; };
}; };