Compare commits
No commits in common. "b23046ea5d09432294e9181e5b47c3286e03dbdd" and "7417d918095fb4041e5e794bdbb231ca0cb1e20f" have entirely different histories.
b23046ea5d
...
7417d91809
5 changed files with 85 additions and 99 deletions
|
@ -103,10 +103,5 @@
|
|||
(mkHost "nextcloud" {
|
||||
suite = "server/lxc";
|
||||
})
|
||||
|
||||
# Container for managing server flock.
|
||||
(mkHost "ornithologist" {
|
||||
suite = "server/lxc";
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
52
helpers.nix
52
helpers.nix
|
@ -12,14 +12,13 @@ with inputs.nixpkgs.lib; {
|
|||
suite ? "",
|
||||
docker ? false,
|
||||
hostModules ? [],
|
||||
}: let
|
||||
# Secrets directory.
|
||||
secrets = builtins.toString inputs.secrets;
|
||||
|
||||
}:
|
||||
{
|
||||
nixosConfigurations.${hostname} = nixosSystem rec {
|
||||
# Architecture.
|
||||
system = platform;
|
||||
|
||||
# Stable nixpkgs with overlay.
|
||||
# nixpkgs config.
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
||||
|
@ -39,27 +38,12 @@ with inputs.nixpkgs.lib; {
|
|||
];
|
||||
};
|
||||
|
||||
# deploy-rs.
|
||||
deployPkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
||||
overlays = [
|
||||
deploy-rs.overlays.default
|
||||
(self: super: {
|
||||
deploy-rs = {
|
||||
inherit (pkgs) deploy-rs;
|
||||
lib = super.deploy-rs.lib;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
in {
|
||||
nixosConfigurations.${hostname} = nixosSystem {
|
||||
inherit system pkgs;
|
||||
|
||||
specialArgs = {
|
||||
# Pass variables to config.
|
||||
inherit inputs secrets hostname;
|
||||
# Pass hostname & inputs to config.
|
||||
inherit inputs hostname;
|
||||
|
||||
# Secrets directory.
|
||||
secrets = builtins.toString inputs.secrets;
|
||||
};
|
||||
|
||||
modules =
|
||||
|
@ -99,8 +83,22 @@ with inputs.nixpkgs.lib; {
|
|||
++ optionals (docker == true) [./suites/server/docker] # Enable docker if required.
|
||||
++ (filesystem.listFilesRecursive ./modules); # Custom modules.
|
||||
};
|
||||
|
||||
deploy.nodes.${hostname} = mkIf (strings.hasPrefix "server" suite) {
|
||||
}
|
||||
// optionalAttrs (strings.hasPrefix "server" suite) {
|
||||
deploy.nodes.${hostname} = let
|
||||
deployPkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
deploy-rs.overlays.default
|
||||
(self: super: {
|
||||
deploy-rs = {
|
||||
inherit (pkgs) deploy-rs;
|
||||
lib = super.deploy-rs.lib;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
in {
|
||||
hostname = "${hostname}.local";
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
|
|
|
@ -39,9 +39,6 @@ with lib; {
|
|||
];
|
||||
};
|
||||
|
||||
# Allow emulating aarch64 to build for Raspberry Pi.
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
|
||||
# Share Music dir.
|
||||
services.samba = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
# Allow emulating aarch64 to build for Raspberry Pi.
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
|
||||
# Install some packages.
|
||||
environment.systemPackages = with pkgs; [deploy-rs];
|
||||
}
|
|
@ -26,6 +26,9 @@ with lib; {
|
|||
"udev.log_priority=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
|
||||
# Allow emulating aarch64 to build for Raspberry Pi.
|
||||
binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
};
|
||||
|
||||
# Enable smart card support (for YubiKey).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue