From a4b47d13438e11339059b502123175885d717b70 Mon Sep 17 00:00:00 2001 From: Uttarayan Mondal Date: Tue, 11 Jun 2024 18:09:56 +0530 Subject: [PATCH] feat: Added auth.nix --- common/auth.nix | 17 ++++ common/gui.nix | 13 +-- common/home.nix | 3 +- flake.lock | 212 ++++++++++++++++++++++++++---------------------- 4 files changed, 133 insertions(+), 112 deletions(-) create mode 100644 common/auth.nix diff --git a/common/auth.nix b/common/auth.nix new file mode 100644 index 00000000..a20cfef7 --- /dev/null +++ b/common/auth.nix @@ -0,0 +1,17 @@ +{ + pkgs, + inputs, + ... +}: { + # import the home-manager module + imports = [inputs._1password-shell-plugins.hmModules.default]; + programs = { + _1password-shell-plugins = { + # enable 1Password shell plugins for bash, zsh, and fish shell + enable = true; + # the specified packages as well as 1Password CLI will be + # automatically installed and configured to use shell plugins + plugins = with pkgs; [awscli2 cachix]; + }; + }; +} diff --git a/common/gui.nix b/common/gui.nix index df402eb7..05fe9ee5 100644 --- a/common/gui.nix +++ b/common/gui.nix @@ -8,10 +8,10 @@ lib.attrsets.optionalAttrs device.hasGui { home.packages = with pkgs; [ + _1password # neovide ] ++ lib.optionals device.isLinux [ - _1password _1password-gui bitwarden discord @@ -41,15 +41,4 @@ lib.attrsets.optionalAttrs device.hasGui { wl-clipboard ]; - # import the home-manager module - imports = [inputs._1password-shell-plugins.hmModules.default]; - programs = { - _1password-shell-plugins = { - # enable 1Password shell plugins for bash, zsh, and fish shell - enable = true; - # the specified packages as well as 1Password CLI will be - # automatically installed and configured to use shell plugins - plugins = with pkgs; [gh awscli2 cachix]; - }; - }; } diff --git a/common/home.nix b/common/home.nix index f2e8fab4..5cce9db9 100644 --- a/common/home.nix +++ b/common/home.nix @@ -39,6 +39,7 @@ in { ./kitty.nix ./gui.nix + ./auth.nix ./tmux.nix ./nvim.nix ./goread.nix @@ -78,7 +79,7 @@ in { # Misc qmk - bitwarden-cli + # bitwarden-cli p7zip yt-dlp spotdl diff --git a/flake.lock b/flake.lock index ba6504e1..8214e1c8 100644 --- a/flake.lock +++ b/flake.lock @@ -243,11 +243,11 @@ ] }, "locked": { - "lastModified": 1711299236, - "narHash": "sha256-6/JsyozOMKN8LUGqWMopKTSiK8N79T8Q+hcxu2KkTXg=", + "lastModified": 1717535930, + "narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=", "owner": "ipetkov", "repo": "crane", - "rev": "880573f80d09e18a11713f402b9e6172a085449f", + "rev": "55e7754ec31dac78980c8be45f8a28e80e370946", "type": "github" }, "original": { @@ -288,11 +288,11 @@ ] }, "locked": { - "lastModified": 1717290123, - "narHash": "sha256-K8O2KQEbA+NIAc8BDsWV6QKqU3i9M+YTUi4zzmLRy1s=", + "lastModified": 1718078026, + "narHash": "sha256-LbQabH6h86ZzTvDnaZHmMwedRZNB2jYtUQzmoqWQoJ8=", "owner": "ipetkov", "repo": "crane", - "rev": "ae1453ffd0f8f684e863685c317a953317db2b79", + "rev": "a3f0c63eed74a516298932b9b1627dd80b9c3892", "type": "github" }, "original": { @@ -693,11 +693,11 @@ ] }, "locked": { - "lastModified": 1709336216, - "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { @@ -828,7 +828,7 @@ }, "flake-utils_10": { "inputs": { - "systems": "systems_12" + "systems": "systems_11" }, "locked": { "lastModified": 1701680307, @@ -846,7 +846,7 @@ }, "flake-utils_11": { "inputs": { - "systems": "systems_13" + "systems": "systems_12" }, "locked": { "lastModified": 1710146030, @@ -894,7 +894,7 @@ }, "flake-utils_14": { "inputs": { - "systems": "systems_15" + "systems": "systems_14" }, "locked": { "lastModified": 1701680307, @@ -912,7 +912,7 @@ }, "flake-utils_15": { "inputs": { - "systems": "systems_16" + "systems": "systems_15" }, "locked": { "lastModified": 1705309234, @@ -930,7 +930,7 @@ }, "flake-utils_16": { "inputs": { - "systems": "systems_17" + "systems": "systems_16" }, "locked": { "lastModified": 1710146030, @@ -948,7 +948,7 @@ }, "flake-utils_17": { "inputs": { - "systems": "systems_18" + "systems": "systems_17" }, "locked": { "lastModified": 1710146030, @@ -1037,7 +1037,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_8" + "systems": "systems_7" }, "locked": { "lastModified": 1705309234, @@ -1055,7 +1055,7 @@ }, "flake-utils_7": { "inputs": { - "systems": "systems_9" + "systems": "systems_8" }, "locked": { "lastModified": 1710146030, @@ -1073,7 +1073,7 @@ }, "flake-utils_8": { "inputs": { - "systems": "systems_10" + "systems": "systems_9" }, "locked": { "lastModified": 1685518550, @@ -1091,7 +1091,7 @@ }, "flake-utils_9": { "inputs": { - "systems": "systems_11" + "systems": "systems_10" }, "locked": { "lastModified": 1685518550, @@ -1315,11 +1315,11 @@ ] }, "locked": { - "lastModified": 1717525419, - "narHash": "sha256-5z2422pzWnPXHgq2ms8lcCfttM0dz+hg+x1pCcNkAws=", + "lastModified": 1717931644, + "narHash": "sha256-Sz8Wh9cAiD5FhL8UWvZxBfnvxETSCVZlqWSYWaCPyu0=", "owner": "nix-community", "repo": "home-manager", - "rev": "a7117efb3725e6197dd95424136f79147aa35e5b", + "rev": "3d65009effd77cb0d6e7520b68b039836a7606cf", "type": "github" }, "original": { @@ -1373,18 +1373,25 @@ }, "hyprlang": { "inputs": { + "hyprutils": [ + "hyprlock", + "hyprutils" + ], "nixpkgs": [ "hyprlock", "nixpkgs" ], - "systems": "systems_6" + "systems": [ + "hyprlock", + "systems" + ] }, "locked": { - "lastModified": 1713121246, - "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=", + "lastModified": 1717881852, + "narHash": "sha256-XeeVoKHQgfKuXoP6q90sUqKyl7EYy3ol2dVZGM+Jj94=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706", + "rev": "ec6938c66253429192274d612912649a0cfe4d28", "type": "github" }, "original": { @@ -1396,17 +1403,18 @@ "hyprlock": { "inputs": { "hyprlang": "hyprlang", + "hyprutils": "hyprutils", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_7" + "systems": "systems_6" }, "locked": { - "lastModified": 1716987277, - "narHash": "sha256-l8aa+XPDbM3Mf3W4ukC/tBBHVZE8A3att4KLXrnyKSI=", + "lastModified": 1717883389, + "narHash": "sha256-2A4Q56JFd3t9j3Xpa0kxw2fjv8nNqgNBOA34rRcLA8I=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "e07d4110dc0b9d1786403aa760232564ad28b6fa", + "rev": "c5b8ad03d03ddbd2b0ff8615c2f6dba31374b6a8", "type": "github" }, "original": { @@ -1415,6 +1423,31 @@ "type": "github" } }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": [ + "hyprlock", + "systems" + ] + }, + "locked": { + "lastModified": 1717881334, + "narHash": "sha256-a0inRgJhPL6v9v7RPM/rx1kbXdfe3xJA1c9z0ZkYnh4=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "0693f9398ab693d89c9a0aa3b3d062dd61b7a60e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, "ironbar": { "inputs": { "crane": "crane_2", @@ -1425,11 +1458,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1717448400, - "narHash": "sha256-9Kc0M0DWe9Yr80Ph4ZJHEsnnaHRniSX1SA3PfIxH0i8=", + "lastModified": 1718034396, + "narHash": "sha256-ScxQEG/yfKyN023DVuyBVheDUsGIU79v2Nu3W2L0Az8=", "owner": "JakeStanger", "repo": "ironbar", - "rev": "b0132bdb2b78359e01ec8c790b63047b331e4a28", + "rev": "576853f8a085de534119a561c1f5f1b977377f7a", "type": "github" }, "original": { @@ -1451,11 +1484,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1717686691, - "narHash": "sha256-LF4zVaSsJ83wq6j+4lm/olK2V71KAJHNJbD42mF+fr8=", + "lastModified": 1717943411, + "narHash": "sha256-43QN3+P7UjAz5ZjjUeYGKAyRfv6BLw7jjdc8Ric/6UQ=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "990e300ef9abe0eb8c86388683f8d7465e335626", + "rev": "56ed078dc92baf72813d55dcfe399715a632bc41", "type": "github" }, "original": { @@ -1622,7 +1655,7 @@ "nvim-devdocs": "nvim-devdocs", "pets": "pets", "rest-nvim": "rest-nvim", - "systems": "systems_14", + "systems": "systems_13", "tree-sitter-d2": "tree-sitter-d2", "tree-sitter-just": "tree-sitter-just" }, @@ -1682,11 +1715,11 @@ ] }, "locked": { - "lastModified": 1716993688, - "narHash": "sha256-vo5k2wQekfeoq/2aleQkBN41dQiQHNTniZeVONWiWLs=", + "lastModified": 1717976995, + "narHash": "sha256-u3HBinyIyUvL1+N816bODpJmSQdgn0Mbb8BprFw7kqo=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "c0d5b8c54d6828516c97f6be9f2d00c63a363df4", + "rev": "315aa649ba307704db0b16c92f097a08a65ec955", "type": "github" }, "original": { @@ -1721,11 +1754,11 @@ "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1717297675, - "narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=", + "lastModified": 1718011381, + "narHash": "sha256-sFXI+ZANp/OC+MwfJoZgPSf4xMdtzQMe1pS3FGti4C8=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9", + "rev": "88ad3d7501e22b2401dd72734b032b7baa794434", "type": "github" }, "original": { @@ -1949,15 +1982,15 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1716948383, - "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", - "owner": "nixos", + "lastModified": 1717786204, + "narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", + "rev": "051f920625ab5aabe37c920346e3e69d7d34400e", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -1965,11 +1998,11 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1717602782, - "narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=", + "lastModified": 1717974879, + "narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6", + "rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3", "type": "github" }, "original": { @@ -2022,11 +2055,11 @@ "treefmt-nix": "treefmt-nix_3" }, "locked": { - "lastModified": 1717681257, - "narHash": "sha256-0PhFvfc4wDjba1cus2ALsfn0wVizeKkcuF+aqvDJivg=", + "lastModified": 1718098450, + "narHash": "sha256-QDKPhT61Cf82/7G7vMyEfKQSIGGzs33FyT+4RB34spo=", "owner": "nix-community", "repo": "nixvim", - "rev": "36f2e51b28ee3389a67ed5e9ed5c4bd388b06918", + "rev": "7a2d065ccec902c17db71bd2ba3e485a0952f43b", "type": "github" }, "original": { @@ -2130,11 +2163,11 @@ }, "nur": { "locked": { - "lastModified": 1717698941, - "narHash": "sha256-aG4df7MrR4jVrKS63/1LchlByihg0e96tBne08tpzI8=", + "lastModified": 1718102237, + "narHash": "sha256-5cUm1abWTdXdkP5jWGyUY6IgihpIpbSqem4M/2xwtzc=", "owner": "nix-community", "repo": "nur", - "rev": "437476d779b35425091b2061b736b7dc54b71b15", + "rev": "b2adfc00254cf5bca52f1951955e801534130d63", "type": "github" }, "original": { @@ -2226,10 +2259,6 @@ "lanzaboote", "flake-compat" ], - "flake-utils": [ - "lanzaboote", - "flake-utils" - ], "gitignore": "gitignore", "nixpkgs": [ "lanzaboote", @@ -2238,11 +2267,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1710923068, - "narHash": "sha256-6hOpUiuxuwpXXc/xfJsBUJeqqgGI+JMJuLo45aG3cKc=", + "lastModified": 1717664902, + "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "e611897ddfdde3ed3eaac4758635d7177ff78673", + "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "type": "github" }, "original": { @@ -2366,11 +2395,11 @@ ] }, "locked": { - "lastModified": 1711246447, - "narHash": "sha256-g9TOluObcOEKewFo2fR4cn51Y/jSKhRRo4QZckHLop0=", + "lastModified": 1717813066, + "narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "dcc802a6ec4e9cc6a1c8c393327f0c42666f22e4", + "rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465", "type": "github" }, "original": { @@ -2414,11 +2443,11 @@ ] }, "locked": { - "lastModified": 1717640276, - "narHash": "sha256-xtWJuHl0Zq1/pibvU7V8+qad4fcNLP4yerO54nr4Hec=", + "lastModified": 1718072316, + "narHash": "sha256-p33h73iQ1HkLalCplV5MH0oP3HXRaH3zufnFqb5//ps=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "96161e19677e2ae639c41147e422da4d6ec48240", + "rev": "bedc47af18fc41bb7d2edc2b212d59ca36253f59", "type": "github" }, "original": { @@ -2439,11 +2468,11 @@ ] }, "locked": { - "lastModified": 1717294752, - "narHash": "sha256-QhlS52cEQyx+iVcgrEoCnEEpWUA6uLdmeLRxk935inI=", + "lastModified": 1718072316, + "narHash": "sha256-p33h73iQ1HkLalCplV5MH0oP3HXRaH3zufnFqb5//ps=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b46857a406d207a1de74e792ef3b83e800c30e08", + "rev": "bedc47af18fc41bb7d2edc2b212d59ca36253f59", "type": "github" }, "original": { @@ -2606,21 +2635,6 @@ "type": "github" } }, - "systems_18": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "systems_2": { "locked": { "lastModified": 1681028828, @@ -2698,16 +2712,16 @@ }, "systems_7": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -2825,11 +2839,11 @@ ] }, "locked": { - "lastModified": 1717278143, - "narHash": "sha256-u10aDdYrpiGOLoxzY/mJ9llST9yO8Q7K/UlROoNxzDw=", + "lastModified": 1717850719, + "narHash": "sha256-npYqVg+Wk4oxnWrnVG7416fpfrlRhp/lQ6wQ4DHI8YE=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "3eb96ca1ae9edf792a8e0963cc92fddfa5a87706", + "rev": "4fc1c45a5f50169f9f29f6a98a438fb910b834ed", "type": "github" }, "original": { @@ -2848,11 +2862,11 @@ "rust-overlay": "rust-overlay_7" }, "locked": { - "lastModified": 1717324343, - "narHash": "sha256-0X7htQ46i4DbJxz4lSpx8RL7/B+7bUQNtkSr4ZOX9xc=", + "lastModified": 1718092736, + "narHash": "sha256-UO2+Lfgv0qBlOW1oddarZV5OEufm+Im5RMqbGdJHvGI=", "owner": "dj95", "repo": "zjstatus", - "rev": "d669610cae0051b60dfb9564a52582611968dfad", + "rev": "eed126b31e7a94d16bc4aa7ef5c2d81e45a28569", "type": "github" }, "original": {