Compare commits

...

12 commits

Author SHA1 Message Date
cy
1b298adbf6
flake.lock: Update
Flake lock file updates:

• Updated input 'garage':
    'github:deuxfleurs-org/garage/14d2f2b18da015508d4a1e31b2f014da5188d516' (2025-03-21)
  → 'github:deuxfleurs-org/garage/4ef954d17604eba8aafa52902cd3c573978c7195' (2025-04-19)
• Updated input 'home-manager':
    'github:nix-community/home-manager/c6b75d69b6994ba68ec281bd36faebcc56097800' (2025-04-16)
  → 'github:nix-community/home-manager/f98314bb064cf8f8446c44afbadaaad2505875a7' (2025-04-20)
• Updated input 'nix-index-database':
    'github:nix-community/nix-index-database/4fc9ea78c962904f4ea11046f3db37c62e8a02fd' (2025-04-13)
  → 'github:nix-community/nix-index-database/69716041f881a2af935021c1182ed5b0cc04d40e' (2025-04-20)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/2631b0b7abcea6e640ce31cd78ea58910d31e650' (2025-04-12)
  → 'github:nixos/nixpkgs/b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef' (2025-04-17)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/c564fb830c7d5b3e4fde5ea829a62f0e41e43a20' (2025-04-16)
  → 'github:oxalica/rust-overlay/e2142ef330a61c02f274ac9a9cb6f8487a5d0080' (2025-04-20)
• Updated input 'vscode-extensions':
    'github:nix-community/nix-vscode-extensions/47bd3dc652c4a02dc565a9360fe828af38bea287' (2025-04-16)
  → 'github:nix-community/nix-vscode-extensions/ff14820202442f847fd37862eb48a7cb254a19d3' (2025-04-20)
2025-04-20 02:28:52 -04:00
cy
1cf31a7ae0
ci use parallel compression 2025-04-20 02:26:56 -04:00
cy
f3f15724d2
ci use zstd to compress cache 2025-04-20 02:23:19 -04:00
cy
4f1bd26064
setup aws profile for s3 auth 2025-04-20 02:19:42 -04:00
cy
e38ed0e6f1
fix nix copy dest 2025-04-20 01:39:56 -04:00
cy
5a053b2379
fix nix path 2025-04-20 01:36:23 -04:00
cy
eb054c444a
temp disable maximize disk space 2025-04-20 01:35:16 -04:00
cy
2591401aa3
workflow: debug 2025-04-20 01:33:55 -04:00
cy
c193ba2108
workflow: test post-build hook 2025-04-20 01:27:05 -04:00
cy
140f0f5dcf
kitty: use default theme 2025-04-20 01:18:41 -04:00
cy
4188e4aa83
Merge branch 'update' 2025-04-17 15:19:39 -04:00
cy
44a98fd703
ytnix: enable firefox 2025-04-17 15:19:29 -04:00
5 changed files with 68 additions and 55 deletions

View file

@ -39,6 +39,25 @@ jobs:
- name: setup binary cache key
run: echo -n "${{ secrets.NIX_CACHE_SECRET_KEY }}" | xxd -p -r > ${{ runner.temp }}/cache-priv-key.pem
- name: Sync repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: post-build-hook
run: |
sudo mkdir -p /etc/nix
sudo cp ci/upload-to-cache.sh /etc/nix/
sudo chmod +x /etc/nix/upload-to-cache.sh
- name: setup s3 credentials
run: |
sudo mkdir /root/.aws
echo "[default]" |sudo tee /root/.aws/config |sudo tee /root/.aws/credentials
echo "aws_access_key_id=$AWS_ACCESS_KEY_ID" |sudo tee -a /root/.aws/credentials
echo "aws_secret_access_key=$AWS_SECRET_ACCESS_KEY" |sudo tee -a /root/.aws/credentials
echo "endpoint_url=$AWS_ENDPOINT_URL" |sudo tee -a /root/.aws/config
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
@ -51,30 +70,12 @@ jobs:
secret-key-files = ${{ runner.temp }}/cache-priv-key.pem
extra-substituters = https://nixcache.cy7.sh
extra-trusted-public-keys = nixcache.cy7.sh:DN3d1dt0wnXfTH03oVmTee4KgmdNdB0NY3SuzA8Fwx8=
- name: Sync repository
uses: actions/checkout@v4
with:
persist-credentials: false
post-build-hook = /etc/nix/upload-to-cache.sh
- name: build
run: |
# package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
# nix build -L "$package"
nix run nixpkgs#nixos-rebuild build -- -L --flake ".#${{ matrix.machine }}"
- name: cache
# https://stackoverflow.com/a/58859404
if: '!cancelled()'
run: |
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
nix run github:cything/nixcp -- \
push \
--bucket nixcache \
--signing-key ${{ runner.temp }}/cache-priv-key.pem \
-u https://nix-community.cachix.org \
$package
build-homes:
strategy:
fail-fast: false
@ -103,6 +104,25 @@ jobs:
- name: setup binary cache key
run: echo -n "${{ secrets.NIX_CACHE_SECRET_KEY }}" | xxd -p -r > ${{ runner.temp }}/cache-priv-key.pem
- name: Sync repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: post-build-hook
run: |
sudo mkdir -p /etc/nix
sudo cp ci/upload-to-cache.sh /etc/nix/
sudo chmod +x /etc/nix/upload-to-cache.sh
- name: setup s3 credentials
run: |
sudo mkdir /root/.aws
echo "[default]" |sudo tee /root/.aws/config |sudo tee /root/.aws/credentials
echo "aws_access_key_id=$AWS_ACCESS_KEY_ID" |sudo tee -a /root/.aws/credentials
echo "aws_secret_access_key=$AWS_SECRET_ACCESS_KEY" |sudo tee -a /root/.aws/credentials
echo "endpoint_url=$AWS_ENDPOINT_URL" |sudo tee -a /root/.aws/config
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
@ -115,25 +135,9 @@ jobs:
secret-key-files = ${{ runner.temp }}/cache-priv-key.pem
extra-substituters = https://nixcache.cy7.sh
extra-trusted-public-keys = nixcache.cy7.sh:DN3d1dt0wnXfTH03oVmTee4KgmdNdB0NY3SuzA8Fwx8=
- name: Sync repository
uses: actions/checkout@v4
with:
persist-credentials: false
post-build-hook = /etc/nix/upload-to-cache.sh
- name: build
run: |
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
nix build -L "$package"
- name: cache
# https://stackoverflow.com/a/58859404
if: '!cancelled()'
run: |
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
nix run github:cything/nixcp -- \
push \
--bucket nixcache \
--signing-key ${{ runner.temp }}/cache-priv-key.pem \
-u https://nix-community.cachix.org \
$package

8
ci/upload-to-cache.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
# https://nix.dev/guides/recipes/post-build-hook.html#implementing-the-build-hook
set -eu
set -f # disable globbing
export IFS=' '
echo "Uploading paths" $OUT_PATHS
exec /nix/var/nix/profiles/default/bin/nix copy --to "s3://nixcache?endpoint=s3.cy7.sh&compression=zstd&parallel-compression=true" $OUT_PATHS

36
flake.lock generated
View file

@ -147,11 +147,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1742547966,
"narHash": "sha256-AJfw+XRaRyrlpb9Wy6rVz44JePy0AXWPECXVPBnrOfI=",
"lastModified": 1745093116,
"narHash": "sha256-38L/NZyfGSGff9f+FfRd4teA1Xj93hqcBJcqhxbLA7Y=",
"owner": "deuxfleurs-org",
"repo": "garage",
"rev": "14d2f2b18da015508d4a1e31b2f014da5188d516",
"rev": "4ef954d17604eba8aafa52902cd3c573978c7195",
"type": "github"
},
"original": {
@ -189,11 +189,11 @@
]
},
"locked": {
"lastModified": 1744833442,
"narHash": "sha256-BBMWW2m64Grcc5FlXz74+vdkUyCJOfUGnl+VcS/4x44=",
"lastModified": 1745128386,
"narHash": "sha256-xnNxL9lZC5Ez8AxTgHZZu8pYSNM34+5GD5jGSs8Vq4M=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c6b75d69b6994ba68ec281bd36faebcc56097800",
"rev": "f98314bb064cf8f8446c44afbadaaad2505875a7",
"type": "github"
},
"original": {
@ -257,11 +257,11 @@
]
},
"locked": {
"lastModified": 1744518957,
"narHash": "sha256-RLBSWQfTL0v+7uyskC5kP6slLK1jvIuhaAh8QvB75m4=",
"lastModified": 1745120797,
"narHash": "sha256-owQ0VQ+7cSanTVPxaZMWEzI22Q4bGnuvhVjLAJBNQ3E=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "4fc9ea78c962904f4ea11046f3db37c62e8a02fd",
"rev": "69716041f881a2af935021c1182ed5b0cc04d40e",
"type": "github"
},
"original": {
@ -292,11 +292,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1744463964,
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
"lastModified": 1744932701,
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
"type": "github"
},
"original": {
@ -417,11 +417,11 @@
]
},
"locked": {
"lastModified": 1744803954,
"narHash": "sha256-f+gE6JtLhPzyDWOCEHbN/S30GEGHMtXEt41+Va7wzEU=",
"lastModified": 1745116541,
"narHash": "sha256-5xzA6dTfqCfTTDCo3ipPZzrg3wp01xmcr73y4cTNMP8=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "c564fb830c7d5b3e4fde5ea829a62f0e41e43a20",
"rev": "e2142ef330a61c02f274ac9a9cb6f8487a5d0080",
"type": "github"
},
"original": {
@ -503,11 +503,11 @@
]
},
"locked": {
"lastModified": 1744768710,
"narHash": "sha256-ow0HDShvAe9gkM3Ww5aoJo1lDLpC5pYQ7qLtnTaHoyI=",
"lastModified": 1745114521,
"narHash": "sha256-P/TgmeavrpUiHCejjjsU2vOMB7cBIcHltGDSKKgi20E=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "47bd3dc652c4a02dc565a9360fe828af38bea287",
"rev": "ff14820202442f847fd37862eb48a7cb254a19d3",
"type": "github"
},
"original": {

View file

@ -7,7 +7,6 @@
package = pkgs.ibm-plex;
size = 12;
};
themeFile = "GitHub_Dark";
settings = {
enable_audio_bell = true;
# how many windows should be open before kitty asks

View file

@ -162,4 +162,6 @@
enable = true;
addKeysToAgent = "yes";
};
programs.firefox.enable = true;
}