diff --git a/hosts/algiz/default.nix b/hosts/algiz/default.nix index c5a577e..c309579 100644 --- a/hosts/algiz/default.nix +++ b/hosts/algiz/default.nix @@ -1,4 +1,5 @@ { + inputs, config, enabled, enableAttrs, @@ -6,6 +7,10 @@ ... }: { + imports = [ + inputs.comin.nixosModules.comin + ]; + oizys = { rune.motd = enabled; languages = "nim|node|python|nushell" |> listify; diff --git a/lib/generators.nix b/lib/generators.nix index a06f750..67a3a92 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -45,11 +45,9 @@ let nixosSystem { system = "x86_64-linux"; modules = - [ - inputs.comin.nixosModules.comin - ] + [] ++ (selfModules ''oizys'') - ++ (nixosModules ''lix-module|hyprland|sops-nix'') + ++ (nixosModules ''lix-module|sops-nix'') ++ (hostFiles hostName); specialArgs = commonSpecialArgs // { diff --git a/modules/desktop/window-managers/hyprland.nix b/modules/desktop/window-managers/hyprland.nix index 4a1b1b3..e3415a2 100644 --- a/modules/desktop/window-managers/hyprland.nix +++ b/modules/desktop/window-managers/hyprland.nix @@ -1,85 +1,82 @@ { + inputs, pkgs, config, - mkOizysModule, + lib, + # mkOizysModule, enabled, flake, ... }: -mkOizysModule config "hyprland" { - programs.hyprland = enabled; - security.pam.services.swaylock = { }; - # Optional, hint electron apps to use wayland: - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - - environment.systemPackages = - (with pkgs; [ - wl-mirror - wlr-randr - kanshi - - brightnessctl - udiskie - eww - - # notifications - libnotify - mako - - # utils - grimblast - ksnip - wl-clipboard - rofi-wayland - pwvucontrol - - #hypr ecosystem - hyprlock - hypridle - - catppuccin-cursors.mochaDark - - # not even clear why I need to add this but ¯\_(ツ)_/¯ - kdePackages.qtwayland - - ]) - ++ [ - (flake.pkg "hyprman") - ] - - # swww-git is broken - ++ (with (flake.pkgs "nixpkgs-wayland"); [ - mako - eww - wlr-randr - swww - ]); - - nixpkgs.overlays = [ - (flake.overlay "hyprland-contrib") - # (overlayFrom "nixpkgs-wayland") - # (overlayFrom "hyprland") +let + inherit (lib) mkEnableOption mkIf; + cfg = config.oizys.hyprland; +in +{ + imports = [ + inputs.hyprland.nixosModules.default ]; - services.getty = { - extraArgs = [ "--skip-login" ]; - loginOptions = "-p -- ${config.oizys.user}"; + options.oizys.hyprland.enable = mkEnableOption "hyprland"; + + config = mkIf cfg.enable { + programs.hyprland = enabled; + security.pam.services.swaylock = { }; + # Optional, hint electron apps to use wayland: + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + + environment.systemPackages = + (with pkgs; [ + wl-mirror + wlr-randr + kanshi + + brightnessctl + udiskie + eww + + # notifications + libnotify + mako + + # utils + grimblast + ksnip + wl-clipboard + rofi-wayland + pwvucontrol + + #hypr ecosystem + hyprlock + hypridle + + catppuccin-cursors.mochaDark + + # not even clear why I need to add this but ¯\_(ツ)_/¯ + kdePackages.qtwayland + + ]) + ++ [ + (flake.pkg "hyprman") + ] + + # swww-git is broken + ++ (with (flake.pkgs "nixpkgs-wayland"); [ + mako + eww + wlr-randr + swww + ]); + + nixpkgs.overlays = [ + (flake.overlay "hyprland-contrib") + # (overlayFrom "nixpkgs-wayland") + # (overlayFrom "hyprland") + ]; + + services.getty = { + extraArgs = [ "--skip-login" ]; + loginOptions = "-p -- ${config.oizys.user}"; + }; }; - - # using the below to autostart Hyprland - # broke my keybindings that were working before - # environment.etc = - # let - # activate-snippet = '' - # if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then - # exec Hyprland - # fi - # ''; - # in - # { - # "bashrc.local".text = activate-snippet; - # "zshenv.local".text = activate-snippet; - # }; - # - }