Skip to content

Commit

Permalink
Compat with flake re-structuring
Browse files Browse the repository at this point in the history
Signed-off-by: Joonas Rautiola <[email protected]>
  • Loading branch information
joinemm committed Nov 10, 2023
1 parent 7b1bd28 commit a811ac3
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 16 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"x86_64-darwin"
"aarch64-darwin"
];

imports = [
./hosts
./nix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,37 @@
#
# SPDX-License-Identifier: Apache-2.0
{
self,
inputs,
lib,
config,
pkgs,
...
}: {
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets.cache-sig-key.owner = "root";

imports = [
inputs.nix-serve-ng.nixosModules.default
inputs.sops-nix.nixosModules.sops
inputs.disko.nixosModules.disko
imports = lib.flatten [
(with inputs; [
nix-serve-ng.nixosModules.default
sops-nix.nixosModules.sops
disko.nixosModules.disko
])
(with self.nixosModules; [
common
qemu-common
service-openssh
service-binary-cache
service-nginx
user-jrautiola
user-cazfi
user-hydra
])
./disk-config.nix
../common.nix
../qemu-common.nix
../../services/binarycache/binary-cache.nix
../../services/nginx/nginx.nix
../../users/jrautiola.nix
../../users/cazfi.nix
../../users/hydra.nix
];

nix.settings = {
# we don't want the cache to be a substitutor for itself
substituters = [];
substituters = lib.mkForce ["https://cache.nixos.org/"];
trusted-users = ["hydra"];
};

Expand Down
3 changes: 3 additions & 0 deletions hosts/binarycache/secrets.yaml.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII)

SPDX-License-Identifier: Apache-2.0
6 changes: 6 additions & 0 deletions hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
flake.nixosModules = {
# shared modules
azure-common = import ./azure-common.nix;
qemu-common = import ./qemu-common.nix;
common = import ./common.nix;
generic-disk-config = import ./generic-disk-config.nix;
# host modules
host-build01 = import ./build01;
host-ghafhydra = import ./ghafhydra;
host-binarycache = import ./binarycache;
};

flake.nixosConfigurations = let
Expand All @@ -29,5 +31,9 @@
inherit specialArgs;
modules = [self.nixosModules.host-ghafhydra];
};
binarycache = lib.nixosSystem {
inherit specialArgs;
modules = [self.nixosModules.host-binarycache];
};
};
}
2 changes: 1 addition & 1 deletion users/cazfi.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII)
#
# SPDX-License-Identifier: Apache-2.0
{...}: {
{
users.users = {
cazfi = {
isNormalUser = true;
Expand Down
3 changes: 3 additions & 0 deletions users/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
user-builder = import ./builder.nix;
user-hrosten = import ./hrosten.nix;
user-tester = import ./tester.nix;
user-jrautiola = import ./jrautiola.nix;
user-hydra = import ./hydra.nix;
user-cazfi = import ./cazfi.nix;
};
}
2 changes: 1 addition & 1 deletion users/hydra.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII)
#
# SPDX-License-Identifier: Apache-2.0
{...}: {
{
users.users = {
hydra = {
isNormalUser = true;
Expand Down
2 changes: 1 addition & 1 deletion users/jrautiola.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII)
#
# SPDX-License-Identifier: Apache-2.0
{...}: {
{
users.users = {
jrautiola = {
isNormalUser = true;
Expand Down

0 comments on commit a811ac3

Please sign in to comment.