Compare commits

...

3 Commits

Author SHA1 Message Date
5c9a8860c2
home: Add autostart option and add some packages 2024-05-10 22:41:14 -04:00
f546ee06de
nullbox: configure autologin and autolock 2024-05-10 22:20:08 -04:00
6a329abe98
hyprland: fixes 2024-05-10 22:19:48 -04:00
5 changed files with 27 additions and 5 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

@ -76,10 +76,10 @@ in
options.nixfiles.sessions.hyprland = { options.nixfiles.sessions.hyprland = {
enable = lib.mkOption { enable = lib.mkOption {
description = "Whether to enable hyprland.";
type = lib.types.bool; type = lib.types.bool;
default = if (builtins.hasAttr "home-manager" osConfig) then osConfig.nixfiles.sessions.hyprland.enable else false; default = if (builtins.hasAttr "home-manager" osConfig) then osConfig.nixfiles.sessions.hyprland.enable else false;
example = true; example = true;
description = "Whether to enable hyprland.";
}; };
autolock = lib.mkOption { autolock = lib.mkOption {
@ -91,8 +91,8 @@ in
nixfiles.greetd.settings.autolock. nixfiles.greetd.settings.autolock.
''; '';
type = lib.types.bool; type = lib.types.bool;
default = osConfig.nixfiles.greetd.settings.autolock or false; default = osConfig.nixfiles.programs.greetd.settings.autolock or false;
defaultText = "osConfig.nixfiles.greetd.settings.autolock or false"; defaultText = "osConfig.nixfiles.programs.greetd.settings.autolock or false";
example = true; example = true;
}; };
}; };
@ -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

View File

@ -56,6 +56,11 @@
programs.adb.enable = true; programs.adb.enable = true;
programs.greetd = { programs.greetd = {
preset = "tuigreet"; preset = "tuigreet";
settings = {
autologin = true;
autologinUser = "nullbite";
autolock = true;
};
}; };
programs.unbound.enable = true; programs.unbound.enable = true;
common.remoteAccess.enable = true; common.remoteAccess.enable = true;