Shift home config to enable by desktop, work out more details later

This commit is contained in:
Jimbo 2025-01-01 11:30:16 -05:00
parent d873588c59
commit 77168ba9c7
37 changed files with 120 additions and 127 deletions

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { { config, lib, ... }: {
home.file = { home.file = lib.mkIf config.home.desktop.enable {
".face".source = ./assets/pfp.png; ".face".source = ./assets/pfp.png;
".assets/wallpapers".source = ./assets/wallpapers; ".assets/wallpapers".source = ./assets/wallpapers;
".assets/lockscreen".source = ./assets/lockscreen; ".assets/lockscreen".source = ./assets/lockscreen;

View file

@ -1,7 +1,7 @@
{ config, ... }: { config, ... }:
{ {
programs.foot = { programs.foot = {
enable = true; enable = config.home.desktop.enable;
server.enable = false; server.enable = false;
settings = { settings = {
main = { main = {

View file

@ -1,7 +1,7 @@
{ ... }: { config, ... }:
{ {
programs.imv = { programs.imv = {
enable = true; enable = config.home.desktop.enable;
settings.binds = { settings.binds = {
h = "prev"; h = "prev";
j = "zoom -5"; j = "zoom -5";

View file

@ -80,7 +80,7 @@ in {
} }
]; ];
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 = [ "@p" ];
}; };
"MyNixOS" = { "MyNixOS" = {
urls = [ urls = [
@ -137,8 +137,6 @@ in {
commonSettings = { commonSettings = {
"general.autoScroll" = true; "general.autoScroll" = true;
"places.history.enabled" = false;
"font.name.serif.x-western" = config.look.fonts.main; "font.name.serif.x-western" = config.look.fonts.main;
"font.name.sans-serif.x-western" = config.look.fonts.main; "font.name.sans-serif.x-western" = config.look.fonts.main;
"font.name.monospace.x-western" = config.look.fonts.nerd; "font.name.monospace.x-western" = config.look.fonts.nerd;
@ -244,7 +242,7 @@ in {
"webgl.disabled" = false; "webgl.disabled" = false;
}; };
in { in {
enable = true; enable = config.home.desktop.enable;
package = pkgs.librewolf; package = pkgs.librewolf;
profiles = { profiles = {
Main = { Main = {

View file

@ -1,8 +1,8 @@
{ pkgs, ... }: { config, pkgs, lib, ... }:
{ {
home = { config = lib.mkIf config.home.desktop.enable {
packages = with pkgs; [ mangohud ]; programs.mangohud.enable = true;
file = { home.file = {
# These options exist in Nixlang, but the order is not respected. # These options exist in Nixlang, but the order is not respected.
".config/MangoHud/MangoHud.conf".text = '' ".config/MangoHud/MangoHud.conf".text = ''
table_columns=2 table_columns=2

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, config, ... }:
{ {
programs.mpv = { programs.mpv = {
enable = true; enable = config.home.desktop.enable;
scripts = with pkgs.mpvScripts; [ scripts = with pkgs.mpvScripts; [
mpris mpris
sponsorblock sponsorblock

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { config, pkgs, ... }:
{ {
programs.obs-studio = { programs.obs-studio = {
enable = true; enable = config.home.desktop.enable;
plugins = with pkgs.obs-studio-plugins; [ plugins = with pkgs.obs-studio-plugins; [
obs-pipewire-audio-capture obs-pipewire-audio-capture
obs-webkitgtk obs-webkitgtk

View file

@ -1,6 +1,6 @@
{ pkgs, config, ... }: { pkgs, config, lib, ... }:
{ {
home = { home = lib.mkIf config.home.desktop.enable {
packages = with pkgs; [ packages = with pkgs; [
pcmanfm pcmanfm
file-roller file-roller

View file

@ -3,7 +3,7 @@
imports = [ ./scripts ]; imports = [ ./scripts ];
programs.rofi = { programs.rofi = {
enable = true; enable = config.home.desktop.enable;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
terminal = "foot"; terminal = "foot";
font = "${config.look.fonts.main} 14"; font = "${config.look.fonts.main} 14";

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { pkgs, lib, config, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.programs.rofi.enable [
(pkgs.writeScriptBin "rofiscratch" '' (pkgs.writeScriptBin "rofiscratch" ''
SCRATCHPADS=$(echo -e "Btop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads") SCRATCHPADS=$(echo -e "Btop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads")
case $SCRATCHPADS in case $SCRATCHPADS in

View file

@ -1,10 +0,0 @@
{ pkgs, ... }:
{
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
}

View file

@ -1,7 +1,7 @@
{ ... }: { config, ... }:
{ {
programs.thunderbird = { programs.thunderbird = {
enable = true; enable = config.home.desktop.enable;
profiles = { profiles = {
Main = { Main = {
isDefault = true; isDefault = true;

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
ffmpeg ffmpeg
ffmpegthumbnailer ffmpegthumbnailer
puddletag puddletag

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
dolphin-emu dolphin-emu
cemu cemu
ryujinx ryujinx

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
heroic heroic
prismlauncher prismlauncher
steam steam

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
bc bc
fractal fractal
libreoffice libreoffice

View file

@ -1,10 +1,11 @@
{ pkgs, blender, ... }: { config, lib, pkgs, blender, ... }:
{ {
nixpkgs.overlays = [ blender.overlays.default ]; config = lib.mkIf config.home.desktop.enable {
nixpkgs.overlays = [ blender.overlays.default ];
home.packages = with pkgs; [ home.packages = with pkgs; [
audacity audacity
blender_4_3 blender_4_3
krita krita
]; ];
};
} }

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
moonlight-qt moonlight-qt
rustdesk-flutter rustdesk-flutter
]; ];

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
freerdp freerdp
gpauth gpauth
remmina remmina

View file

@ -1,20 +1,22 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ mpc-cli ]; config = lib.mkIf config.home.desktop.enable {
home.packages = with pkgs; [ mpc-cli ];
programs.ncmpcpp = { programs.ncmpcpp = {
enable = true; enable = true;
settings = { settings = {
browser_sort_mode = "name"; browser_sort_mode = "name";
user_interface = "alternative"; user_interface = "alternative";
};
bindings = [
{ key = "h"; command = "volume_down"; }
{ key = "j"; command = "scroll_down"; }
{ key = "k"; command = "scroll_up"; }
{ key = "l"; command = "volume_up"; }
];
}; };
bindings = [
{ key = "h"; command = "volume_down"; }
{ key = "j"; command = "scroll_down"; }
{ key = "k"; command = "scroll_up"; }
{ key = "l"; command = "volume_up"; }
];
};
services.mpd-discord-rpc.enable = true; services.mpd-discord-rpc.enable = true;
};
} }

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home = { home = lib.mkIf config.home.desktop.enable {
packages = with pkgs; [ spotdl ]; packages = with pkgs; [ spotdl ];
shellAliases.spotdl = "spotdl --m3u --format opus"; shellAliases.spotdl = "spotdl --m3u --format opus";
}; };

View file

@ -1,15 +1,16 @@
{ ... }: { config, lib, ... }:
{ {
programs.yt-dlp = { config = lib.mkIf config.home.desktop.enable {
enable = true; programs.yt-dlp = {
settings = { enable = true;
add-metadata = true; settings = {
embed-thumbnail = true; add-metadata = true;
convert-thumbnails = "jpg"; embed-thumbnail = true;
audio-format = "opus"; convert-thumbnails = "jpg";
output = ''"%(artist)s - %(title)s.%(ext)s"''; audio-format = "opus";
output = ''"%(artist)s - %(title)s.%(ext)s"'';
};
}; };
home.shellAliases.opusdl = ''yt-dlp -f ba -x --audio-quality 0'';
}; };
home.shellAliases.opusdl = ''yt-dlp -f ba -x --audio-quality 0'';
} }

View file

@ -1,11 +1,12 @@
{ pkgs, ... }: { config, lib, ... }:
{ {
services.easyeffects = { config = lib.mkIf config.home.desktop.enable {
enable = true; services.easyeffects = {
preset = "headphones"; enable = true;
}; preset = "headphones";
};
home.file = { home.file = {
".config/easyeffects/output/headphones.json".source = ./headphones.json; ".config/easyeffects/output/headphones.json".source = ./headphones.json;
};
}; };
} }

View file

@ -1,4 +1,4 @@
{ ... }: { config, ... }:
{ {
services.gnome-keyring.enable = true; services.gnome-keyring.enable = config.home.desktop.enable;
} }

View file

@ -1,7 +1,7 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
services.mpd = { services.mpd = {
enable = true; enable = config.home.desktop.enable;
network.startWhenNeeded = true; network.startWhenNeeded = true;
musicDirectory = "/home/jimbo/JimboNFS/Music/JimBops"; musicDirectory = "/home/jimbo/JimboNFS/Music/JimBops";
playlistDirectory = "/home/jimbo/JimboNFS/Music/JimBops/Playlists"; playlistDirectory = "/home/jimbo/JimboNFS/Music/JimBops/Playlists";

View file

@ -1,7 +1,7 @@
{ ... }: { config, ... }:
{ {
services.udiskie = { services.udiskie = {
enable = true; enable = config.home.desktop.enable;
automount = false; automount = false;
}; };
} }

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.pointerCursor = { home.pointerCursor = lib.mkIf config.home.desktop.enable {
gtk.enable = true; gtk.enable = true;
x11.enable = true; x11.enable = true;
name = "Simp1e-Dark"; name = "Simp1e-Dark";

View file

@ -1,20 +1,21 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ config = lib.mkIf config.home.desktop.enable {
liberation_ttf home.packages = with pkgs; [
twitter-color-emoji liberation_ttf
noto-fonts twitter-color-emoji
sarasa-gothic noto-fonts
ubuntu_font_family sarasa-gothic
(nerdfonts.override { fonts = [ "UbuntuMono" ]; }) ubuntu_font_family
]; (nerdfonts.override { fonts = [ "UbuntuMono" ]; })
];
fonts.fontconfig = { fonts.fontconfig = {
enable = true; enable = true;
defaultFonts = { defaultFonts = {
sansSerif = [ "Ubuntu" ]; sansSerif = [ "Ubuntu" ];
monospace = [ "UbuntuMono Nerd Font Mono" ]; monospace = [ "UbuntuMono Nerd Font Mono" ];
emoji = [ "Twitter Color Emoji" ]; emoji = [ "Twitter Color Emoji" ];
};
}; };
}; };
} }

View file

@ -1,7 +1,6 @@
{ ... }: { ... }:
{ {
gtk = { gtk = {
# Disable shadows
gtk3.extraCss = '' gtk3.extraCss = ''
* { outline-width: 0px; } * { outline-width: 0px; }
decoration { box-shadow: none; } decoration { box-shadow: none; }

View file

@ -1,4 +1,4 @@
{ ... }: { config, ... }:
{ {
xdg.userDirs = { xdg.userDirs = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [ imports = [
./grimsnap ./grimsnap
@ -9,7 +9,7 @@
./wpaperd ./wpaperd
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
brightnessctl brightnessctl
clipman clipman
grim grim

View file

@ -1,6 +1,6 @@
{ pkgs, config, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
(pkgs.writeScriptBin "grimsnap" '' (pkgs.writeScriptBin "grimsnap" ''
# Freeze the screen using hyprpicker # Freeze the screen using hyprpicker
hyprpicker -r -z & hyprpicker -r -z &

View file

@ -5,7 +5,7 @@
]; ];
services.mako = { services.mako = {
enable = true; enable = config.home.desktop.enable;
borderColor = "#${config.look.colors.accent}"; borderColor = "#${config.look.colors.accent}";
backgroundColor = "#${config.look.colors.dark}D9"; backgroundColor = "#${config.look.colors.dark}D9";
output = "${config.displays.d1}"; output = "${config.displays.d1}";

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.services.mako.enable [
(pkgs.writeScriptBin "makotoggle" '' (pkgs.writeScriptBin "makotoggle" ''
mode_output=$(makoctl mode) mode_output=$(makoctl mode)

View file

@ -1,6 +1,6 @@
{ pkgs, config, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
(pkgs.writeScriptBin "wlpicker" '' (pkgs.writeScriptBin "wlpicker" ''
# Get color position # Get color position
position=$(slurp -b 00000000 -p) position=$(slurp -b 00000000 -p)

View file

@ -1,7 +1,7 @@
{ config, ... }: { config, ... }:
{ {
programs.wpaperd = { programs.wpaperd = {
enable = true; enable = config.home.desktop.enable;
settings = { settings = {
default.mode = "center"; default.mode = "center";
any.path = "~/.assets/wallpapers/1.png"; any.path = "~/.assets/wallpapers/1.png";

View file

@ -1,6 +1,6 @@
{ pkgs, config, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; lib.mkIf config.wayland.windowManager.sway.enable [
(pkgs.writeScriptBin "prop-sway" '' (pkgs.writeScriptBin "prop-sway" ''
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | ${pkgs.slurp}/bin/slurp -r -c ${config.look.colors.prime} -B 00000066 -b 00000000) selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | ${pkgs.slurp}/bin/slurp -r -c ${config.look.colors.prime} -B 00000066 -b 00000000)
if [ -n "$selected_window" ]; then if [ -n "$selected_window" ]; then