merged cachix deploy in with nixos configurations for manual deploy

This commit is contained in:
Joseph Hanson 2024-06-19 01:08:44 -05:00
parent 1dff38cc97
commit 4efab49fff

View file

@ -32,16 +32,8 @@
}; };
cachix-deploy-lib = cachix-deploy-flake.lib pkgs; cachix-deploy-lib = cachix-deploy-flake.lib pkgs;
}; };
in aarch64-linux-modules = [
{ sops-nix.nixosModules.sops
packages.aarch64-linux.default =
let
inherit (common "aarch64-linux") cachix-deploy-lib pkgs;
in
cachix-deploy-lib.nixos {
# system = "aarch64-linux";
imports = [
sops-nix.nixosModules.sops
srvos.nixosModules.hardware-hetzner-cloud srvos.nixosModules.hardware-hetzner-cloud
srvos.nixosModules.server srvos.nixosModules.server
srvos.nixosModules.mixins-systemd-boot srvos.nixosModules.mixins-systemd-boot
@ -58,43 +50,69 @@
]; ];
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "without-password"; services.openssh.settings.PermitRootLogin = "without-password";
}]; }
];
x86_64-linux-modules = [
sops-nix.nixosModules.sops
./hardware/shadowfax-kubevirt.nix
srvos.nixosModules.server
srvos.nixosModules.mixins-systemd-boot
disko.nixosModules.disko
./agents/fj-shadowfax-x86_64.nix
(import ./disko-shadowfax-kubevirt.nix { disks = [ "/dev/sda" ]; })
{
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "fj-shadowfax-01";
users.users.root.openssh.authorizedKeys.keys =
[
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBsUe5YF5z8vGcEYtQX7AAiw2rJygGf2l7xxr8nZZa7w jahanson@legiondary"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJyA/yMPPo+scxBaDFUk7WeEyMAMhXUro5vi4feOKsJT jahanson@durincore"
];
services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "without-password";
}
];
in
{
nixosConfigurations =
{
"fj-hetzner-aarch64-01" = lib.nixosSystem {
system = "aarch64-linux";
specialArgs = {inherit inputs; };
modules = [ aarch64-linux-modules ];
};
"fj-shadowfax-01" = lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs; };
modules = [ x86_64-linux-modules ];
};
};
packages.aarch64-linux.default =
let
inherit (common "aarch64-linux") cachix-deploy-lib pkgs;
in
cachix-deploy-lib.nixos {
# system = "aarch64-linux";
imports = aarch64-linux-modules;
}; };
packages.x86_64-linux.default = packages.x86_64-linux.default =
let let
inherit (common "x86_64-linux") cachix-deploy-lib pkgs; inherit (common "x86_64-linux") cachix-deploy-lib pkgs;
in in
cachix-deploy-lib.nixos { cachix-deploy-lib.nixos {
imports = [ imports = x86_64-linux-modules;
sops-nix.nixosModules.sops
./hardware/shadowfax-kubevirt.nix
srvos.nixosModules.server
srvos.nixosModules.mixins-systemd-boot
disko.nixosModules.disko
./agents/fj-shadowfax-x86_64.nix
(import ./disko-shadowfax-kubevirt.nix { disks = [ "/dev/sda" ]; })
{
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "fj-shadowfax-01";
users.users.root.openssh.authorizedKeys.keys =
[
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBsUe5YF5z8vGcEYtQX7AAiw2rJygGf2l7xxr8nZZa7w jahanson@legiondary"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJyA/yMPPo+scxBaDFUk7WeEyMAMhXUro5vi4feOKsJT jahanson@durincore"
];
services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "without-password";
}
];
}; };
};
# Convenience output that aggregates the outputs for home, nixos. # Convenience output that aggregates the outputs for home, nixos.
# Also used in ci to build targets generally. # Also used in ci to build targets generally.
# top = top =
# let let
# nixtop = nixpkgs.lib.genAttrs nixtop = nixpkgs.lib.genAttrs
# (builtins.attrNames inputs.self.nixosConfigurations) (builtins.attrNames inputs.self.nixosConfigurations)
# (attr: inputs.self.nixosConfigurations.${attr}.config.system.build.toplevel); (attr: inputs.self.nixosConfigurations.${attr}.config.system.build.toplevel);
# in in
# nixtop; nixtop;
};
} }