diff --git a/flake.lock b/flake.lock index 3f04f3b..eff0e55 100644 --- a/flake.lock +++ b/flake.lock @@ -1,152 +1,5 @@ { "nodes": { - "base16": { - "inputs": { - "fromYaml": "fromYaml" - }, - "locked": { - "lastModified": 1705180696, - "narHash": "sha256-6TwTHERD+2SX21zvBwmm58mtmgVXHLPu273i04JdH9Y=", - "owner": "SenchoPens", - "repo": "base16.nix", - "rev": "b390e87cd404e65ab4d786666351f1292e89162a", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "base16.nix", - "type": "github" - } - }, - "base16-alacritty": { - "flake": false, - "locked": { - "lastModified": 1703982197, - "narHash": "sha256-TNxKbwdiUXGi4Z4chT72l3mt3GSvOcz6NZsUH8bQU/k=", - "owner": "aarowill", - "repo": "base16-alacritty", - "rev": "c95c200b3af739708455a03b5d185d3d2d263c6e", - "type": "github" - }, - "original": { - "owner": "aarowill", - "repo": "base16-alacritty", - "type": "github" - } - }, - "base16-alacritty-yaml": { - "flake": false, - "locked": { - "lastModified": 1674275109, - "narHash": "sha256-Adwx9yP70I6mJrjjODOgZJjt4OPPe8gJu7UuBboXO4M=", - "owner": "aarowill", - "repo": "base16-alacritty", - "rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7", - "type": "github" - }, - "original": { - "owner": "aarowill", - "repo": "base16-alacritty", - "rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7", - "type": "github" - } - }, - "base16-fish": { - "flake": false, - "locked": { - "lastModified": 1622559957, - "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", - "owner": "tomyun", - "repo": "base16-fish", - "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", - "type": "github" - }, - "original": { - "owner": "tomyun", - "repo": "base16-fish", - "type": "github" - } - }, - "base16-foot": { - "flake": false, - "locked": { - "lastModified": 1696725948, - "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", - "owner": "tinted-theming", - "repo": "base16-foot", - "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-foot", - "type": "github" - } - }, - "base16-helix": { - "flake": false, - "locked": { - "lastModified": 1696727917, - "narHash": "sha256-FVrbPk+NtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g=", - "owner": "tinted-theming", - "repo": "base16-helix", - "rev": "dbe1480d99fe80f08df7970e471fac24c05f2ddb", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-helix", - "type": "github" - } - }, - "base16-kitty": { - "flake": false, - "locked": { - "lastModified": 1665001328, - "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", - "owner": "kdrag0n", - "repo": "base16-kitty", - "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", - "type": "github" - }, - "original": { - "owner": "kdrag0n", - "repo": "base16-kitty", - "type": "github" - } - }, - "base16-tmux": { - "flake": false, - "locked": { - "lastModified": 1696725902, - "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", - "owner": "tinted-theming", - "repo": "base16-tmux", - "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-tmux", - "type": "github" - } - }, - "base16-vim": { - "flake": false, - "locked": { - "lastModified": 1663659192, - "narHash": "sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0=", - "owner": "chriskempson", - "repo": "base16-vim", - "rev": "3be3cd82cd31acfcab9a41bad853d9c68d30478d", - "type": "github" - }, - "original": { - "owner": "chriskempson", - "repo": "base16-vim", - "type": "github" - } - }, "darwin": { "inputs": { "nixpkgs": [ @@ -190,11 +43,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1707978135, - "narHash": "sha256-Xje6vjTcVUfPg3+X4PUSlgDxA/MSqzmtjOTW47NRwwM=", + "lastModified": 1708064520, + "narHash": "sha256-m0teYrbf7kAainkHBJ+zpClBNaTIOX6QNkn5W8on4uY=", "owner": "nix-community", "repo": "fenix", - "rev": "09ef6ec17141904ca28ddd62f2697f63c2aaa799", + "rev": "2f24d67fad634ecf1820a73bb40d709eb12862bf", "type": "github" }, "original": { @@ -219,22 +72,6 @@ "type": "github" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -273,11 +110,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -291,11 +128,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", "type": "github" }, "original": { @@ -304,36 +141,21 @@ "type": "github" } }, - "fromYaml": { - "flake": false, - "locked": { - "lastModified": 1689549921, - "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", - "owner": "SenchoPens", - "repo": "fromYaml", - "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", - "type": "github" + "flake-utils_3": { + "inputs": { + "systems": "systems_3" }, - "original": { - "owner": "SenchoPens", - "repo": "fromYaml", - "type": "github" - } - }, - "gnome-shell": { - "flake": false, "locked": { - "lastModified": 1698794309, - "narHash": "sha256-/TIkZ8y5Wv3QHLFp79Poao9fINurKs5pa4z0CRe+F8s=", - "owner": "GNOME", - "repo": "gnome-shell", - "rev": "a7c169c6c29cf02a4c392fa0acbbc5f5072823e7", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { - "owner": "GNOME", - "ref": "45.1", - "repo": "gnome-shell", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, @@ -379,7 +201,7 @@ }, "nixos-vscode-server": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] @@ -435,7 +257,7 @@ "nvfetcher": { "inputs": { "flake-compat": "flake-compat", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixpkgs" ] @@ -456,30 +278,28 @@ }, "root": { "inputs": { - "base16": "base16", "darwin": "darwin", "default-systems": "default-systems", "fenix": "fenix", "flake-parts": "flake-parts", "flake-root": "flake-root", + "flake-utils": "flake-utils", "haumea": "haumea", "home-manager": "home-manager", "nixos-vscode-server": "nixos-vscode-server", "nixpkgs": "nixpkgs", "nvfetcher": "nvfetcher", - "schemes": "schemes", - "stylix": "stylix", "treefmt-nix": "treefmt-nix" } }, "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1707925466, - "narHash": "sha256-2xxcezb4tvssbVCU69DnTDSMB2lqwEp63JNQt8zuzcs=", + "lastModified": 1708018577, + "narHash": "sha256-B75VUqKvQeIqAUnYw4bGjY3xxrCqzRBJHLbmD0MAWEw=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "dba59970bcccfb3c6fc16ea0d0d79da875f22316", + "rev": "b9b0d29b8e69b02457cfabe20c4c69cdb45f3cc5", "type": "github" }, "original": { @@ -489,59 +309,22 @@ "type": "github" } }, - "schemes": { - "flake": false, - "locked": { - "lastModified": 1707678373, - "narHash": "sha256-1s6L7vkHKC+eFhDnvFTl1aAjKnTE407MWmMS6gvVg74=", - "owner": "tinted-theming", - "repo": "schemes", - "rev": "ae4ce8b0d1f9b247d3add88a23aec3d833ae76d1", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "schemes", - "type": "github" - } - }, - "stylix": { - "inputs": { - "base16": [ - "base16" - ], - "base16-alacritty": "base16-alacritty", - "base16-alacritty-yaml": "base16-alacritty-yaml", - "base16-fish": "base16-fish", - "base16-foot": "base16-foot", - "base16-helix": "base16-helix", - "base16-kitty": "base16-kitty", - "base16-tmux": "base16-tmux", - "base16-vim": "base16-vim", - "flake-compat": "flake-compat_2", - "gnome-shell": "gnome-shell", - "home-manager": [ - "home-manager" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, + "systems": { "locked": { - "lastModified": 1707757489, - "narHash": "sha256-YyqHbxtDGB3OIITPQ3XtkM20fh9/t4CXkYXKzg9DuP8=", - "owner": "danth", - "repo": "stylix", - "rev": "50cae37cfe23e5ad202ed53f48529139dfa0d008", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "danth", - "repo": "stylix", + "owner": "nix-systems", + "repo": "default", "type": "github" } }, - "systems": { + "systems_2": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -556,7 +339,7 @@ "type": "github" } }, - "systems_2": { + "systems_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", diff --git a/flake.nix b/flake.nix index 2b21ce2..54437e3 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,7 @@ in inputs.flake-parts.lib.mkFlake {inherit inputs;} { imports = with inputs; [ + flake-parts.flakeModules.easyOverlay flake-root.flakeModule treefmt-nix.flakeModule ]; @@ -51,14 +52,16 @@ }; # Packages. - packages.nvfetcher = pkgs.nvfetcher; - packages.all = pkgs.symlinkJoin { - name = "all"; - paths = with packages; [ - nvfetcher - ]; + packages = inputs.haumea.lib.load { + src = globals.root + /src/packages; + inputs = {inherit globals config self' inputs' pkgs system;}; + transformer = _: mod: + if builtins.isAttrs mod + then pkgs.lib.filterAttrs (n: v: v != null) mod + else mod; }; - packages.default = packages.all; + + overlayAttrs = packages; }; flake = let @@ -93,6 +96,8 @@ haumea.url = "github:nix-community/haumea"; haumea.inputs.nixpkgs.follows = "nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + default-systems.url = "github:nix-systems/default"; flake-root.url = "github:srid/flake-root"; @@ -110,16 +115,6 @@ nvfetcher.url = "github:berberman/nvfetcher"; nvfetcher.inputs.nixpkgs.follows = "nixpkgs"; - - base16.url = "github:SenchoPens/base16.nix"; - - schemes.url = "github:tinted-theming/schemes"; - schemes.flake = false; - - stylix.url = "github:danth/stylix"; - stylix.inputs.base16.follows = "base16"; - stylix.inputs.home-manager.follows = "home-manager"; - stylix.inputs.nixpkgs.follows = "nixpkgs"; }; nixConfig = rec { diff --git a/src/packages/default.nix b/src/packages/default.nix new file mode 100644 index 0000000..f803a1c --- /dev/null +++ b/src/packages/default.nix @@ -0,0 +1,18 @@ +{ + globals, + config, + self', + inputs', + pkgs, + system, + ... +}: +with builtins // pkgs.lib; + pkgs.symlinkJoin { + name = "nichijou-packages"; + paths = + attrValues + (filterAttrs + (n: v: n != "default") + globals.outputs.packages.${pkgs.system}); + } diff --git a/src/packages/lporg.nix b/src/packages/lporg.nix new file mode 100644 index 0000000..840cc91 --- /dev/null +++ b/src/packages/lporg.nix @@ -0,0 +1,56 @@ +{ + globals, + config, + self', + inputs', + pkgs, + system, + ... +}: let + recipe = { + lib, + stdenv, + buildGoModule, + fetchFromGitHub, + installShellFiles, + sources ? {}, + }: + buildGoModule rec { + inherit (sources.lporg) pname version src; + + vendorHash = "sha256-GQaIfUtM3iDQ9jmrSMqYvcPysigdu7w10xGDIYv4OY8="; + + nativeBuildInputs = [ + installShellFiles + ]; + + checkPhase = ''''; + + postInstall = ''''; + + meta = with lib; { + description = "Organize Your macOS Launchpad Apps"; + longDescription = '' + lporg is meant to help people setting up a brand + new Mac or to keep all of their Launchpad Folders + in sync across devices. + ''; + homepage = "https://github.com/blacktop/lporg"; + changelog = "https://github.com/blacktop/lporg/releases/tag/v${version}"; + license = with licenses; [mit]; + maintainers = with maintainers; [yousiki]; + }; + }; + + sources = pkgs.callPackage (globals.root + /_sources/generated.nix) {}; + + package = pkgs.callPackage recipe {inherit sources;}; + + systems = + builtins.filter + (system: pkgs.lib.hasSuffix "-darwin" system) + (import globals.inputs.default-systems); +in + if builtins.elem system systems + then package + else null diff --git a/src/packages/nvfetcher.nix b/src/packages/nvfetcher.nix new file mode 100644 index 0000000..54ab89d --- /dev/null +++ b/src/packages/nvfetcher.nix @@ -0,0 +1,16 @@ +{ + globals, + config, + self', + inputs', + pkgs, + system, + ... +}: let + package = globals.inputs.nvfetcher.packages.${pkgs.system}.default; + + systems = import globals.inputs.default-systems; +in + if builtins.elem system systems + then package + else null