Compare commits
17 commits
e2df47ab99
...
a7de77a0fc
Author | SHA1 | Date | |
---|---|---|---|
a7de77a0fc | |||
1b298adbf6 | |||
1cf31a7ae0 | |||
f3f15724d2 | |||
4f1bd26064 | |||
e38ed0e6f1 | |||
5a053b2379 | |||
eb054c444a | |||
2591401aa3 | |||
c193ba2108 | |||
140f0f5dcf | |||
4188e4aa83 | |||
44a98fd703 | |||
f5af830c30 | |||
b3f1d10575 | |||
61a4f97684 | |||
71657e0ccb |
8 changed files with 78 additions and 64 deletions
76
.github/workflows/build-machines-and-homes.yml
vendored
76
.github/workflows/build-machines-and-homes.yml
vendored
|
@ -39,6 +39,25 @@ jobs:
|
||||||
- name: setup binary cache key
|
- name: setup binary cache key
|
||||||
run: echo -n "${{ secrets.NIX_CACHE_SECRET_KEY }}" | xxd -p -r > ${{ runner.temp }}/cache-priv-key.pem
|
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
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v30
|
uses: cachix/install-nix-action@v30
|
||||||
with:
|
with:
|
||||||
|
@ -51,30 +70,12 @@ jobs:
|
||||||
secret-key-files = ${{ runner.temp }}/cache-priv-key.pem
|
secret-key-files = ${{ runner.temp }}/cache-priv-key.pem
|
||||||
extra-substituters = https://nixcache.cy7.sh
|
extra-substituters = https://nixcache.cy7.sh
|
||||||
extra-trusted-public-keys = nixcache.cy7.sh:DN3d1dt0wnXfTH03oVmTee4KgmdNdB0NY3SuzA8Fwx8=
|
extra-trusted-public-keys = nixcache.cy7.sh:DN3d1dt0wnXfTH03oVmTee4KgmdNdB0NY3SuzA8Fwx8=
|
||||||
|
post-build-hook = /etc/nix/upload-to-cache.sh
|
||||||
- name: Sync repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
# package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
|
||||||
# nix build -L "$package"
|
|
||||||
nix run nixpkgs#nixos-rebuild build -- -L --flake ".#${{ matrix.machine }}"
|
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/2025-04-12 -- \
|
|
||||||
push \
|
|
||||||
--bucket nixcache \
|
|
||||||
--signing-key ${{ runner.temp }}/cache-priv-key.pem \
|
|
||||||
-u https://nix-community.cachix.org \
|
|
||||||
$package
|
|
||||||
|
|
||||||
build-homes:
|
build-homes:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -103,6 +104,25 @@ jobs:
|
||||||
- name: setup binary cache key
|
- name: setup binary cache key
|
||||||
run: echo -n "${{ secrets.NIX_CACHE_SECRET_KEY }}" | xxd -p -r > ${{ runner.temp }}/cache-priv-key.pem
|
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
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v30
|
uses: cachix/install-nix-action@v30
|
||||||
with:
|
with:
|
||||||
|
@ -115,25 +135,9 @@ jobs:
|
||||||
secret-key-files = ${{ runner.temp }}/cache-priv-key.pem
|
secret-key-files = ${{ runner.temp }}/cache-priv-key.pem
|
||||||
extra-substituters = https://nixcache.cy7.sh
|
extra-substituters = https://nixcache.cy7.sh
|
||||||
extra-trusted-public-keys = nixcache.cy7.sh:DN3d1dt0wnXfTH03oVmTee4KgmdNdB0NY3SuzA8Fwx8=
|
extra-trusted-public-keys = nixcache.cy7.sh:DN3d1dt0wnXfTH03oVmTee4KgmdNdB0NY3SuzA8Fwx8=
|
||||||
|
post-build-hook = /etc/nix/upload-to-cache.sh
|
||||||
- name: Sync repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
||||||
nix build -L "$package"
|
nix build -L "$package"
|
||||||
|
|
||||||
- name: cache
|
|
||||||
# https://stackoverflow.com/a/58859404
|
|
||||||
if: '!cancelled()'
|
|
||||||
run: |
|
|
||||||
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
|
||||||
nix run github:cything/nixcp/2025-04-12 -- \
|
|
||||||
push \
|
|
||||||
--bucket nixcache \
|
|
||||||
--signing-key ${{ runner.temp }}/cache-priv-key.pem \
|
|
||||||
-u https://nix-community.cachix.org \
|
|
||||||
$package
|
|
||||||
|
|
2
.github/workflows/build-packages.yml
vendored
2
.github/workflows/build-packages.yml
vendored
|
@ -51,7 +51,7 @@ jobs:
|
||||||
# https://stackoverflow.com/a/58859404
|
# https://stackoverflow.com/a/58859404
|
||||||
if: '!cancelled()'
|
if: '!cancelled()'
|
||||||
run: |
|
run: |
|
||||||
nix run github:cything/nixcp/2025-04-12 -- \
|
nix run github:cything/nixcp -- \
|
||||||
push \
|
push \
|
||||||
--bucket nixcache \
|
--bucket nixcache \
|
||||||
--signing-key ${{ runner.temp }}/cache-priv-key.pem \
|
--signing-key ${{ runner.temp }}/cache-priv-key.pem \
|
||||||
|
|
8
ci/upload-to-cache.sh
Executable file
8
ci/upload-to-cache.sh
Executable 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¶llel-compression=true" $OUT_PATHS
|
49
flake.lock
generated
49
flake.lock
generated
|
@ -147,11 +147,11 @@
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742547966,
|
"lastModified": 1745093116,
|
||||||
"narHash": "sha256-AJfw+XRaRyrlpb9Wy6rVz44JePy0AXWPECXVPBnrOfI=",
|
"narHash": "sha256-38L/NZyfGSGff9f+FfRd4teA1Xj93hqcBJcqhxbLA7Y=",
|
||||||
"owner": "deuxfleurs-org",
|
"owner": "deuxfleurs-org",
|
||||||
"repo": "garage",
|
"repo": "garage",
|
||||||
"rev": "14d2f2b18da015508d4a1e31b2f014da5188d516",
|
"rev": "4ef954d17604eba8aafa52902cd3c573978c7195",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -189,11 +189,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743948087,
|
"lastModified": 1745128386,
|
||||||
"narHash": "sha256-B6cIi2ScgVSROPPlTti6len+TdR0K25B9R3oKvbw3M8=",
|
"narHash": "sha256-xnNxL9lZC5Ez8AxTgHZZu8pYSNM34+5GD5jGSs8Vq4M=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "ef3b2a6b602c3f1a80c6897d6de3ee62339a3eb7",
|
"rev": "f98314bb064cf8f8446c44afbadaaad2505875a7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -257,11 +257,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743911143,
|
"lastModified": 1745120797,
|
||||||
"narHash": "sha256-4j4JPwr0TXHH4ZyorXN5yIcmqIQr0WYacsuPA4ktONo=",
|
"narHash": "sha256-owQ0VQ+7cSanTVPxaZMWEzI22Q4bGnuvhVjLAJBNQ3E=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "a36f6a7148aec2c77d78e4466215cceb2f5f4bfb",
|
"rev": "69716041f881a2af935021c1182ed5b0cc04d40e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -277,11 +277,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743410259,
|
"lastModified": 1744621833,
|
||||||
"narHash": "sha256-tjdkPPkRT1Mj72yrpN8oUxYw9SaG8wOQWD3auS1bvSs=",
|
"narHash": "sha256-II6a32kRc+KbLhU/jS8EbuXYt1PNCvsRvuBw2becgQM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-ld",
|
"repo": "nix-ld",
|
||||||
"rev": "140451db1cadeef1e7e9e054332b67b7be808916",
|
"rev": "9a3812797e25def1d4aed62b517606b7b93989dc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -292,11 +292,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744463964,
|
"lastModified": 1744932701,
|
||||||
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
|
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
|
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -417,11 +417,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743906877,
|
"lastModified": 1745116541,
|
||||||
"narHash": "sha256-Thah1oU8Vy0gs9bh5QhNcQh1iuQiowMnZPbrkURonZA=",
|
"narHash": "sha256-5xzA6dTfqCfTTDCo3ipPZzrg3wp01xmcr73y4cTNMP8=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "9d00c6b69408dd40d067603012938d9fbe95cfcd",
|
"rev": "e2142ef330a61c02f274ac9a9cb6f8487a5d0080",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -437,11 +437,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743910657,
|
"lastModified": 1744669848,
|
||||||
"narHash": "sha256-zr2jmWeWyhCD8WmO2aWov2g0WPPuZfcJDKzMJZYGq3Y=",
|
"narHash": "sha256-pXyanHLUzLNd3MX9vsWG+6Z2hTU8niyphWstYEP3/GU=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "523f58a4faff6c67f5f685bed33a7721e984c304",
|
"rev": "61154300d945f0b147b30d24ddcafa159148026a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -498,17 +498,16 @@
|
||||||
"vscode-extensions": {
|
"vscode-extensions": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743904774,
|
"lastModified": 1745114521,
|
||||||
"narHash": "sha256-dHnwYLz1b6ohGP2DjWKpDFEZ9WOm4vYuPXKUna08awU=",
|
"narHash": "sha256-P/TgmeavrpUiHCejjjsU2vOMB7cBIcHltGDSKKgi20E=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-vscode-extensions",
|
"repo": "nix-vscode-extensions",
|
||||||
"rev": "da51d4cab526bef885e8c95ab2b9455bfe0940d4",
|
"rev": "ff14820202442f847fd37862eb48a7cb254a19d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
package = pkgs.ibm-plex;
|
package = pkgs.ibm-plex;
|
||||||
size = 12;
|
size = 12;
|
||||||
};
|
};
|
||||||
themeFile = "GitHub_Dark";
|
|
||||||
settings = {
|
settings = {
|
||||||
enable_audio_bell = true;
|
enable_audio_bell = true;
|
||||||
# how many windows should be open before kitty asks
|
# how many windows should be open before kitty asks
|
||||||
|
|
|
@ -104,6 +104,7 @@
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
minio-client
|
minio-client
|
||||||
nil
|
nil
|
||||||
|
keepassxc
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
|
@ -161,4 +162,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
addKeysToAgent = "yes";
|
addKeysToAgent = "yes";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.firefox.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ inputs, config, pkgs, ... }:
|
{ inputs, config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
nix = {
|
nix = {
|
||||||
|
package = pkgs.lix;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
|
|
|
@ -21,7 +21,7 @@ in
|
||||||
# (still need the @ to pass nix config check)
|
# (still need the @ to pass nix config check)
|
||||||
"github.com/caddy-dns/cloudflare@v0.0.0-20250228175314-1fb64108d4de"
|
"github.com/caddy-dns/cloudflare@v0.0.0-20250228175314-1fb64108d4de"
|
||||||
];
|
];
|
||||||
hash = "sha256-YYpsf8HMONR1teMiSymo2y+HrKoxuJMKIea5/NEykGc=";
|
hash = "sha256-pfh9DXUj35jlAntkWc4D5wuW04xxQfM1rZ4KFauMzvc=";
|
||||||
};
|
};
|
||||||
logFormat = lib.mkForce "level INFO";
|
logFormat = lib.mkForce "level INFO";
|
||||||
acmeCA = "https://acme-v02.api.letsencrypt.org/directory";
|
acmeCA = "https://acme-v02.api.letsencrypt.org/directory";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue