From 2c141037b434ef7e6be85e2503e5c50fc5b7873a Mon Sep 17 00:00:00 2001 From: YouSiki Date: Fri, 16 Feb 2024 09:24:07 +0800 Subject: [PATCH] Add support for aarch64-darwin builds and include stylix module --- .github/workflows/build.yaml | 7 +- flake.lock | 347 +++++++++++++++++- flake.nix | 24 +- garnix.yaml | 1 + src/commonProfiles/packages.nix | 2 + src/darwinConfigurations/sakamoto/default.nix | 1 + src/homeProfiles/stylix.nix | 15 + 7 files changed, 382 insertions(+), 15 deletions(-) create mode 100644 src/homeProfiles/stylix.nix diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a049b80..14b2a92 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,8 +7,11 @@ on: jobs: build: - name: build - runs-on: ubuntu-latest + name: test and build on ${{ matrix.os }}. + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] environment: cachix steps: - uses: actions/checkout@main diff --git a/flake.lock b/flake.lock index c8bbe2b..3f04f3b 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,152 @@ { "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": [ @@ -43,11 +190,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1707891749, - "narHash": "sha256-SeikNYElHgv8uVMbiA9/pU3Cce7ssIsiM8CnEiwd1Nc=", + "lastModified": 1707978135, + "narHash": "sha256-Xje6vjTcVUfPg3+X4PUSlgDxA/MSqzmtjOTW47NRwwM=", "owner": "nix-community", "repo": "fenix", - "rev": "3115aab064ef38cccd792c45429af8df43d6d277", + "rev": "09ef6ec17141904ca28ddd62f2697f63c2aaa799", "type": "github" }, "original": { @@ -56,6 +203,38 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "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" @@ -107,6 +286,57 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "type": "github" + }, + "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", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "45.1", + "repo": "gnome-shell", + "type": "github" + } + }, "haumea": { "inputs": { "nixpkgs": [ @@ -134,11 +364,11 @@ ] }, "locked": { - "lastModified": 1707919853, - "narHash": "sha256-qxmBGDzutuJ/tsX4gp+Mr7fjxOZBbeT9ixhS5o4iFOw=", + "lastModified": 1708031129, + "narHash": "sha256-EH20hJfNnc1/ODdDVat9B7aKm0B95L3YtkIRwKLvQG8=", "owner": "nix-community", "repo": "home-manager", - "rev": "043ba285c6dc20f36441d48525402bcb9743c498", + "rev": "3d6791b3897b526c82920a2ab5f61d71985b3cf8", "type": "github" }, "original": { @@ -170,11 +400,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1707877513, - "narHash": "sha256-sp0w2apswd3wv0sAEF7StOGHkns3XUQaO5erhWFZWXk=", + "lastModified": 1708001613, + "narHash": "sha256-woOmAXW05XnqlLn7dKzCkRAEOSOdA/Z2ndVvKcjid94=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "89653a03e0915e4a872788d10680e7eec92f8600", + "rev": "085589047343aad800c4d305cf7b98e8a3d51ae2", "type": "github" }, "original": { @@ -202,8 +432,31 @@ "type": "github" } }, + "nvfetcher": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1705463871, + "narHash": "sha256-JiJTdrgmSJ8jLN3J1FOxXKHy3ANWhHXZnbVQydf/qAA=", + "owner": "berberman", + "repo": "nvfetcher", + "rev": "1dbe745f29efb93abce017ee175fd433cf8194df", + "type": "github" + }, + "original": { + "owner": "berberman", + "repo": "nvfetcher", + "type": "github" + } + }, "root": { "inputs": { + "base16": "base16", "darwin": "darwin", "default-systems": "default-systems", "fenix": "fenix", @@ -213,17 +466,20 @@ "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": 1707849817, - "narHash": "sha256-If6T0MDErp3/z7DBlpG4bV46IPP+7BWSlgTI88cmbw0=", + "lastModified": 1707925466, + "narHash": "sha256-2xxcezb4tvssbVCU69DnTDSMB2lqwEp63JNQt8zuzcs=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "a02a219773629686bd8ff123ca1aa995fa50d976", + "rev": "dba59970bcccfb3c6fc16ea0d0d79da875f22316", "type": "github" }, "original": { @@ -233,6 +489,58 @@ "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" + ] + }, + "locked": { + "lastModified": 1707757489, + "narHash": "sha256-YyqHbxtDGB3OIITPQ3XtkM20fh9/t4CXkYXKzg9DuP8=", + "owner": "danth", + "repo": "stylix", + "rev": "50cae37cfe23e5ad202ed53f48529139dfa0d008", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -248,6 +556,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index eaee372..2b21ce2 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,7 @@ root = ./.; nixpkgs.overlays = with inputs; [ fenix.overlays.default + nvfetcher.overlays.default ]; nixpkgs.config = { allowUnfree = true; @@ -49,7 +50,15 @@ programs.stylua.enable = true; # *.lua }; - packages.default = pkgs.hello; + # Packages. + packages.nvfetcher = pkgs.nvfetcher; + packages.all = pkgs.symlinkJoin { + name = "all"; + paths = with packages; [ + nvfetcher + ]; + }; + packages.default = packages.all; }; flake = let @@ -98,6 +107,19 @@ fenix.url = "github:nix-community/fenix"; fenix.inputs.nixpkgs.follows = "nixpkgs"; + + 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/garnix.yaml b/garnix.yaml index 5afbb7c..4dee64e 100644 --- a/garnix.yaml +++ b/garnix.yaml @@ -1,5 +1,6 @@ builds: exclude: [] include: + - "*.aarch64-darwin.*" - "*.x86_64-darwin.*" - "*.x86_64-linux.*" diff --git a/src/commonProfiles/packages.nix b/src/commonProfiles/packages.nix index f1116c2..3f24675 100644 --- a/src/commonProfiles/packages.nix +++ b/src/commonProfiles/packages.nix @@ -7,6 +7,7 @@ }: with builtins // lib; { environment.systemPackages = with pkgs; [ + alejandra curl duf eza @@ -21,6 +22,7 @@ with builtins // lib; { jq man neofetch + nvfetcher ripgrep rsync vim diff --git a/src/darwinConfigurations/sakamoto/default.nix b/src/darwinConfigurations/sakamoto/default.nix index 4be1acb..0c061a0 100644 --- a/src/darwinConfigurations/sakamoto/default.nix +++ b/src/darwinConfigurations/sakamoto/default.nix @@ -20,6 +20,7 @@ imports = with homeProfiles; [ base lang.complete + stylix ]; }; }; diff --git a/src/homeProfiles/stylix.nix b/src/homeProfiles/stylix.nix new file mode 100644 index 0000000..9a4420b --- /dev/null +++ b/src/homeProfiles/stylix.nix @@ -0,0 +1,15 @@ +# Basic configurations for Home-manager. +{globals, ...}: { + config, + lib, + pkgs, + ... +}: +with builtins // lib; { + imports = [ + globals.inputs.stylix.homeManagerModules.stylix + ]; + + stylix.image = "${globals.root}/static/images/AyanamiRei_2.png"; + stylix.base16Scheme = "${globals.inputs.schemes}/base16/catppuccin-mocha.yaml"; +}