home: Add autostart option and add some packages

This commit is contained in:
NullBite 2024-05-10 22:41:14 -04:00
parent f546ee06de
commit 5c9a8860c2
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
4 changed files with 19 additions and 2 deletions

View File

@ -7,6 +7,12 @@ in
{ {
options.nixfiles.common.wm = { options.nixfiles.common.wm = {
enable = lib.mkEnableOption "common window manager config"; enable = lib.mkEnableOption "common window manager config";
autostart = lib.mkOption {
description = "List of window manager agnostic commnads to run at window manager startup";
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ "steam -silent" ];
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# Common options for standalone window managers; many of these (or # Common options for standalone window managers; many of these (or

View File

@ -5,6 +5,8 @@ let
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.rustdesk-flutter inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.rustdesk-flutter
else else
pkgs.rustdesk-flutter; pkgs.rustdesk-flutter;
vesktop-ozone-cmd = "env NIXOS_OZONE_WL=1 vesktop --disable-gpu";
in in
{ {
options.nixfiles.packageSets.communication = { options.nixfiles.packageSets.communication = {
@ -14,7 +16,7 @@ in
xdg.desktopEntries.vesktop = lib.mkIf config.nixfiles.meta.graphical { xdg.desktopEntries.vesktop = lib.mkIf config.nixfiles.meta.graphical {
categories= ["Network" "InstantMessaging" "Chat"]; categories= ["Network" "InstantMessaging" "Chat"];
exec="env NIXOS_OZONE_WL=1 vesktop --disable-gpu %U"; exec=vesktop-ozone-cmd + " %U";
genericName="Internet Messenger"; genericName="Internet Messenger";
icon="vesktop"; icon="vesktop";
name="Vesktop"; name="Vesktop";
@ -25,6 +27,10 @@ in
}; };
}; };
nixfiles.common.wm.autostart = lib.optionals config.nixfiles.meta.graphical [
(vesktop-ozone-cmd + " --start-minimized")
];
home.packages = with pkgs; lib.optionals config.nixfiles.meta.graphical [ home.packages = with pkgs; lib.optionals config.nixfiles.meta.graphical [
element-desktop element-desktop
telegram-desktop telegram-desktop

View File

@ -5,6 +5,10 @@ let
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
nixfiles.common.wm.autostart = [
"steam -silent"
];
home.packages = with pkgs; [ home.packages = with pkgs; [
ludusavi ludusavi
rclone # needed to sync ludusavi rclone # needed to sync ludusavi

View File

@ -128,7 +128,8 @@ in
# Execute your favorite apps at launch # Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox # exec-once = waybar & hyprpaper & firefox
exec-once = (lib.optional cfg.autolock lock-cmd) ++ [ exec-once = (lib.optional cfg.autolock lock-cmd) ++ config.nixfiles.common.wm.autostart ++
[
wallpaper-cmd wallpaper-cmd
notifydaemon notifydaemon
polkit-agent polkit-agent