diff --git a/dotfiles/config/taffybar/base.nix b/dotfiles/config/taffybar/base.nix deleted file mode 100644 index 85b7a2c3..00000000 --- a/dotfiles/config/taffybar/base.nix +++ /dev/null @@ -1,7 +0,0 @@ -pkgs: pkgs { - overlays = [ - (import ./taffybar/overlay.nix) - (import ../xmonad/overlay.nix) - (import ./overlay.nix) - ]; -} diff --git a/dotfiles/config/taffybar/default.nix b/dotfiles/config/taffybar/default.nix deleted file mode 100644 index be1a111c..00000000 --- a/dotfiles/config/taffybar/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -let pkgs = ((import ./base.nix) (import )) ; -in -pkgs.haskellPackages.imalison-taffybar diff --git a/dotfiles/config/taffybar/flake.nix b/dotfiles/config/taffybar/flake.nix new file mode 100644 index 00000000..e5fbb813 --- /dev/null +++ b/dotfiles/config/taffybar/flake.nix @@ -0,0 +1,35 @@ +{ + inputs = { + taffybar.url = path:./taffybar; + flake-utils.url = github:numtide/flake-utils; + git-ignore-nix.url = github:IvanMalison/gitignore.nix/master; + }; + outputs = { self, flake-utils, taffybar, git-ignore-nix, nixpkgs }: + let + overlay = final: prev: { + haskellPackages = prev.haskellPackages.override (old: { + overrides = prev.lib.composeExtensions (old.overrides or (_: _: {})) + (hself: hsuper: { + imalison-taffybar = hself.callCabal2nix "imalison-taffybar" + (git-ignore-nix.gitIgnoreSource ./.) + { }; + coinbase-pro = hself.callCabal2nix "coinbase-pro" (final.fetchFromGitHub { + owner = "IvanMalison"; + repo = "coinbase-pro"; + rev = "8ac93b7905150c8cbd6957102a730ecceb8b4dba"; + sha256 = "0v0xw593xczvvalh24bz37v2zbfz92dhz71f04m08abgphqmjvxq"; + }) { }; + }); + }); + }; + overlays = taffybar.overlays ++ [ overlay ]; + in flake-utils.lib.eachDefaultSystem (system: + let pkgs = import nixpkgs { inherit system overlays; config.allowBroken = true; }; + in + rec { + devShell = pkgs.haskellPackages.shellFor { + packages = p: [ p.imalison-taffybar ]; + }; + defaultPackage = pkgs.haskellPackages.imalison-taffybar; + }) // { inherit overlay overlays; } ; +} diff --git a/dotfiles/config/taffybar/overlay.nix b/dotfiles/config/taffybar/overlay.nix deleted file mode 100644 index a5ea0580..00000000 --- a/dotfiles/config/taffybar/overlay.nix +++ /dev/null @@ -1,19 +0,0 @@ -_: super: { - haskellPackages = super.haskellPackages.override (old: { - overrides = super.lib.composeExtensions (old.overrides or (_: _: {})) (self: _: { - coinbase-pro = self.callCabal2nix "coinbase-pro" (super.fetchFromGitHub { - owner = "IvanMalison"; - repo = "coinbase-pro"; - rev = "8ac93b7905150c8cbd6957102a730ecceb8b4dba"; - sha256 = "0v0xw593xczvvalh24bz37v2zbfz92dhz71f04m08abgphqmjvxq"; - }) { }; - imalison-taffybar = - self.callCabal2nix "imalison-taffybar" - ( - super.lib.sourceByRegex ./. - ["taffybar.hs" "imalison-taffybar.cabal"] - ) - { }; - }); - }); -} diff --git a/dotfiles/config/taffybar/shell.nix b/dotfiles/config/taffybar/shell.nix deleted file mode 100644 index 7b120a37..00000000 --- a/dotfiles/config/taffybar/shell.nix +++ /dev/null @@ -1,5 +0,0 @@ -let - pkgs = import ./base.nix (import ); -in pkgs.haskellPackages.shellFor { - packages = p: [ p.imalison-taffybar p.taffybar ]; -} diff --git a/dotfiles/config/taffybar/taffybar b/dotfiles/config/taffybar/taffybar index 2c4bb6a4..caf534ad 160000 --- a/dotfiles/config/taffybar/taffybar +++ b/dotfiles/config/taffybar/taffybar @@ -1 +1 @@ -Subproject commit 2c4bb6a4c8e3e5023f1be937ee9e091b421fffbc +Subproject commit caf534adb01dfb9fed0267a7e3ac5364a69fd873 diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index 095c6de4..361199ce 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -167,7 +167,9 @@ main = do fullEndWidgets = map (>>= buildContentsBox) [ myClock - , sniTrayNew + , sniTrayNewFromParams defaultTrayParams { trayLeftClickAction = PopupMenu + , trayRightClickAction = Activate + } , coinbaseProductLabel "ICP-USD" , coinbaseProductLabel "ICP-BTC" , coinbaseProductLabel "BTC-USD" diff --git a/nixos/flake.lock b/nixos/flake.lock index 795c12a3..49ac2dae 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -1,6 +1,81 @@ { "nodes": { - "gitIgnoreNix": { + "flake-utils": { + "locked": { + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "locked": { + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "locked": { + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "locked": { + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "git-ignore-nix": { "inputs": { "nixpkgs": "nixpkgs_2" }, @@ -19,25 +94,7 @@ "type": "github" } }, - "gitIgnoreNix_2": { - "inputs": { - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1626413882, - "narHash": "sha256-ZHw1YVsrs7rG9jPEH0ZabbbCTdnVr48FAwK6GCQPSF4=", - "owner": "IvanMalison", - "repo": "gitignore.nix", - "rev": "a2ffb0bfd0145ca57d792a6f9f76f5c305ca29b7", - "type": "github" - }, - "original": { - "owner": "IvanMalison", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitIgnoreNix_3": { + "git-ignore-nix_2": { "inputs": { "nixpkgs": "nixpkgs_4" }, @@ -51,10 +108,126 @@ }, "original": { "owner": "IvanMalison", + "ref": "master", "repo": "gitignore.nix", "type": "github" } }, + "git-ignore-nix_3": { + "inputs": { + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1626413882, + "narHash": "sha256-ZHw1YVsrs7rG9jPEH0ZabbbCTdnVr48FAwK6GCQPSF4=", + "owner": "IvanMalison", + "repo": "gitignore.nix", + "rev": "a2ffb0bfd0145ca57d792a6f9f76f5c305ca29b7", + "type": "github" + }, + "original": { + "owner": "IvanMalison", + "ref": "master", + "repo": "gitignore.nix", + "type": "github" + } + }, + "git-ignore-nix_4": { + "inputs": { + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1626413882, + "narHash": "sha256-ZHw1YVsrs7rG9jPEH0ZabbbCTdnVr48FAwK6GCQPSF4=", + "owner": "IvanMalison", + "repo": "gitignore.nix", + "rev": "a2ffb0bfd0145ca57d792a6f9f76f5c305ca29b7", + "type": "github" + }, + "original": { + "owner": "IvanMalison", + "ref": "master", + "repo": "gitignore.nix", + "type": "github" + } + }, + "git-ignore-nix_5": { + "inputs": { + "nixpkgs": "nixpkgs_8" + }, + "locked": { + "lastModified": 1626413882, + "narHash": "sha256-ZHw1YVsrs7rG9jPEH0ZabbbCTdnVr48FAwK6GCQPSF4=", + "owner": "IvanMalison", + "repo": "gitignore.nix", + "rev": "a2ffb0bfd0145ca57d792a6f9f76f5c305ca29b7", + "type": "github" + }, + "original": { + "owner": "IvanMalison", + "ref": "master", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitIgnoreNix": { + "inputs": { + "nixpkgs": "nixpkgs_10" + }, + "locked": { + "lastModified": 1626413882, + "narHash": "sha256-ZHw1YVsrs7rG9jPEH0ZabbbCTdnVr48FAwK6GCQPSF4=", + "owner": "IvanMalison", + "repo": "gitignore.nix", + "rev": "a2ffb0bfd0145ca57d792a6f9f76f5c305ca29b7", + "type": "github" + }, + "original": { + "owner": "IvanMalison", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitIgnoreNix_2": { + "inputs": { + "nixpkgs": "nixpkgs_11" + }, + "locked": { + "lastModified": 1626413882, + "narHash": "sha256-ZHw1YVsrs7rG9jPEH0ZabbbCTdnVr48FAwK6GCQPSF4=", + "owner": "IvanMalison", + "repo": "gitignore.nix", + "rev": "a2ffb0bfd0145ca57d792a6f9f76f5c305ca29b7", + "type": "github" + }, + "original": { + "owner": "IvanMalison", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gtk-sni-tray": { + "inputs": { + "flake-utils": "flake-utils_4", + "git-ignore-nix": "git-ignore-nix_4", + "nixpkgs": "nixpkgs_7", + "status-notifier-item": "status-notifier-item" + }, + "locked": { + "lastModified": 1627097793, + "narHash": "sha256-/VADe26PqxUCUav3gVtDp0ov8irDyYMWINFBDGmP2Ik=", + "owner": "taffybar", + "repo": "gtk-sni-tray", + "rev": "07a8b24db5245b58ca39ed6c2fd6bac4e51ccc13", + "type": "github" + }, + "original": { + "owner": "taffybar", + "ref": "master", + "repo": "gtk-sni-tray", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -62,7 +235,7 @@ ] }, "locked": { - "narHash": "sha256-CBJguKlUR3DInWleAYhkqA9ujMjKazdThSHK84peKFQ=", + "narHash": "sha256-Yz2tpRVaNPxKiBkw8lEzH77/MuI4zVOiCk4LE61pOII=", "path": "./home-manager", "type": "path" }, @@ -112,22 +285,22 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1625333638, - "narHash": "sha256-M6J9RN60XJyv6nUfDFCwnz5aVjhe8+GJnV8Q9VpdQQQ=", - "owner": "nixos", + "lastModified": 1626836098, + "narHash": "sha256-EYWAa8d2iIVgS2r0BVMDQ/fNxv8s65CWFDGkI0TY+hM=", + "owner": "IvanMalison", "repo": "nixos-hardware", - "rev": "41775780a0b6b32b3d32dcc32bb9bc6df809062d", + "rev": "360b5a7bedf955275fa3fc89bcbe28a2a85bf62b", "type": "github" }, "original": { - "owner": "nixos", + "owner": "IvanMalison", "repo": "nixos-hardware", "type": "github" } }, "nixpkgs": { "locked": { - "narHash": "sha256-xifLAB3xxYZKkx0I0w7lZKsABhgbqLZQ+ctR6Z3KpI4=", + "narHash": "sha256-XaIGzF86aDiWYO4pHH3v4KsCmr3kSzIQV2+OX3kUH8M=", "path": "./nixpkgs", "type": "path" }, @@ -136,10 +309,32 @@ "type": "path" } }, + "nixpkgs_10": { + "locked": { + "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", + "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_11": { + "locked": { + "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", + "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, "nixpkgs_2": { "locked": { - "narHash": "sha256-xifLAB3xxYZKkx0I0w7lZKsABhgbqLZQ+ctR6Z3KpI4=", - "path": "./nixpkgs", + "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", + "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", "type": "path" }, "original": { @@ -149,8 +344,8 @@ }, "nixpkgs_3": { "locked": { - "narHash": "sha256-xifLAB3xxYZKkx0I0w7lZKsABhgbqLZQ+ctR6Z3KpI4=", - "path": "./nixpkgs", + "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", + "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", "type": "path" }, "original": { @@ -160,8 +355,8 @@ }, "nixpkgs_4": { "locked": { - "narHash": "sha256-xifLAB3xxYZKkx0I0w7lZKsABhgbqLZQ+ctR6Z3KpI4=", - "path": "./nixpkgs", + "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", + "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", "type": "path" }, "original": { @@ -169,37 +364,156 @@ "type": "indirect" } }, + "nixpkgs_5": { + "locked": { + "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", + "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_6": { + "locked": { + "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", + "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_7": { + "locked": { + "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", + "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_8": { + "locked": { + "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", + "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_9": { + "locked": { + "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", + "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "notifications-tray-icon": { + "inputs": { + "flake-utils": "flake-utils", + "git-ignore-nix": "git-ignore-nix", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1626744467, + "narHash": "sha256-YkJkOZTz1yxj63e6kAOkgxPmK0CIFpDNXyMHvxctn9k=", + "owner": "IvanMalison", + "repo": "notifications-tray-icon", + "rev": "0d83e7fba0592bec4566662140ab197491d99126", + "type": "github" + }, + "original": { + "owner": "IvanMalison", + "ref": "master", + "repo": "notifications-tray-icon", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "nix": "nix", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", + "notifications-tray-icon": "notifications-tray-icon", "taffybar": "taffybar", "xmonad": "xmonad", "xmonad-contrib": "xmonad-contrib" } }, + "status-notifier-item": { + "inputs": { + "flake-utils": "flake-utils_5", + "git-ignore-nix": "git-ignore-nix_5", + "nixpkgs": "nixpkgs_9" + }, + "locked": { + "lastModified": 1627094793, + "narHash": "sha256-teycP5kmokSCxtJjRaYEGx8DWnGKKO6qQG37iqdIdEM=", + "owner": "taffybar", + "repo": "status-notifier-item", + "rev": "90f34bc859edbdb8c63802ee8a149d1fefac4415", + "type": "github" + }, + "original": { + "owner": "taffybar", + "ref": "master", + "repo": "status-notifier-item", + "type": "github" + } + }, "taffybar": { "inputs": { - "gitIgnoreNix": "gitIgnoreNix", + "flake-utils": "flake-utils_2", + "git-ignore-nix": "git-ignore-nix_2", + "nixpkgs": [ + "nixpkgs" + ], + "taffybar": "taffybar_2" + }, + "locked": { + "narHash": "sha256-gHDOm6LziKcuXsmFnVD58cE3VBo0zBEZ+3mw++bJwZs=", + "path": "../dotfiles/config/taffybar", + "type": "path" + }, + "original": { + "path": "../dotfiles/config/taffybar", + "type": "path" + } + }, + "taffybar_2": { + "inputs": { + "flake-utils": "flake-utils_3", + "git-ignore-nix": "git-ignore-nix_3", + "gtk-sni-tray": "gtk-sni-tray", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "narHash": "sha256-6YDz7kCm5jMrSqWMNw9OS3N66v84ZOe5LCl1iFLoPtE=", - "path": "../dotfiles/config/taffybar/taffybar", + "narHash": "sha256-8/Jliml56I/GahY4fG6F+nEwJubtCjJgbd06dk78pQU=", + "path": "./taffybar", "type": "path" }, "original": { - "path": "../dotfiles/config/taffybar/taffybar", + "path": "./taffybar", "type": "path" } }, "xmonad": { "inputs": { - "gitIgnoreNix": "gitIgnoreNix_2", + "gitIgnoreNix": "gitIgnoreNix", "nixpkgs": [ "nixpkgs" ] @@ -216,7 +530,7 @@ }, "xmonad-contrib": { "inputs": { - "gitIgnoreNix": "gitIgnoreNix_3", + "gitIgnoreNix": "gitIgnoreNix_2", "nixpkgs": [ "nixpkgs" ] diff --git a/nixos/flake.nix b/nixos/flake.nix index 26293032..fcb7a87f 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -21,7 +21,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; taffybar = { - url = path:../dotfiles/config/taffybar/taffybar; + url = path:../dotfiles/config/taffybar; inputs.nixpkgs.follows = "nixpkgs"; }; notifications-tray-icon = { @@ -40,9 +40,9 @@ registry.nixpkgs.flake = nixpkgs; }; nixpkgs.overlays = [ - nix.overlay taffybar.overlay xmonad.overlay xmonad-contrib.overlay + nix.overlay xmonad.overlay xmonad-contrib.overlay notifications-tray-icon.overlay - ]; + ] ++ taffybar.overlays; imports = [ home-manager.nixosModule ]; diff --git a/nixos/nixpkgs b/nixos/nixpkgs index 3e8d0206..8d947495 160000 --- a/nixos/nixpkgs +++ b/nixos/nixpkgs @@ -1 +1 @@ -Subproject commit 3e8d02066c07af98ccaaa63c8bfafd0131e06d04 +Subproject commit 8d94749561763f58b8bdc3bc354d1803b1a31d31