diff --git a/flake.nix b/flake.nix index c45259dc..f6df51ce 100644 --- a/flake.nix +++ b/flake.nix @@ -61,7 +61,7 @@ imageConfigurations = { nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; platform = "aarch64-linux"; format = "sd-aarch64"; }; nixos-iso-console = libx.mkImage { hostname = "nixos-iso-console"; format = "iso"; }; - nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "hyprland"; theme = "gruvbox";}; + nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "gnome"; }; nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; }; }; diff --git a/home-manager/hosts/nixos-iso-desktop/desktops/gnome/default.nix b/home-manager/hosts/nixos-iso-desktop/desktops/gnome/default.nix new file mode 100644 index 00000000..077404aa --- /dev/null +++ b/home-manager/hosts/nixos-iso-desktop/desktops/gnome/default.nix @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/home-manager/hosts/nixos-iso-desktop/desktops/hyprland/default.nix b/home-manager/hosts/nixos-iso-desktop/desktops/hyprland/default.nix new file mode 100644 index 00000000..e61a66bc --- /dev/null +++ b/home-manager/hosts/nixos-iso-desktop/desktops/hyprland/default.nix @@ -0,0 +1,51 @@ +{ theme, ... }: { + home.file = { + ".config/hypr/hyprland.conf" = { + enable = true; + text = '' + + # Monitor specific: + monitor=,2560x1440,auto,1 + $mainMod = SUPER + + # Start the config: + exec-once=bash ~/.config/hypr/start.sh + ''; + }; + # Set the custom launcher script + ".config/hypr/start.sh" = { + enable = true; + executable = true; + text = '' + #!/usr/bin/env bash + # https://wiki.hyprland.org/FAQ/#some-of-my-apps-take-a-really-long-time-to-open + dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP & + + # Set the wallpaper + swww init + + # Waybar + waybar & + + # Set up the idle management daemon + swayidle -w \ + timeout 120 'swaylock -f && playerctl pause' \ + timeout 180 'hyprctl dispatch dpms off' \ + timeout 300 'systemctl suspend-then-hibernate' \ + resume 'hyprctl dispatch dpms on' \ + before-sleep 'swaylock -f' \ + before-sleep 'playerctl pause' & + + # Automatic device mounting + udiskie & + + DIR=/etc/nixos/git/wallpapers/${theme} + IMG=`ls $DIR | shuf -n 1` + swww img $DIR/$IMG -t random & + + # Notification listener + mako + ''; + }; + }; +}