nix: wayland things
Anirudh Oppiliappan x@icyphox.sh
Sun, 04 Sep 2022 11:41:05 +0530
10 files changed,
40 insertions(+),
25 deletions(-)
M
nix/bin/pw.nix
→
nix/bin/pw.nix
@@ -5,7 +5,7 @@ name = "pw";
gpg = "${pkgs.gnupg}/bin/gpg"; pwgen = "${pkgs.pwgen}/bin/pwgen"; git = "${pkgs.git}/bin/git"; - xclip = "${pkgs.xclip}/bin/xclip"; + copy = "${pkgs.wl-clipboard}/bin/wl-copy"; in pkgs.writeShellScriptBin name ''@@ -69,7 +69,7 @@ checkf "$PW_DIR/$1.gpg"
if [[ "$OSTYPE" =~ darwin* ]]; then show "$1" | head -1 | pbcopy | tr -d '\n' else - show "$1" | head -1 | ${xclip} -rmlastnl -selection clipboard + show "$1" | head -1 | ${copy} -n fi printf "pw: copied %s to clipboard\n" "$1" }
M
nix/bin/xurls.nix
→
nix/bin/xurls.nix
@@ -3,6 +3,7 @@
let name = "xurls"; fzy = "${pkgs.fzy}/bin/fzy"; + copy = "${pkgs.wl-clipboard}/bin/wl-copy"; in pkgs.writeShellScriptBin name ''@@ -12,7 +13,7 @@ mapfile -t urls < <(echo "$content" | grep -oE '(https?|ftp|file):/?//[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]')
mapfile -t wwws < <(echo "$content" | grep -oE '(http?s://)?www\.[a-zA-Z](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}(/\S+)*' | grep -vE '^https?://' |sed 's/^\(.*\)$/http:\/\/\1/') mapfile -t ips < <(echo "$content" | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(:[0-9]{1,5})?(/\S+)*' |sed 's/^\(.*\)$/http:\/\/\1/') mapfile -t gits < <(echo "$content" | grep -oE '(ssh://)?git@\S*' | sed 's/:/\//g' | sed 's/^\(ssh\/\/\/\)\{0,1\}git@\(.*\)$/https:\/\/\2/') - + items="$(printf '%s\n' "''${urls[@]}" "''${wwws[@]}" "''${ips[@]}" "''${gits[@]}" | grep -v '^$' | sort -u |@@ -22,6 +23,6 @@
[ -z "$items" ] && exit u="$(${fzy} <<< "$items" | awk '{ print $2 }')" - $BROWSER "$u" + ${copy} "$u" ''
M
nix/flake.lock
→
nix/flake.lock
@@ -102,11 +102,11 @@ "neovim-flake": "neovim-flake",
"nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1659168488, - "narHash": "sha256-UIhemfmjXfV+EOpM7wWMgIPkss+fZk/kdewUj/VxzXc=", + "lastModified": 1661069307, + "narHash": "sha256-RHkMuUVBsj8c25hX5CFAEcBslkTk/juvX18JlCDR1T0=", "owner": "icyphox", "repo": "neovim-nightly-overlay", - "rev": "5669f07851612ba17d660281cd390d2c086bafc4", + "rev": "d883a3ea9a354e797ebbe12a0be45edc15884839", "type": "github" }, "original": {@@ -125,11 +125,11 @@ ]
}, "locked": { "dir": "contrib", - "lastModified": 1659102441, - "narHash": "sha256-lo2FFXnvbHnMkaTwveAiILiVpmdHsCkgsTNEcRa5Ihc=", + "lastModified": 1661053033, + "narHash": "sha256-tUoH/Sy52Ri4qI05WHvH+9/rQN9jihneXUFeZUmLPZs=", "owner": "neovim", "repo": "neovim", - "rev": "e59bc078de624a5f3220bfd2713be3f8978c5672", + "rev": "6b9852cc4188d9ca7bce8e7592dcfca38539c743", "type": "github" }, "original": {@@ -141,11 +141,11 @@ }
}, "nixos-hardware": { "locked": { - "lastModified": 1658401027, - "narHash": "sha256-z/sDfzsFOoWNO9nZGfxDCNjHqXvSVZLDBDSgzr9qDXE=", + "lastModified": 1660407119, + "narHash": "sha256-04lWO0pDbhAXFdL4v2VzzwgxrZ5IefKn+TmZPiPeKxg=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "83009edccc2e24afe3d0165ed98b60ff7471a5f8", + "rev": "12620020f76b1b5d2b0e6fbbda831ed4f5fe56e1", "type": "github" }, "original": {@@ -156,11 +156,11 @@ }
}, "nixpkgs": { "locked": { - "lastModified": 1659077768, - "narHash": "sha256-P0XIHBVty6WIuIrk2DZNvLcYev9956y1prT4zL212H8=", + "lastModified": 1660908602, + "narHash": "sha256-SwZ85IPWvC4NxxFhWhRMTJpApSHbY1u4YK2UFWEBWvY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2a93ea177c3d7700b934bf95adfe00c435f696b8", + "rev": "495b19d5b3e62b4ec7e846bdfb6ef3d9c3b83492", "type": "github" }, "original": {@@ -172,11 +172,11 @@ }
}, "nixpkgs_2": { "locked": { - "lastModified": 1659077768, - "narHash": "sha256-P0XIHBVty6WIuIrk2DZNvLcYev9956y1prT4zL212H8=", + "lastModified": 1660998696, + "narHash": "sha256-N5eDv9THZz5pFn7NR1swaFrAJYByfrA5gU5L7JONItA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2a93ea177c3d7700b934bf95adfe00c435f696b8", + "rev": "13711c9ab9f5a160a44affb7a6221be53318a873", "type": "github" }, "original": {
M
nix/home.nix
→
nix/home.nix
@@ -51,6 +51,10 @@ signal-desktop
aerc calibre pinentry + kontact + kmail + korganizer + libreoffice-qt ] ++ (import ./bin { inherit pkgs theme host; });
M
nix/hosts/wyndle/configuration.nix
→
nix/hosts/wyndle/configuration.nix
@@ -48,6 +48,7 @@ # dhcpcd.enable = true;
hostName = "wyndle"; useDHCP = false; interfaces.wlp6s0.useDHCP = true; + firewall.checkReversePath = "loose"; }; i18n.defaultLocale = "en_US.UTF-8";@@ -72,6 +73,7 @@ };
chromium = { commandLineArgs = "--ozone-platform=wayland"; }; + firefox.enablePlasmaBrowserIntegration = true; }; nixpkgs.overlays = with self.overlays; [@@ -228,6 +230,7 @@ };
programs = { steam.enable = true; + gamemode.enable = true; }; nix = {
M
nix/programs/bash.nix
→
nix/programs/bash.nix
@@ -42,11 +42,9 @@
TERM = "xterm-256color-italic"; EDITOR = "nvim"; MANPAGER = "nvim +Man!"; - BROWSER = "chromium"; PW_DIR = "$HOME/.pw"; PW_KEY = "x@icyphox.sh"; PATH = "$PATH:$HOME/go/bin:$HOME/bin"; - NIX_OZONE_WL = "1"; };
M
nix/programs/default.nix
→
nix/programs/default.nix
@@ -14,8 +14,8 @@ ./git.nix
./neovim.nix ./readline.nix ./tmux.nix - ./zathura.nix - # ./firefox.nix + # ./zathura.nix + ./firefox.nix ]; programs = {
M
nix/programs/firefox.nix
→
nix/programs/firefox.nix
@@ -8,6 +8,12 @@ # XXX: Make sure to enable toolkit.legacyUserProfileCustomizations.stylesheets in about:config.
{ programs.firefox = { enable = true; + package = pkgs.wrapFirefox pkgs.firefox-unwrapped { + forceWayland = true; + extraPolicies = { + ExtensionSettings = { }; + }; + }; profiles = { icy = { isDefault = true;
M
nix/programs/neovim.nix
→
nix/programs/neovim.nix
@@ -19,7 +19,7 @@ in
{ programs.neovim = { enable = true; - withNodeJs = false; + withNodeJs = true; vimAlias = true; withPython3 = true; extraPackages = with pkgs; [@@ -27,6 +27,9 @@ gotools
gopls go nodePackages.vscode-langservers-extracted + nodePackages.typescript-language-server + nodePackages.typescript + nodePackages.eslint sumneko-lua-language-server ]; extraConfig = ''
M
nix/services/default.nix
→
nix/services/default.nix
@@ -7,7 +7,7 @@
{ imports = [ - ./dunst.nix + # ./dunst.nix ./picom.nix ./sxhkd.nix ./mbsync.nix