made obx-studio autostart and started libs

This commit is contained in:
Kristian Krsnik 2024-02-15 21:17:48 +01:00
parent b0c1be575b
commit ae4462d98f
Signed by: Kristian
GPG Key ID: FD1330AC9F909E85
4 changed files with 34 additions and 2 deletions

View File

@ -72,6 +72,7 @@
_module.args = {
inherit spicetify;
wallpaper = wallpaper.packages.${system}.default;
libs = import ./libs;
};
}

16
libs/default.nix Normal file
View File

@ -0,0 +1,16 @@
{
mkAutostart = {
pkgs,
name,
command,
}: {
source = "${
pkgs.makeDesktopItem {
name = "${name}-autostart";
desktopName = "${name}-autostart";
exec = command;
noDisplay = true;
}
}/share/applications/${name}-autostart.desktop";
};
}

View File

@ -26,17 +26,17 @@
./gnome.nix
./gpg.nix
./nvim
./obs.nix
./packages.nix
./spiceify.nix
./thunderbird.nix
./vscode.nix
./mpv.nix
./spiceify.nix
];
# Programs
programs = {
home-manager.enable = true; # Allow home-manager to manage itself
obs-studio.enable = true;
yt-dlp.enable = true;
};

15
systems/common/obs.nix Normal file
View File

@ -0,0 +1,15 @@
{
pkgs,
libs,
...
}: {
programs.obs-studio.enable = true;
xdg.configFile = {
"autostart/obs-autostart.desktop" = libs.mkAutostart {
inherit pkgs;
name = "obs";
command = "obs --startreplaybuffer";
};
};
}