nix fmt
This commit is contained in:
parent
9c72baf1c0
commit
00a8ac69cf
11 changed files with 78 additions and 93 deletions
12
.github/workflows/build-machines-and-homes.yml
vendored
12
.github/workflows/build-machines-and-homes.yml
vendored
|
@ -13,7 +13,6 @@ 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:
|
||||||
|
@ -37,15 +36,12 @@ 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:
|
||||||
|
@ -63,12 +59,10 @@ 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"
|
||||||
|
@ -76,7 +70,6 @@ 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:
|
||||||
|
@ -99,14 +92,11 @@ 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:
|
||||||
|
@ -124,12 +114,10 @@ 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,7 +16,6 @@ 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:
|
||||||
|
@ -29,33 +28,26 @@ 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,7 +118,6 @@ 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,8 +10,7 @@
|
||||||
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
|
||||||
|
|
|
@ -6,20 +6,22 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
immich-ml = let
|
immich-ml =
|
||||||
modelCache = "/opt/immich-ml";
|
let
|
||||||
in {
|
modelCache = "/opt/immich-ml";
|
||||||
image = "ghcr.io/immich-app/immich-machine-learning:release";
|
in
|
||||||
autoStart = true;
|
{
|
||||||
pull = "newer";
|
image = "ghcr.io/immich-app/immich-machine-learning:release";
|
||||||
ports = [ "3003:3003" ];
|
autoStart = true;
|
||||||
environment = {
|
pull = "newer";
|
||||||
REDIS_HOSTNAME = "immich-redis";
|
ports = [ "3003:3003" ];
|
||||||
DB_HOSTNAME = "immich-db";
|
environment = {
|
||||||
|
REDIS_HOSTNAME = "immich-redis";
|
||||||
|
DB_HOSTNAME = "immich-db";
|
||||||
|
};
|
||||||
|
volumes = [ "${modelCache}:/cache" ];
|
||||||
|
networks = [ "immich-net" ];
|
||||||
};
|
};
|
||||||
volumes = [ "${modelCache}:/cache" ];
|
|
||||||
networks = [ "immich-net" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.create-immich-net = rec {
|
systemd.services.create-immich-net = rec {
|
||||||
|
|
|
@ -147,47 +147,49 @@
|
||||||
"podman"
|
"podman"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; lib.flatten [
|
environment.systemPackages =
|
||||||
tmux
|
with pkgs;
|
||||||
vim
|
lib.flatten [
|
||||||
wget
|
tmux
|
||||||
tree
|
vim
|
||||||
kitty
|
wget
|
||||||
borgbackup
|
tree
|
||||||
htop
|
kitty
|
||||||
file
|
borgbackup
|
||||||
dnsutils
|
htop
|
||||||
q
|
file
|
||||||
age
|
dnsutils
|
||||||
compsize
|
q
|
||||||
wireguard-tools
|
age
|
||||||
traceroute
|
compsize
|
||||||
sops
|
wireguard-tools
|
||||||
sbctl # secure boot
|
traceroute
|
||||||
lm_sensors
|
sops
|
||||||
sshfs
|
sbctl # secure boot
|
||||||
openssl
|
lm_sensors
|
||||||
just
|
sshfs
|
||||||
killall
|
openssl
|
||||||
lshw
|
just
|
||||||
bubblewrap
|
killall
|
||||||
fuse-overlayfs
|
lshw
|
||||||
dwarfs
|
bubblewrap
|
||||||
wineWowPackages.stagingFull
|
fuse-overlayfs
|
||||||
(with gst_all_1; [
|
dwarfs
|
||||||
gst-plugins-good
|
wineWowPackages.stagingFull
|
||||||
gst-plugins-bad
|
(with gst_all_1; [
|
||||||
gst-plugins-ugly
|
gst-plugins-good
|
||||||
gst-plugins-base
|
gst-plugins-bad
|
||||||
])
|
gst-plugins-ugly
|
||||||
vulkan-loader
|
gst-plugins-base
|
||||||
(heroic.override {
|
])
|
||||||
extraPkgs = pkgs: [
|
vulkan-loader
|
||||||
pkgs.gamescope
|
(heroic.override {
|
||||||
pkgs.gamemode
|
extraPkgs = pkgs: [
|
||||||
];
|
pkgs.gamescope
|
||||||
})
|
pkgs.gamemode
|
||||||
];
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
final: prev: {
|
final: prev: {
|
||||||
bitwarden-desktop = prev.bitwarden-desktop.overrideAttrs (finalAttrs: prevAttrs: {
|
bitwarden-desktop = prev.bitwarden-desktop.overrideAttrs (
|
||||||
patches = prevAttrs.patches ++ [
|
finalAttrs: prevAttrs: {
|
||||||
./ssh-agent-no-confirm.patch
|
patches = prevAttrs.patches ++ [
|
||||||
];
|
./ssh-agent-no-confirm.patch
|
||||||
});
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
|
@ -14,14 +14,15 @@ in
|
||||||
pkgFrom = flake: pkg: flake.packages.${prev.system}.${pkg};
|
pkgFrom = flake: pkg: flake.packages.${prev.system}.${pkg};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
conduwuit =
|
conduwuit = pkgFrom inputs.conduwuit "static-x86_64-linux-musl-all-features-x86_64-haswell-optimised";
|
||||||
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 = ((pkgFrom inputs.garage "default").overrideAttrs {
|
garage = (
|
||||||
|
(pkgFrom inputs.garage "default").overrideAttrs {
|
||||||
meta.mainProgram = "garage";
|
meta.mainProgram = "garage";
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue