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} = {
imports = [
../../home/dconf.nix
../../home/firefox
./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" = {
name = "Jellyfin Media Player";
comment = "Desktop client for Jellyfin";

View file

@ -1,5 +1,6 @@
{
pkgs,
config,
lib,
...
}: let
@ -50,4 +51,26 @@ in {
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} = {
imports = [
../../home/dconf.nix
../../home/firefox
./home/dotfiles.nix

View file

@ -1,72 +1,12 @@
{
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;
};
{pkgs, ...}: {
home.packages =
(with pkgs.python311Packages; [
python
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; [
# 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
acpi
alsa-utils
fontfor
(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
isNvidia = config.hardware.nvidia.modesetting.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 {
# SYSTEM CONFIG
imports = [../greetd];
imports = [
../greetd
../dolphin.nix
];
programs = {
kdeconnect.enable = true;
@ -29,6 +25,7 @@ in {
};
services = {
gnome.gnome-keyring.enable = true;
dbus.enable = true;
gvfs.enable = true;
};
@ -41,15 +38,13 @@ in {
];
};
environment.systemPackages = with pkgs; [
plasma5Packages.kio-admin
];
# HOME-MANAGER CONFIG
home-manager.users.${config.vars.user} = {
imports = [
../../home/theme.nix
../../home/alacritty.nix
../../home/dconf.nix
../../home/obs.nix
../../home/theme.nix
../../home/wofi
];
@ -64,8 +59,9 @@ in {
]);
settings = {
env =
[
env = let
gset = pkgs.gsettings-desktop-schemas;
in [
"XCURSOR_SIZE, 24"
"XDG_DATA_DIRS, ${builtins.concatStringsSep ":" [
"${gset}/share/gsettings-schemas/${gset.name}"
@ -105,7 +101,9 @@ in {
])
];
input = {
input = let
xserver = config.services.xserver;
in {
kb_layout = xserver.layout;
kb_variant = xserver.xkbVariant;
follow_mouse = true;
@ -116,17 +114,13 @@ in {
exec-once =
[
"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"
"wl-paste --watch cliphist store"
]
++ (optionals (kdeconnect.enable) [
"${kdeconnect.package}/libexec/kdeconnectd"
"${config.programs.kdeconnect.package}/libexec/kdeconnectd"
"kdeconnect-indicator"
])
++ (optionals (gnomekey.enable) [
"gnome-keyring-daemon --start --components=secrets"
]);
];
windowrule = [
"noborder,^(wofi)$"
@ -209,13 +203,37 @@ in {
special_scale_factor = 0.8;
};
source = [confPath];
source = ["${config.vars.configDir}/hypr/main.conf"];
};
};
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
wl-color-picker
wl-clipboard
cliphist
grim
slurp
swappy
@ -240,8 +258,6 @@ in {
xorg.xrandr
libinput
xclip
wl-clipboard
cliphist
libnotify
];
};