diff --git a/flake.lock b/flake.lock index 4d5b13b..1d5508a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,26 @@ { "nodes": { + "anyrun": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1692476235, + "narHash": "sha256-NGUDp/24HCIVWE0xZNHIdzz3q2WDk7MQz1wC7ub/e2U=", + "owner": "Kirottu", + "repo": "anyrun", + "rev": "76af3eb198f376303194c31a83f2399a043acf1b", + "type": "github" + }, + "original": { + "owner": "Kirottu", + "repo": "anyrun", + "type": "github" + } + }, "caddy-with-plugins": { "inputs": { "flake-parts": [ @@ -60,11 +81,11 @@ ] }, "locked": { - "lastModified": 1694511957, - "narHash": "sha256-teCLY68npc0nuyOHYJURLuJSOME0yotJI29WXcpF1E4=", + "lastModified": 1695039393, + "narHash": "sha256-HXvRPTSfQ/fCqxYGvWOc1duSBdXcQlrYvyno8YZbyHI=", "owner": "nix-community", "repo": "disko", - "rev": "be98cffef02e5ebf438ea80b34b86e669c48eff1", + "rev": "9f29cedac79d0acf07b6341f9112f46dec3abb8f", "type": "github" }, "original": { @@ -84,11 +105,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1694574651, - "narHash": "sha256-D+pBiAEMsCRO9WP8Jn5oPsisr+ftFz7fgZOaix6MYUM=", + "lastModified": 1695032245, + "narHash": "sha256-FXUBdn1xH4HqUzKiYZGvwW5BX1AbDgw8w+WDI7rLkZE=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "844afe34cbe49d83e7ae016564db4f72237a0bfa", + "rev": "c724333b2d3235b01101d62908ed1d43d18ac515", "type": "github" }, "original": { @@ -170,6 +191,27 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "anyrun", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1685662779, + "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" }, @@ -264,11 +306,11 @@ ] }, "locked": { - "lastModified": 1694585439, - "narHash": "sha256-70BlfEsdURx5f8sioj8JuM+R4/SZFyE8UYrULMknxlI=", + "lastModified": 1695043542, + "narHash": "sha256-uUoftoffo9F+tLpepz99M5Z9dTPAiBy5EjYRScaNO1o=", "owner": "nix-community", "repo": "home-manager", - "rev": "a0ddf43b6268f1717afcda54133dea30435eb178", + "rev": "e63a6b34792884bfe4056d1ef561b5611589b8ad", "type": "github" }, "original": { @@ -368,11 +410,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1694432324, - "narHash": "sha256-bo3Gv6Cp40vAXDBPi2XiDejzp/kyz65wZg4AnEWxAcY=", + "lastModified": 1695033975, + "narHash": "sha256-GIUxbgLBhVyaKRxQw/NWYFLx7/jbKW3+U0HoSsMLPAs=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "ca41b8a227dd235b1b308217f116c7e6e84ad779", + "rev": "161b027169b19d3a0ad6bd0a8948edf0c0fb0f64", "type": "github" }, "original": { @@ -383,11 +425,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1694422566, - "narHash": "sha256-lHJ+A9esOz9vln/3CJG23FV6Wd2OoOFbDeEs4cMGMqc=", + "lastModified": 1694767346, + "narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "rev": "ace5093e36ab1e95cb9463863491bee90d5a4183", "type": "github" }, "original": { @@ -417,11 +459,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1694426803, - "narHash": "sha256-osusXQo0zkEqs502SNMffsKp1O9evpDM54A37MuyT2Q=", + "lastModified": 1694937365, + "narHash": "sha256-iHZSGrb9gVpZRR4B2ishUN/1LRKWtSHZNO37C8z1SmA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9a74ffb2ca1fc91c6ccc48bd3f8cbc1501bf7b8a", + "rev": "5d017a8822e0907fb96f7700a319f9fe2434de02", "type": "github" }, "original": { @@ -519,11 +561,12 @@ }, "root": { "inputs": { + "anyrun": "anyrun", "caddy-with-plugins": "caddy-with-plugins", "disko": "disko", "emacs-overlay": "emacs-overlay", "eww": "eww", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "flake-utils": "flake-utils", "ha-now-playing": "ha-now-playing", "home-manager": "home-manager", @@ -575,11 +618,11 @@ ] }, "locked": { - "lastModified": 1694571081, - "narHash": "sha256-VRA+gxhe4aciWTQ5uCKVY2ubOclk18h2aRlLzPbLqMw=", + "lastModified": 1695003086, + "narHash": "sha256-d1/ZKuBRpxifmUf7FaedCqhy0lyVbqj44Oc2s+P5bdA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0282ed291f0e25f30770df5d3f1ca33908ce44a4", + "rev": "b87a14abea512d956f0b89d0d8a1e9b41f3e20ff", "type": "github" }, "original": { @@ -596,11 +639,11 @@ "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { - "lastModified": 1694495315, - "narHash": "sha256-sZEYXs9T1NVHZSSbMqBEtEm2PGa7dEDcx0ttQkArORc=", + "lastModified": 1695057217, + "narHash": "sha256-xA7RVYauw4vnkceUl2aIDONfwuhnUbxVavbCvNS9ed4=", "owner": "Mic92", "repo": "sops-nix", - "rev": "ea208e55f8742fdcc0986b256bdfa8986f5e4415", + "rev": "4d284ca58ce5f48df79d99ab75b1ae3c3032b9ad", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 24ced1d..a674ceb 100644 --- a/flake.nix +++ b/flake.nix @@ -86,6 +86,11 @@ }; }; + anyrun = { + url = "github:Kirottu/anyrun"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + caddy-with-plugins = { url = "github:eboskma/caddy-with-plugins"; inputs = { diff --git a/home-manager/modules/anyrun/default.nix b/home-manager/modules/anyrun/default.nix new file mode 100644 index 0000000..8ffbf2f --- /dev/null +++ b/home-manager/modules/anyrun/default.nix @@ -0,0 +1,117 @@ +{ pkgs, config, lib, flake-inputs, ... }: +with lib; +let + cfg = config.eboskma.programs.anyrun; + anyrunPkgs = flake-inputs.anyrun.packages."${pkgs.system}"; +in +{ + options.eboskma.programs.anyrun = { enable = mkEnableOption "anyrun"; }; + + config = mkIf cfg.enable { + programs.anyrun = { + enable = true; + config = { + plugins = with anyrunPkgs; [ + applications + dictionary + rink + stdin + shell + symbols + translate + ]; + width = { fraction = 0.3; }; + x = { fraction = 0.5; }; + y = { absolute = 60; }; + layer = "overlay"; + }; + + extraConfigFiles = { + "applications.ron".text = '' + Config( + desktop_actions: true, + max_entries: 0, + terminal: Some("${config.wayland.windowManager.sway.config.terminal}") + ) + ''; + }; + extraCss = '' + window { + background: transparent; /* rgba(0, 0, 0, 0.8);*/ + } + + #match, + #entry, + #plugin, + #main { + background: transparent; + } + + #match.activatable { + padding: 12px 14px; + border-radius: 12px; + + color: white; + margin-top: 4px; + border: 2px solid transparent; + transition: all 0.3s ease; + } + + #match.activatable:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-top: 2px solid rgba(255, 255, 255, 0.1); + } + + #match.activatable #match-title { + font-size: 1.3rem; + } + + #match.activatable:hover { + border: 2px solid rgba(255, 255, 255, 0.4); + } + + #match-title, #match-desc { + color: inherit; + } + + #match.activatable:hover, #match.activatable:selected { + border-top-left-radius: 12px; + border-top-right-radius: 12px; + } + + #match.activatable:selected + #match.activatable, #match.activatable:hover + #match.activatable { + border-top: 2px solid transparent; + } + + #match.activatable:selected, #match.activatable:hover:selected { + background: rgba(255,255,255,0.1); + border: 2px solid #333333; + border-top: 2px solid #333333; + } + + #match, #plugin { + box-shadow: none; + } + + #entry { + color: white; + box-shadow: none; + border-radius: 12px; + border: 2px solid #333333; + } + + box#main { + background: rgba(36, 39, 58, 0.7); + border-radius: 16px; + padding: 8px; + box-shadow: 0px 2px 33px -5px rgba(0, 0, 0, 0.5); + } + + row:first-child { + margin-top: 6px; + } + ''; + }; + }; +} diff --git a/home-manager/modules/firefox/default.nix b/home-manager/modules/firefox/default.nix index 95ec3f1..27c038e 100644 --- a/home-manager/modules/firefox/default.nix +++ b/home-manager/modules/firefox/default.nix @@ -84,7 +84,12 @@ in config = mkIf cfg.enable { programs.firefox = { enable = true; - package = pkgs.firefox; + package = pkgs.firefox.override { + cfg = { + enableGnomeExtensions = true; + enableSpeechSynthesisSupport = true; + }; + }; profiles = { private = { diff --git a/home-manager/modules/sway/default.nix b/home-manager/modules/sway/default.nix index 058879a..dd68c84 100644 --- a/home-manager/modules/sway/default.nix +++ b/home-manager/modules/sway/default.nix @@ -127,14 +127,14 @@ in input = cfg.input; output = cfg.output; - # menu = "${pkgs.wofi}/bin/wofi --show drun -i | ${pkgs.findutils}/bin/xargs swaymsg exec --"; - menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab"; + # menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab"; + menu = "${config.programs.anyrun.package}/bin/anyrun"; keybindings = { "${mod}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}"; "${mod}+Shift+q" = "kill"; "${mod}+s" = "exec ${config.wayland.windowManager.sway.config.menu}"; - "${mod}+Shift+s" = "exec ${pkgs.wofi}/bin/wofi --show run | ${pkgs.findutils}/bin/xargs swaymsg exec --"; + # "${mod}+Shift+s" = "exec ${pkgs.wofi}/bin/wofi --show run | ${pkgs.findutils}/bin/xargs swaymsg exec --"; "${mod}+${config.wayland.windowManager.sway.config.left}" = "focus left"; "${mod}+${config.wayland.windowManager.sway.config.down}" = "focus down"; diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index d23ec13..754924f 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -87,7 +87,8 @@ in QT_QPA_PLATFORM = "wayland"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; QT_QPA_PLATFORMTHEME = "qt5ct"; - SDL_VIDEODRIVER = "wayland"; + # SDL_VIDEODRIVER = "wayland"; + AMD_VULKAN_ICD = "RADV"; NIXOS_OZONE_WL = "1"; }) ]; diff --git a/modules/greetd/default.nix b/modules/greetd/default.nix index eb31bec..7010e2c 100644 --- a/modules/greetd/default.nix +++ b/modules/greetd/default.nix @@ -5,17 +5,30 @@ }: with lib; let cfg = config.eboskma.greetd; + steamCfg = config.programs.steam; - style = builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString ../../home-manager/modules/sway/wallpapers/river-2560.png) ] (builtins.readFile ./greetd.css); + # style = builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString ../../home-manager/modules/sway/wallpapers/river-2560.png) ] (builtins.readFile ./greetd.css); + wallpaper = ../../home-manager/modules/sway/wallpapers/river-2560.png; + style = builtins.readFile ./greetd.css; swaySession = pkgs.writeShellScript "sway-session" '' ${pkgs.sway}/bin/sway --unsupported-gpu ''; + + steam-gamescope = + let + exports = builtins.attrValues (builtins.mapAttrs (n: v: "export ${n}=${v}") steamCfg.gamescopeSession.env); + in + pkgs.writeShellScriptBin "steam-gamescope" '' + ${builtins.concatStringsSep "\n" exports} + gamescope --steam ${toString steamCfg.gamescopeSession.args} -- steam -tenfoot -pipewire-dmabuf + ''; in { options.eboskma.greetd = { enable = mkEnableOption "enable greetd"; sway = mkEnableOption "sway"; + steam = mkEnableOption "steam"; wayvnc = mkEnableOption "wayvnc"; }; @@ -33,7 +46,7 @@ in }; programs.regreet = { - enable = true; + enable = false; settings = { background = { path = ../../home-manager/modules/sway/wallpapers/river-2560.png; @@ -58,7 +71,7 @@ in security.pam.services.greetd.u2fAuth = false; - # exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css; swaymsg exit" + # exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit" networking.firewall.allowedTCPPorts = lib.mkIf cfg.wayvnc [ 5900 ]; @@ -70,7 +83,7 @@ in ((lib.optional cfg.wayvnc "exec ${pkgs.wayvnc}/bin/wayvnc -g 0.0.0.0") ++ [ '' - exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit" + exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css -b ${wallpaper}; swaymsg exit" include /etc/sway/config.d/* '' ]); @@ -79,7 +92,10 @@ in }; "greetd/environments" = { text = concatStringsSep "\n" ((optional cfg.sway "${swaySession}") - ++ [ "${pkgs.bash}/bin/bash" ]); + ++ (optional cfg.steam "${steam-gamescope}") + ++ [ + "${pkgs.bash}/bin/bash" + ]); user = "greeter"; group = "greeter"; }; diff --git a/modules/greetd/greetd.css b/modules/greetd/greetd.css index 691f903..9d464c9 100644 --- a/modules/greetd/greetd.css +++ b/modules/greetd/greetd.css @@ -1,5 +1,4 @@ window { - background-image: url("file://{WALLPAPER}"); background-size: cover; background-position: center; } diff --git a/users/erwin/home.nix b/users/erwin/home.nix index 842f55b..41b15c8 100644 --- a/users/erwin/home.nix +++ b/users/erwin/home.nix @@ -22,6 +22,7 @@ in eboskma = { programs = { alacritty.enable = false; + anyrun.enable = true; atuin.enable = true; bat.enable = true; cargo = { @@ -103,7 +104,7 @@ in enable = true; output = { "DP-2" = { - # bg = "${./wallpapers/jwst-saturn-nircam-2560.png} fill"; + bg = "${../../home-manager/modules/sway/wallpapers/jwst-saturn-nircam-2560.png} fill"; mode = "2560x1440@165Hz"; adaptive_sync = "on"; max_render_time = "2"; @@ -206,6 +207,13 @@ in zeal ] ++ (with gst_all_1; [ gstreamer gstreamer.dev gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-vaapi ]); + + pointerCursor = { + name = "elementary"; + package = pkgs.pantheon.elementary-gtk-theme; + gtk.enable = true; + x11.enable = true; + }; }; xdg = { @@ -308,6 +316,7 @@ in imports = [ ../../modules/options + inputs.anyrun.nixosModules.home-manager ] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules))); }; @@ -321,10 +330,33 @@ in package = pkgs.steam.override { extraPkgs = sp: with sp; [ gamescope ]; }; + + gamescopeSession = { + enable = true; + args = [ + "--rt" + "--output-width" + "2560" + "--output-height" + "1440" + "--adaptive-sync" + "--filter" + "fsr" + "--expose-wayland" + ]; + # env = config.environment.sessionVariables; + }; }; gamescope = { enable = true; + capSysNice = true; args = [ + "--output-width" + "2560" + "--output-height" + "1440" + "--filter" + "fsr" "--rt" "--fullscreen" ];