From 467552d5876ca2535a270c506fbfbd54946fe348 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 21 Aug 2022 07:56:02 +0530 Subject: switch to iwd --- flake.lock | 164 +++++++++++++++--------------------------- flake.nix | 4 +- home.nix | 1 + hosts/olive/configuration.nix | 14 ++-- programs/default.nix | 5 +- programs/git.nix | 56 +++++++-------- programs/neovim.nix | 9 ++- services/sxhkd.nix | 13 +++- 8 files changed, 112 insertions(+), 154 deletions(-) diff --git a/flake.lock b/flake.lock index 4714032..d98000d 100644 --- a/flake.lock +++ b/flake.lock @@ -2,7 +2,10 @@ "nodes": { "fenix": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": [ + "prompt", + "nixpkgs" + ], "rust-analyzer-src": "rust-analyzer-src" }, "locked": { @@ -21,15 +24,18 @@ }, "fenix_2": { "inputs": { - "nixpkgs": "nixpkgs_5", + "nixpkgs": [ + "statix", + "nixpkgs" + ], "rust-analyzer-src": "rust-analyzer-src_2" }, "locked": { - "lastModified": 1642141613, - "narHash": "sha256-WFS7T5oOLD8anu/77iz7EPz7zQsJZtP5qVa5485k3dI=", + "lastModified": 1645251813, + "narHash": "sha256-cQ66tGjnZclBCS3nD26mZ5fUH+3/HnysGffBiWXUSHk=", "owner": "nix-community", "repo": "fenix", - "rev": "d75ffc9f1d3b60bb597e48ae01f486a6de27d30e", + "rev": "9892337b588c38ec59466a1c89befce464aae7f8", "type": "github" }, "original": { @@ -41,11 +47,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1641205782, - "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", "owner": "edolstra", "repo": "flake-compat", - "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", "type": "github" }, "original": { @@ -56,11 +62,11 @@ }, "flake-utils": { "locked": { - "lastModified": 1629481132, - "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "owner": "numtide", "repo": "flake-utils", - "rev": "997f7efcb746a9c140ce1f13c72263189225f482", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", "type": "github" }, "original": { @@ -71,7 +77,10 @@ }, "gitignore": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": [ + "prompt", + "nixpkgs" + ] }, "locked": { "lastModified": 1635165013, @@ -89,7 +98,10 @@ }, "gitignore_2": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": [ + "statix", + "nixpkgs" + ] }, "locked": { "lastModified": 1635165013, @@ -112,16 +124,16 @@ ] }, "locked": { - "lastModified": 1642653493, - "narHash": "sha256-22mGPjiHUo2Jmze4IjXCJLjeK2mbvvCztHmUyUMr4yw=", + "lastModified": 1656169755, + "narHash": "sha256-Nlnm4jeQWEGjYrE6hxi/7HYHjBSZ/E0RtjCYifnNsWk=", "owner": "nix-community", "repo": "home-manager", - "rev": "28b9ae40c45c5e7711c353fee1b7af734e293979", + "rev": "4a3d01fb53f52ac83194081272795aa4612c2381", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-21.11", + "ref": "release-22.05", "repo": "home-manager", "type": "github" } @@ -133,11 +145,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1644135144, - "narHash": "sha256-ga02Em84w/rmDVoHha8PG9wiznz9Ew7ReETbXnokj7M=", + "lastModified": 1660983413, + "narHash": "sha256-qy254SuW4aeKoCSDkHc94PvBbiWBwKE2rYCbg2YgByA=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "98a805c76bf18c9a45b0e0c729cc0e2975c25628", + "rev": "a8da96a656f22d5dfdd090a32293187159cb55ee", "type": "github" }, "original": { @@ -156,11 +168,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1644113939, - "narHash": "sha256-n5rTM+kjEoXxTqaHle4AhrSiqRW2fc2U+Kor1whbaXQ=", + "lastModified": 1660982695, + "narHash": "sha256-LJrwB5xU5+9ym8HY0eEA1QfUDb+UF9PWMy23WChGXdY=", "owner": "neovim", "repo": "neovim", - "rev": "8215c05945054755b2c3cadae198894372dbfe0f", + "rev": "1cc4706e94489498b12c4844c1b3a2e9aa5cc921", "type": "github" }, "original": { @@ -172,11 +184,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1641965797, - "narHash": "sha256-AfxfIzAZbt9aAzpVBn0Bwhd/M4Wix7G91kEjm9H6FPo=", + "lastModified": 1660407119, + "narHash": "sha256-04lWO0pDbhAXFdL4v2VzzwgxrZ5IefKn+TmZPiPeKxg=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "87a35a0d58f546dc23f37b4f6af575d0e4be6a7a", + "rev": "12620020f76b1b5d2b0e6fbbda831ed4f5fe56e1", "type": "github" }, "original": { @@ -187,11 +199,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1643805626, - "narHash": "sha256-AXLDVMG+UaAGsGSpOtQHPIKB+IZ0KSd9WS77aanGzgc=", + "lastModified": 1660819943, + "narHash": "sha256-TRZV/mlW1eYuojqDC3ueYWj7jsTKXJCtyMLNYX/Ybtw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "554d2d8aa25b6e583575459c297ec23750adb6cb", + "rev": "8ea014acc33da95ea56c902229957d8225005163", "type": "github" }, "original": { @@ -203,80 +215,20 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1643347846, - "narHash": "sha256-O0tyXF//ppRpe9yT1Uu5n34yI2MWDyY6ZiJ4Qn5zIkE=", + "lastModified": 1660926553, + "narHash": "sha256-19Ib1b7Ny+yGhnxwnH1KhhB2hvALuNuqevA6XzqkQmo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5bb20f9dc70e9ee16e21cc404b6508654931ce41", + "rev": "00e376e3f3c22d991052dfeaf154c42b09deeb29", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-22.05", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1643347846, - "narHash": "sha256-O0tyXF//ppRpe9yT1Uu5n34yI2MWDyY6ZiJ4Qn5zIkE=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "5bb20f9dc70e9ee16e21cc404b6508654931ce41", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1643322911, - "narHash": "sha256-WLe4lXAYXH/v80iO02npX1wdXq4nIVEHJTONLXbQrL0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d9e21f284317f85b3476c0043f4efea87a226c3a", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1643347846, - "narHash": "sha256-O0tyXF//ppRpe9yT1Uu5n34yI2MWDyY6ZiJ4Qn5zIkE=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "5bb20f9dc70e9ee16e21cc404b6508654931ce41", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1643322911, - "narHash": "sha256-WLe4lXAYXH/v80iO02npX1wdXq4nIVEHJTONLXbQrL0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d9e21f284317f85b3476c0043f4efea87a226c3a", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, "prompt": { "inputs": { "fenix": "fenix", @@ -286,11 +238,11 @@ ] }, "locked": { - "lastModified": 1643476516, - "narHash": "sha256-v1reqZPpdlyyOYs7ygbvhsH702++3bHdFe6RayJagvw=", - "ref": "master", - "rev": "4d3e72f5f03b5a0db1d69f262990a0519a9d8947", - "revCount": 2, + "lastModified": 1643513342, + "narHash": "sha256-t819RkW5NiURx4lJlGMfHW3IuAMJtK29jUpAqUixKeg=", + "ref": "refs/heads/master", + "rev": "8b1dd1f5609447f5d862e330a75a4b2a0dfc3929", + "revCount": 3, "type": "git", "url": "https://git.peppe.rs/cli/prompt" }, @@ -329,11 +281,11 @@ "rust-analyzer-src_2": { "flake": false, "locked": { - "lastModified": 1642101527, - "narHash": "sha256-C4zcaWULWlrirpEt/pA85CCMBt+7SWZweMaMJ7EvrXw=", + "lastModified": 1645205556, + "narHash": "sha256-e4lZW3qRyOEJ+vLKFQP7m2Dxh5P44NrnekZYLxlucww=", "owner": "rust-analyzer", "repo": "rust-analyzer", - "rev": "b4c31481a554d0132003228ba319bd9476fe85ae", + "rev": "acf5874b39f3dc5262317a6074d9fc7285081161", "type": "github" }, "original": { @@ -352,11 +304,11 @@ ] }, "locked": { - "lastModified": 1643431421, - "narHash": "sha256-LOuaDkOU5E+I6NTLboU1q5Of2HBAMALfxdg2gQTF2zg=", - "ref": "master", - "rev": "8e4eeb979ebaa8f0f461e66d986a75c3a80220b6", - "revCount": 106, + "lastModified": 1657460333, + "narHash": "sha256-5o6zMBASEsGKtjKDb3SizJnN9A7qpOcbzWBXsacfMyc=", + "ref": "refs/heads/master", + "rev": "6422c959d365dee2fda5eda8858fefad31f17b25", + "revCount": 129, "type": "git", "url": "https://git.peppe.rs/languages/statix" }, diff --git a/flake.nix b/flake.nix index 350fcf2..ce35ce8 100644 --- a/flake.nix +++ b/flake.nix @@ -2,12 +2,12 @@ description = "nerdypepper's nixos config"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; nixos-hardware.url = "github:nixos/nixos-hardware"; home-manager = { - url = "github:nix-community/home-manager/release-21.11"; + url = "github:nix-community/home-manager/release-22.05"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/home.nix b/home.nix index c113997..adeaace 100644 --- a/home.nix +++ b/home.nix @@ -58,6 +58,7 @@ inotify-tools rtorrent sxiv + lftp # meta nixpkgs-review diff --git a/hosts/olive/configuration.nix b/hosts/olive/configuration.nix index 5ecce25..c4e7f17 100644 --- a/hosts/olive/configuration.nix +++ b/hosts/olive/configuration.nix @@ -14,10 +14,8 @@ networking = { hostName = "olive"; wireless = { - enable = true; - interfaces = [ - "wlp2s0" - ]; + iwd.enable = true; + interfaces = [ "wlan0" ]; environmentFile = "/home/np/.wireless.env"; networks = { Sanic.psk = "@PSK_SANI@"; @@ -31,10 +29,10 @@ ''; }; useDHCP = false; - interfaces.wlp2s0.useDHCP = true; + interfaces.wlan0.useDHCP = true; }; - #networking.nameservers = [ "1.1.1.1" "1.0.0.1" ]; + networking.nameservers = [ "1.1.1.1" "1.0.0.1" ]; i18n.defaultLocale = "en_US.UTF-8"; time.timeZone = "Asia/Kolkata"; @@ -124,10 +122,10 @@ nix = { package = pkgs.nixUnstable; extraOptions = '' - experimental-features = nix-command flakes ca-derivations + experimental-features = nix-command flakes warn-dirty = false keep-outputs = false - keep-derivations = true + keep-derivations = false ''; settings = { trusted-users = [ diff --git a/programs/default.nix b/programs/default.nix index 8157c8a..2b12888 100644 --- a/programs/default.nix +++ b/programs/default.nix @@ -27,10 +27,7 @@ direnv = { enable = true; enableBashIntegration = true; - nix-direnv = { - enable = true; - enableFlakes = true; - }; + nix-direnv.enable = true; }; autojump = { enable = true; diff --git a/programs/git.nix b/programs/git.nix index dc842ce..b906efa 100644 --- a/programs/git.nix +++ b/programs/git.nix @@ -9,9 +9,35 @@ with theme; programs.git = { enable = true; ignores = [ ".envrc" ]; - delta.enable = true; userEmail = "nerdy@peppe.rs"; userName = "Akshay"; + delta = { + enable = true; + options = { + features = "decorations labels"; + syntax-theme = "none"; + zero-style = "8"; + navigate = "true"; + keep-plus-minus-markers = "true"; + decorations = { + file-decoration-style = "none"; + whitespace-error-style = "22 reverse"; + minus-style = "${base08}"; + minus-emph-style = "${base08} bold"; + plus-style = "${base0B}"; + plus-emph-style = "${base0B} bold"; + file-style = "7 italic"; + hunk-header-style = "7"; + hunk-header-decoration-style = "8 ul"; + }; + labels = { + file-modified-label = " MODIFIED "; + file-removed-label = " REMOVED "; + file-added-label = " ADDED "; + file-renamed-label = " RENAMED "; + }; + }; + }; extraConfig = { commit.verbose = true; core = { @@ -20,30 +46,4 @@ with theme; }; }; } -# delta = { -# enable = true; -# options = { -# features = "decorations labels"; -# syntax-theme = "none"; -# zero-style = "8"; -# navigate = "true"; -# keep-plus-minus-markers = "true"; -# decorations = { -# file-decoration-style = "none"; -# whitespace-error-style = "22 reverse"; -# minus-style = "${base08}"; -# minus-emph-style = "${base08} bold"; -# plus-style = "${base0B}"; -# plus-emph-style = "${base0B} bold"; -# file-style = "7 italic"; -# hunk-header-style = "7"; -# hunk-header-decoration-style = "8 ul"; -# }; -# labels = { -# file-modified-label = " MODIFIED "; -# file-removed-label = " REMOVED "; -# file-added-label = " ADDED "; -# file-renamed-label = " RENAMED "; -# }; -# }; -# }; + diff --git a/programs/neovim.nix b/programs/neovim.nix index f108993..6095e0f 100644 --- a/programs/neovim.nix +++ b/programs/neovim.nix @@ -12,11 +12,10 @@ vimAlias = true; withPython3 = true; extraPackages = with pkgs; [ - gcc - python37Packages.yapf - hlint - ocamlformat - ocamlPackages.ocaml-lsp + # gcc + # python37Packages.yapf + # hlint + # ocamlformat ]; plugins = with pkgs.vimPlugins; [ # neovim only diff --git a/services/sxhkd.nix b/services/sxhkd.nix index 8658875..debe1b5 100644 --- a/services/sxhkd.nix +++ b/services/sxhkd.nix @@ -4,6 +4,9 @@ , ... }: +let + jumpTo = app: "${pkgs.xdotool}/bin/xdotool search \"${app}\" windowactivate"; +in { services.sxhkd = { enable = true; @@ -11,7 +14,15 @@ "XF86Audio{Lower,Raise}Volume" = "${pkgs.alsaUtils}/bin/amixer sset Master 2%{-,+}"; "XF86AudioMute" = "${pkgs.alsaUtils}/bin/amixer sset Master toggle"; "XF86MonBrightness{Down,Up}" = "${pkgs.light}/bin/light -{U,A} 5"; - "super + Escape" = "pkill -USR1 -x sxhkd"; + + # jump to firefox + "super + alt + shift + ctrl + f" = jumpTo "Mozilla Firefox"; + + # jump to st + "super + alt + shift + ctrl + s" = jumpTo "st"; + + # jump to zathura + "super + alt + shift + ctrl + z" = jumpTo "zathura"; }; }; } -- cgit v1.2.3