refactor: split up some packages and unify into hyprland module

This commit is contained in:
matt1432 2023-12-04 10:05:25 -05:00
parent 8c7a36554e
commit 378533c2d3
8 changed files with 106 additions and 169 deletions

View file

@ -36,7 +36,6 @@
}; };
home-manager.users.${config.vars.user} = { home-manager.users.${config.vars.user} = {
imports = [ imports = [
../../home/dconf.nix
../../home/firefox ../../home/firefox
./home/packages.nix ./home/packages.nix

View file

@ -1,83 +1,4 @@
{ {...}: {
pkgs,
nixpkgs-wayland,
...
}: let
waypkgs = nixpkgs-wayland.packages.x86_64-linux;
in {
programs = {
obs-studio = {
enable = true;
plugins = with waypkgs; [
obs-wlrobs
];
};
btop.enable = true;
};
home.packages =
(with pkgs; [
# FIXME: vlc stutters
mpv
nextcloud-client
libreoffice-fresh
photoqt
hunspell
hunspellDicts.en_CA
jellyfin-media-player
spotifywm
thunderbird
prismlauncher-qt5
(pkgs.discord.override {
withOpenASAR = true;
withVencord = true;
})
# School
virt-manager
bluej
xournalpp
])
++ (with pkgs.plasma5Packages; [
ark
kcharselect
kdenlive
okular
# Dolphin & co
dolphin
dolphin-plugins
kdegraphics-thumbnailers
ffmpegthumbs
kio
kio-admin # needs to be both here and in system pkgs
kio-extras
kmime
])
++ (with pkgs.gnome; [
gnome-calculator
]);
# TODO: add mic sound
xdg.configFile."gsr.sh" = {
executable = true;
text = ''
export WINDOW=DP-5
export CONTAINER=mkv
export QUALITY=very_high
export CODEC=auto
export AUDIO_CODEC=aac
export FRAMERATE=60
export REPLAYDURATION=1200
export OUTPUTDIR=/home/matt/Videos/Replay
export MAKEFOLDERS=yes
# export ADDITIONAL_ARGS=
# Disable compositor in X11 for best performance
exec /bin/sh -c 'AUDIO="''${AUDIO_DEVICE:-$(pactl get-default-sink).monitor}"; gpu-screen-recorder -v no -w $WINDOW -c $CONTAINER -q $QUALITY -k $CODEC -ac $AUDIO_CODEC -a "$AUDIO" -f $FRAMERATE -r $REPLAYDURATION -o "$OUTPUTDIR" -mf $MAKEFOLDERS $ADDITIONAL_ARGS'
'';
};
xdg.desktopEntries."com.github.iwalton3.jellyfin-media-player" = { xdg.desktopEntries."com.github.iwalton3.jellyfin-media-player" = {
name = "Jellyfin Media Player"; name = "Jellyfin Media Player";
comment = "Desktop client for Jellyfin"; comment = "Desktop client for Jellyfin";

View file

@ -1,5 +1,6 @@
{ {
pkgs, pkgs,
config,
lib, lib,
... ...
}: let }: let
@ -50,4 +51,26 @@ in {
source = "${gsr}/bin/gsr-kms-server"; source = "${gsr}/bin/gsr-kms-server";
}; };
}; };
home-manager.users.${config.vars.user} = {
# TODO: add mic sound
xdg.configFile."gsr.sh" = {
executable = true;
text = ''
export WINDOW=DP-5
export CONTAINER=mkv
export QUALITY=very_high
export CODEC=auto
export AUDIO_CODEC=aac
export FRAMERATE=60
export REPLAYDURATION=1200
export OUTPUTDIR=/home/matt/Videos/Replay
export MAKEFOLDERS=yes
# export ADDITIONAL_ARGS=
# Disable compositor in X11 for best performance
exec /bin/sh -c 'AUDIO="''${AUDIO_DEVICE:-$(pactl get-default-sink).monitor}"; gpu-screen-recorder -v no -w $WINDOW -c $CONTAINER -q $QUALITY -k $CODEC -ac $AUDIO_CODEC -a "$AUDIO" -f $FRAMERATE -r $REPLAYDURATION -o "$OUTPUTDIR" -mf $MAKEFOLDERS $ADDITIONAL_ARGS'
'';
};
};
} }

View file

@ -33,7 +33,6 @@
}; };
home-manager.users .${config.vars.user} = { home-manager.users .${config.vars.user} = {
imports = [ imports = [
../../home/dconf.nix
../../home/firefox ../../home/firefox
./home/dotfiles.nix ./home/dotfiles.nix

View file

@ -1,72 +1,12 @@
{ {pkgs, ...}: {
pkgs,
nixpkgs-wayland,
...
}: let
waypkgs = nixpkgs-wayland.packages.x86_64-linux;
in {
programs = {
obs-studio = {
enable = true;
plugins = with waypkgs; [
obs-wlrobs
];
};
btop.enable = true;
};
home.packages = home.packages =
(with pkgs.python311Packages; [ (with pkgs.python311Packages; [
python python
pyclip pyclip
]) ])
++ (with pkgs.plasma5Packages; [
ark
kcharselect
kdenlive
okular
# Dolphin & co
dolphin
dolphin-plugins
kdegraphics-thumbnailers
ffmpegthumbs
kio
kio-admin # needs to be both here and in system pkgs
kio-extras
kmime
])
++ (with pkgs.gnome; [
gnome-calculator
])
++ (with pkgs; [ ++ (with pkgs; [
# School
virt-manager
bluej
camunda-modeler
# Misc Apps
thunderbird # TODO: use programs.thunderbird
spotifywm
zeal
libreoffice-fresh # TODO: add spelling stuff and declarative conf?
photoqt
gimp-with-plugins # TODO: set plugins using nix
vlc
nextcloud-client
jellyfin-media-player
xournalpp
(pkgs.discord.override {
withOpenASAR = true;
withVencord = true;
})
prismlauncher-qt5
# Misc CLI # Misc CLI
acpi acpi
alsa-utils
fontfor
(writeShellScriptBin "Gparted" '' (writeShellScriptBin "Gparted" ''
( (

12
home/obs.nix Normal file
View file

@ -0,0 +1,12 @@
{nixpkgs-wayland, ...}: let
waypkgs = nixpkgs-wayland.packages.x86_64-linux;
in {
programs = {
obs-studio = {
enable = true;
plugins = with waypkgs; [
obs-wlrobs
];
};
};
}

27
modules/dolphin.nix Normal file
View file

@ -0,0 +1,27 @@
{config, pkgs, ...}: {
environment.systemPackages = with pkgs; [
plasma5Packages.kio-admin
];
home-manager.users.${config.vars.user}.home.packages =
with pkgs; []
++ (with pkgs.plasma5Packages; [
ark
kcharselect
kdenlive
okular
# Dolphin & co
dolphin
dolphin-plugins
kdegraphics-thumbnailers
ffmpegthumbs
kio
kio-admin # needs to be both here and in system pkgs
kio-extras
kmime
])
++ (with pkgs.gnome; [
gnome-calculator
]);
}

View file

@ -12,16 +12,12 @@
# Config stuff # Config stuff
isNvidia = config.hardware.nvidia.modesetting.enable; isNvidia = config.hardware.nvidia.modesetting.enable;
isTouchscreen = config.hardware.sensor.iio.enable; isTouchscreen = config.hardware.sensor.iio.enable;
confPath = "${config.vars.configDir}/hypr/main.conf";
kdeconnect = config.programs.kdeconnect;
gnomekey = config.services.gnome.gnome-keyring;
xserver = config.services.xserver;
gset = pkgs.gsettings-desktop-schemas;
polkit = pkgs.plasma5Packages.polkit-kde-agent;
in { in {
# SYSTEM CONFIG # SYSTEM CONFIG
imports = [../greetd]; imports = [
../greetd
../dolphin.nix
];
programs = { programs = {
kdeconnect.enable = true; kdeconnect.enable = true;
@ -29,6 +25,7 @@ in {
}; };
services = { services = {
gnome.gnome-keyring.enable = true;
dbus.enable = true; dbus.enable = true;
gvfs.enable = true; gvfs.enable = true;
}; };
@ -41,15 +38,13 @@ in {
]; ];
}; };
environment.systemPackages = with pkgs; [
plasma5Packages.kio-admin
];
# HOME-MANAGER CONFIG # HOME-MANAGER CONFIG
home-manager.users.${config.vars.user} = { home-manager.users.${config.vars.user} = {
imports = [ imports = [
../../home/theme.nix
../../home/alacritty.nix ../../home/alacritty.nix
../../home/dconf.nix
../../home/obs.nix
../../home/theme.nix
../../home/wofi ../../home/wofi
]; ];
@ -64,8 +59,9 @@ in {
]); ]);
settings = { settings = {
env = env = let
[ gset = pkgs.gsettings-desktop-schemas;
in [
"XCURSOR_SIZE, 24" "XCURSOR_SIZE, 24"
"XDG_DATA_DIRS, ${builtins.concatStringsSep ":" [ "XDG_DATA_DIRS, ${builtins.concatStringsSep ":" [
"${gset}/share/gsettings-schemas/${gset.name}" "${gset}/share/gsettings-schemas/${gset.name}"
@ -105,7 +101,9 @@ in {
]) ])
]; ];
input = { input = let
xserver = config.services.xserver;
in {
kb_layout = xserver.layout; kb_layout = xserver.layout;
kb_variant = xserver.xkbVariant; kb_variant = xserver.xkbVariant;
follow_mouse = true; follow_mouse = true;
@ -116,17 +114,13 @@ in {
exec-once = exec-once =
[ [
"hyprctl setcursor Dracula-cursors 24" "hyprctl setcursor Dracula-cursors 24"
"${polkit}/libexec/polkit-kde-authentication-agent-1" "${pkgs.plasma5Packages.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
"swww init --no-cache && swww img -t none ${pkgs.dracula-theme}/wallpapers/waves.png" "swww init --no-cache && swww img -t none ${pkgs.dracula-theme}/wallpapers/waves.png"
"wl-paste --watch cliphist store" "wl-paste --watch cliphist store"
] "${config.programs.kdeconnect.package}/libexec/kdeconnectd"
++ (optionals (kdeconnect.enable) [
"${kdeconnect.package}/libexec/kdeconnectd"
"kdeconnect-indicator" "kdeconnect-indicator"
])
++ (optionals (gnomekey.enable) [
"gnome-keyring-daemon --start --components=secrets" "gnome-keyring-daemon --start --components=secrets"
]); ];
windowrule = [ windowrule = [
"noborder,^(wofi)$" "noborder,^(wofi)$"
@ -209,13 +203,37 @@ in {
special_scale_factor = 0.8; special_scale_factor = 0.8;
}; };
source = [confPath]; source = ["${config.vars.configDir}/hypr/main.conf"];
}; };
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
# School
virt-manager
bluej
camunda-modeler
libreoffice-fresh # TODO: declarative conf?
hunspell
hunspellDicts.en_CA
# Apps
thunderbird # TODO: use programs.thunderbird
spotifywm
photoqt
mpv
nextcloud-client
jellyfin-media-player
xournalpp
(pkgs.discord.override {
withOpenASAR = true;
withVencord = true;
})
prismlauncher-qt5
# tools # tools
wl-color-picker wl-color-picker
wl-clipboard
cliphist
grim grim
slurp slurp
swappy swappy
@ -240,8 +258,6 @@ in {
xorg.xrandr xorg.xrandr
libinput libinput
xclip xclip
wl-clipboard
cliphist
libnotify libnotify
]; ];
}; };