mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: add startup commands as module
This commit is contained in:
parent
956c260268
commit
5e2aae9558
7 changed files with 156 additions and 78 deletions
|
|
@ -5,4 +5,5 @@
|
|||
input = import ./input.nix;
|
||||
nixos = import ./nixos.nix;
|
||||
waybar = import ./waybar.nix;
|
||||
startup = import ./startup.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,16 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.isNixos = lib.mkEnableOption "nixos host";
|
||||
config.swarselsystems.startup = lib.mkIf (!config.swarselsystems.isNixos) [
|
||||
{
|
||||
command = "sleep 60 && nixGL nextcloud --background";
|
||||
}
|
||||
{ command = "sleep 60 && nixGL discord --start-minimized -enable-features=UseOzonePlatform -ozone-platform=wayland"; }
|
||||
{ command = "sleep 60 && nixGL syncthingtray --wait"; }
|
||||
{ command = "sleep 60 && ANKI_WAYLAND=1 nixGL anki"; }
|
||||
{ command = "nm-applet --indicator"; }
|
||||
{ command = "sleep 60 && OBSIDIAN_USE_WAYLAND=1 nixGL obsidian -enable-features=UseOzonePlatform -ozone-platform=wayland"; }
|
||||
{ command = "sleep 60 && element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
18
modules/home/startup.nix
Normal file
18
modules/home/startup.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkOption types;
|
||||
in
|
||||
{
|
||||
|
||||
options.swarselsystems.startup = mkOption {
|
||||
type = types.listOf (types.attrsOf types.str);
|
||||
default = [
|
||||
{ command = "nextcloud --background"; }
|
||||
{ command = "discord --start-minimized"; }
|
||||
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
||||
{ command = "ANKI_WAYLAND=1 anki"; }
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
|
||||
{ command = "nm-applet"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue