parent
5ad1f4e497
commit
672b7c1a14
3 changed files with 63 additions and 9 deletions
|
|
@ -11,12 +11,34 @@ steps:
|
||||||
ATTIC_PUSH_TOKEN:
|
ATTIC_PUSH_TOKEN:
|
||||||
from_secret: attic_push_token
|
from_secret: attic_push_token
|
||||||
commands:
|
commands:
|
||||||
- echo "extra-experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
- |
|
||||||
|
export green="$(echo -e '\e[1;32m')"
|
||||||
|
export yellow="$(echo -e '\e[1;33m')"
|
||||||
|
export reset="$(echo -e '\e[0m')"
|
||||||
|
- |
|
||||||
|
cat > /etc/nix/nix.conf << EOF
|
||||||
|
# default settings in the docker image
|
||||||
|
build-users-group = nixbld
|
||||||
|
sandbox = false
|
||||||
|
|
||||||
|
# additional settings
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
substituters = https://attic.hailsatan.eu/xyno https://cache.nixos.org/
|
||||||
|
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= xyno:l2mXaEYOj2kSjxT1dbP1iVya1bBXmKuO7jRXUZohi8c=
|
||||||
|
trusted-substituters =
|
||||||
|
EOF
|
||||||
|
- nix build ".#nix" --print-build-logs --out-link nix --no-update-lock-file
|
||||||
|
- nix profile remove lix
|
||||||
|
- ./nix/bin/nix profile install ".#nix" --no-update-lock-file
|
||||||
|
- nix profile install ".#nix-fast-build" ".#nix-ci" --no-update-lock-file
|
||||||
|
- nix --version
|
||||||
- export PATH=$PATH:$(nix build --no-link nixpkgs#attic-client --print-out-paths)/bin
|
- export PATH=$PATH:$(nix build --no-link nixpkgs#attic-client --print-out-paths)/bin
|
||||||
- attic login default $${ATTIC_ENDPOINT} $${ATTIC_PUSH_TOKEN}
|
- attic login default $${ATTIC_ENDPOINT} $${ATTIC_PUSH_TOKEN}
|
||||||
- attic use $${ATTIC_CACHE}
|
- attic use $${ATTIC_CACHE}
|
||||||
- attic watch-store $${ATTIC_CACHE} &
|
# - attic watch-store $${ATTIC_CACHE} &
|
||||||
- nix build .#nixosConfigurations.ds9.config.system.build.toplevel .#nixosConfigurations.picard.config.system.build.toplevel .#nixosConfigurations.theseus.config.system.build.toplevel
|
# - nix build .#nixosConfigurations.ds9.config.system.build.toplevel .#nixosConfigurations.picard.config.system.build.toplevel .#nixosConfigurations.theseus.config.system.build.toplevel
|
||||||
- attic push $${ATTIC_CACHE} $(nix path-info .#nixosConfigurations.ds9.config.system.build.toplevel .#nixosConfigurations.picard.config.system.build.toplevel .#nixosConfigurations.theseus.config.system.build.toplevel)
|
- nix flake archive --to https://attic.hailsatan.eu/xyno .
|
||||||
|
- nix-fast-build --attic-cache xyno --flake .#hydraJobs.systems
|
||||||
|
# - attic push $${ATTIC_CACHE} $(nix path-info .#nixosConfigurations.ds9.config.system.build.toplevel .#nixosConfigurations.picard.config.system.build.toplevel .#nixosConfigurations.theseus.config.system.build.toplevel)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
a new interation of xyno's nixos configurations
|
a new interation of xyno's nixos configurations
|
||||||
meow
|
meow
|
||||||
|
|
||||||
|
|
|
||||||
39
flake.nix
39
flake.nix
|
|
@ -70,6 +70,15 @@
|
||||||
);
|
);
|
||||||
overlays = [
|
overlays = [
|
||||||
self.overlays.default
|
self.overlays.default
|
||||||
|
(final: prev: {
|
||||||
|
inherit (final.unstable.lixPackageSets.latest)
|
||||||
|
nixpkgs-review
|
||||||
|
nix-direnv
|
||||||
|
nix-eval-jobs
|
||||||
|
nix-fast-build
|
||||||
|
colmena
|
||||||
|
;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
genPkgs =
|
genPkgs =
|
||||||
system:
|
system:
|
||||||
|
|
@ -110,13 +119,33 @@
|
||||||
pkgs.nixfmt-rfc-style
|
pkgs.nixfmt-rfc-style
|
||||||
pkgs.nil
|
pkgs.nil
|
||||||
pkgs.sops
|
pkgs.sops
|
||||||
(pkgs.runCommand "nix-config-bin" {} ''
|
(pkgs.runCommand "nix-config-bin" { } ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp ${./bin}/* $out/bin
|
cp ${./bin}/* $out/bin
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
SOPS_CONFIG = (pkgs.callPackage ./sops.nix { instanceConfigs = lib.xyno.getDirs ./instances; });
|
SOPS_CONFIG = (pkgs.callPackage ./sops.nix { instanceConfigs = lib.xyno.getDirs ./instances; });
|
||||||
|
|
||||||
|
};
|
||||||
|
hydraJobs.systems = lib.foldl' lib.recursiveUpdate { } [
|
||||||
|
(builtins.mapAttrs (
|
||||||
|
host: config:
|
||||||
|
lib.foldl' lib.recursiveUpdate { } ([
|
||||||
|
{
|
||||||
|
inherit (config.config.system.build) initialRamdisk;
|
||||||
|
kernel = config.config.boot.kernelPackages.kernel;
|
||||||
|
}
|
||||||
|
])
|
||||||
|
) self.nixosConfigurations)
|
||||||
|
];
|
||||||
|
|
||||||
|
packages."x86_64-linux" =
|
||||||
|
let
|
||||||
|
pkgs = genPkgs "x86_64-linux";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nix = pkgs.unstable.lixPackageSets.latest.lix;
|
||||||
|
nix-fast-build = pkgs.nix-fast-build;
|
||||||
};
|
};
|
||||||
checks."x86_64-linux"."nixos" =
|
checks."x86_64-linux"."nixos" =
|
||||||
let
|
let
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue