Compare commits
No commits in common. "00a8ac69cf0ca6d9e09e9603202a051cd0e1deee" and "16788bc7b2228ea50e86f00df560edc3ed3f1e29" have entirely different histories.
00a8ac69cf
...
16788bc7b2
14 changed files with 105 additions and 100 deletions
12
.github/workflows/build-machines-and-homes.yml
vendored
12
.github/workflows/build-machines-and-homes.yml
vendored
|
@ -13,6 +13,7 @@ env:
|
||||||
extra-experimental-features = nix-command flakes
|
extra-experimental-features = nix-command flakes
|
||||||
accept-flake-config = true
|
accept-flake-config = true
|
||||||
TERM: ansi
|
TERM: ansi
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-machines:
|
build-machines:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -36,12 +37,15 @@ jobs:
|
||||||
remove-codeql: 'true'
|
remove-codeql: 'true'
|
||||||
remove-docker-images: 'true'
|
remove-docker-images: 'true'
|
||||||
build-mount-path: /nix
|
build-mount-path: /nix
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: nixbuild/nix-quick-install-action@master
|
uses: nixbuild/nix-quick-install-action@master
|
||||||
|
|
||||||
- name: Sync repository
|
- name: Sync repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Restore and cache Nix store
|
- name: Restore and cache Nix store
|
||||||
uses: nix-community/cache-nix-action@v5.1.0
|
uses: nix-community/cache-nix-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
|
@ -59,10 +63,12 @@ jobs:
|
||||||
purge-primary-key: never
|
purge-primary-key: never
|
||||||
# always save the cache
|
# always save the cache
|
||||||
save-always: true
|
save-always: true
|
||||||
|
|
||||||
- name: setup attic
|
- name: setup attic
|
||||||
run: |
|
run: |
|
||||||
nix profile install github:zhaofengli/attic
|
nix profile install github:zhaofengli/attic
|
||||||
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||||
|
|
||||||
- name: build and cache
|
- name: build and cache
|
||||||
run: |
|
run: |
|
||||||
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
||||||
|
@ -70,6 +76,7 @@ jobs:
|
||||||
derivation="$(nix path-info --derivation "$package")"
|
derivation="$(nix path-info --derivation "$package")"
|
||||||
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
|
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
|
||||||
attic push main --stdin <<< "$cache"
|
attic push main --stdin <<< "$cache"
|
||||||
|
|
||||||
build-homes:
|
build-homes:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -92,11 +99,14 @@ jobs:
|
||||||
remove-codeql: 'true'
|
remove-codeql: 'true'
|
||||||
remove-docker-images: 'true'
|
remove-docker-images: 'true'
|
||||||
build-mount-path: /nix
|
build-mount-path: /nix
|
||||||
|
|
||||||
- uses: nixbuild/nix-quick-install-action@master
|
- uses: nixbuild/nix-quick-install-action@master
|
||||||
|
|
||||||
- name: Sync repository
|
- name: Sync repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Restore and cache Nix store
|
- name: Restore and cache Nix store
|
||||||
uses: nix-community/cache-nix-action@v5.1.0
|
uses: nix-community/cache-nix-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
|
@ -114,10 +124,12 @@ jobs:
|
||||||
purge-primary-key: never
|
purge-primary-key: never
|
||||||
# always save the cache
|
# always save the cache
|
||||||
save-always: true
|
save-always: true
|
||||||
|
|
||||||
- name: setup attic
|
- name: setup attic
|
||||||
run: |
|
run: |
|
||||||
nix profile install github:zhaofengli/attic
|
nix profile install github:zhaofengli/attic
|
||||||
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||||
|
|
||||||
- name: build and cache
|
- name: build and cache
|
||||||
run: |
|
run: |
|
||||||
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
||||||
|
|
8
.github/workflows/build-packages.yml
vendored
8
.github/workflows/build-packages.yml
vendored
|
@ -16,6 +16,7 @@ env:
|
||||||
extra-experimental-features = nix-command flakes
|
extra-experimental-features = nix-command flakes
|
||||||
accept-flake-config = true
|
accept-flake-config = true
|
||||||
TERM: ansi
|
TERM: ansi
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-packages:
|
build-packages:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -28,26 +29,33 @@ jobs:
|
||||||
- ubuntu-24.04-arm
|
- ubuntu-24.04-arm
|
||||||
- macos-latest
|
- macos-latest
|
||||||
- macos-13
|
- macos-13
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v30
|
uses: cachix/install-nix-action@v30
|
||||||
|
|
||||||
- name: Sync repository
|
- name: Sync repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: setup attic
|
- name: setup attic
|
||||||
run: |
|
run: |
|
||||||
nix profile install github:zhaofengli/attic
|
nix profile install github:zhaofengli/attic
|
||||||
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||||
|
|
||||||
- run: nix build -L ${{ matrix.package }}
|
- run: nix build -L ${{ matrix.package }}
|
||||||
|
|
||||||
- name: cache result
|
- name: cache result
|
||||||
run: |
|
run: |
|
||||||
derivation="$(nix path-info --derivation "${{ matrix.package }}")"
|
derivation="$(nix path-info --derivation "${{ matrix.package }}")"
|
||||||
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
|
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
|
||||||
attic push main --stdin <<< "$cache"
|
attic push main --stdin <<< "$cache"
|
||||||
|
|
||||||
- name: prepare tarball to upload
|
- name: prepare tarball to upload
|
||||||
run: nix run github:nixos/nixpkgs#gnutar hcvf result.tar result
|
run: nix run github:nixos/nixpkgs#gnutar hcvf result.tar result
|
||||||
|
|
||||||
- name: upload result
|
- name: upload result
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -118,6 +118,7 @@ creation_rules:
|
||||||
- age:
|
- age:
|
||||||
- *chunk
|
- *chunk
|
||||||
- *cy
|
- *cy
|
||||||
|
|
||||||
- path_regex: secrets/services/searx.yaml
|
- path_regex: secrets/services/searx.yaml
|
||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
extensions =
|
extensions =
|
||||||
# if unfree
|
# if unfree
|
||||||
# with pkgs.vscode-marketplace;
|
# with pkgs.vscode-marketplace;
|
||||||
with pkgs.open-vsx; [
|
with pkgs.open-vsx;
|
||||||
|
[
|
||||||
vscodevim.vim
|
vscodevim.vim
|
||||||
jnoortheen.nix-ide
|
jnoortheen.nix-ide
|
||||||
github.github-vscode-theme
|
github.github-vscode-theme
|
||||||
|
|
|
@ -10,13 +10,15 @@
|
||||||
api_bind_addr = "[::]:3900";
|
api_bind_addr = "[::]:3900";
|
||||||
root_domain = "s3.cy7.sh";
|
root_domain = "s3.cy7.sh";
|
||||||
};
|
};
|
||||||
|
s3_web = {
|
||||||
|
bind_addr = "[::]:3902";
|
||||||
|
root_domain = ".web.s3.cy7.sh";
|
||||||
|
index = "index.html";
|
||||||
|
};
|
||||||
admin.api_bind_addr = "[::]:3903";
|
admin.api_bind_addr = "[::]:3903";
|
||||||
rpc_bind_addr = "[::]:3901";
|
rpc_bind_addr = "[::]:3901";
|
||||||
replication_factor = 1;
|
replication_factor = 1;
|
||||||
db_engine = "lmdb";
|
db_engine = "lmdb";
|
||||||
disable_scrub = true;
|
|
||||||
block_size = "10M";
|
|
||||||
compression_level = 3;
|
|
||||||
};
|
};
|
||||||
environmentFile = config.sops.secrets."garage/env".path;
|
environmentFile = config.sops.secrets."garage/env".path;
|
||||||
};
|
};
|
||||||
|
@ -29,6 +31,10 @@
|
||||||
reverse_proxy localhost:3900
|
reverse_proxy localhost:3900
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
"*.web.s3.cy7.sh".extraConfig = ''
|
||||||
|
import common
|
||||||
|
reverse_proxy localhost:3902
|
||||||
|
'';
|
||||||
"admin.s3.cy7.sh".extraConfig = ''
|
"admin.s3.cy7.sh".extraConfig = ''
|
||||||
import common
|
import common
|
||||||
reverse_proxy localhost:3903
|
reverse_proxy localhost:3903
|
||||||
|
|
|
@ -29,14 +29,6 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
job_name = "garage";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = [ "127.0.0.1:3903" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -32,17 +32,9 @@
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
ExecStartPre = "/usr/bin/env mkdir -p /mnt/garage";
|
ExecStartPre = "/usr/bin/env mkdir -p /mnt/garage";
|
||||||
ExecStart = ''
|
ExecStart = "${lib.getExe pkgs.rclone} mount --config ${
|
||||||
${lib.getExe pkgs.rclone} mount \
|
config.sops.secrets."rclone/config".path
|
||||||
--config ${config.sops.secrets."rclone/config".path} \
|
} --cache-dir /var/cache/rclone --transfers=32 --checkers=32 --vfs-cache-mode writes --vfs-cache-max-size 5G --allow-other rsyncnet:garage /mnt/garage ";
|
||||||
--allow-other \
|
|
||||||
--cache-dir /var/cache/rclone \
|
|
||||||
--transfers=32 --checkers=32 \
|
|
||||||
--vfs-cache-mode writes \
|
|
||||||
--vfs-cache-max-size 5G \
|
|
||||||
--dir-cache-time 30d \
|
|
||||||
rsyncnet:garage /mnt/garage
|
|
||||||
'';
|
|
||||||
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/garage";
|
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/garage";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,11 +6,9 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
immich-ml =
|
immich-ml = let
|
||||||
let
|
|
||||||
modelCache = "/opt/immich-ml";
|
modelCache = "/opt/immich-ml";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
image = "ghcr.io/immich-app/immich-machine-learning:release";
|
image = "ghcr.io/immich-app/immich-machine-learning:release";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
pull = "newer";
|
pull = "newer";
|
||||||
|
|
|
@ -147,9 +147,7 @@
|
||||||
"podman"
|
"podman"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages = with pkgs; lib.flatten [
|
||||||
with pkgs;
|
|
||||||
lib.flatten [
|
|
||||||
tmux
|
tmux
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
final: prev: {
|
final: prev: {
|
||||||
bitwarden-desktop = prev.bitwarden-desktop.overrideAttrs (
|
bitwarden-desktop = prev.bitwarden-desktop.overrideAttrs (finalAttrs: prevAttrs: {
|
||||||
finalAttrs: prevAttrs: {
|
|
||||||
patches = prevAttrs.patches ++ [
|
patches = prevAttrs.patches ++ [
|
||||||
./ssh-agent-no-confirm.patch
|
./ssh-agent-no-confirm.patch
|
||||||
];
|
];
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
|
@ -14,15 +14,14 @@ in
|
||||||
pkgFrom = flake: pkg: flake.packages.${prev.system}.${pkg};
|
pkgFrom = flake: pkg: flake.packages.${prev.system}.${pkg};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
conduwuit = pkgFrom inputs.conduwuit "static-x86_64-linux-musl-all-features-x86_64-haswell-optimised";
|
conduwuit =
|
||||||
|
pkgFrom inputs.conduwuit "static-x86_64-linux-musl-all-features-x86_64-haswell-optimised";
|
||||||
pixelflasher = nixpkgsFrom inputs.pixelflasher "pixelflasher";
|
pixelflasher = nixpkgsFrom inputs.pixelflasher "pixelflasher";
|
||||||
attic-server = pkgFrom inputs.attic "attic-server";
|
attic-server = pkgFrom inputs.attic "attic-server";
|
||||||
attic = pkgFrom inputs.attic "attic";
|
attic = pkgFrom inputs.attic "attic";
|
||||||
garage = (
|
garage = ((pkgFrom inputs.garage "default").overrideAttrs {
|
||||||
(pkgFrom inputs.garage "default").overrideAttrs {
|
|
||||||
meta.mainProgram = "garage";
|
meta.mainProgram = "garage";
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue