diff --git a/nix/configuration/roles/sway/default.nix b/nix/configuration/roles/sway/default.nix index 2a6a0b5..46c7949 100644 --- a/nix/configuration/roles/sway/default.nix +++ b/nix/configuration/roles/sway/default.nix @@ -259,6 +259,7 @@ in imports = [ ./graphical_session_target.nix ./iso.nix + ./rofimoji.nix ]; options.me.swayIncludes = lib.mkOption { diff --git a/nix/configuration/roles/sway/rofimoji.nix b/nix/configuration/roles/sway/rofimoji.nix new file mode 100644 index 0000000..4c5e880 --- /dev/null +++ b/nix/configuration/roles/sway/rofimoji.nix @@ -0,0 +1,52 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + rofimoji_sway_config = pkgs.writeTextFile { + name = "rofimoji.conf"; + text = '' + # Emoji selector + bindsym $mod+backslash exec ${pkgs.rofimoji}/bin/rofimoji --selector wofi + ''; + }; +in +{ + imports = [ ]; + + config = lib.mkIf config.me.graphical { + me.swayIncludes = [ + rofimoji_sway_config + ]; + + environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) { + hideMounts = true; + users.talexander = { + directories = [ + { + directory = ".local/share/rofimoji"; + user = "talexander"; + group = "talexander"; + mode = "0755"; + } + ]; + }; + }; + + nixpkgs.overlays = [ + (final: prev: { + rofimoji = prev.rofimoji.overrideAttrs (old: { + propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.wofi ]; + # postPatch = + # old.postPatch + # + '' + # wrapProgram $out/bin/rofimoji --prefix PATH : ${lib.makeBinPath [ pkgs.wofi ]} + # ''; + }); + }) + ]; + }; +}