mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
fix(ct): dynamic hostname
This commit is contained in:
parent
040786202c
commit
00f4c09191
4 changed files with 7 additions and 4 deletions
2
lib.nix
2
lib.nix
|
|
@ -29,7 +29,7 @@
|
||||||
nibble0 + (fixedWidthString 1 "0" (toHexStringLower nibble1));
|
nibble0 + (fixedWidthString 1 "0" (toHexStringLower nibble1));
|
||||||
in "${part0 (part 0)}${part 1}:${part 2}ff:fe${part 3}:${part 4}${part 5}";
|
in "${part0 (part 0)}${part 1}:${part 2}ff:fe${part 3}:${part 4}${part 5}";
|
||||||
in {
|
in {
|
||||||
inherit tree nixlib;
|
inherit tree nixlib inputs;
|
||||||
std = inputs.self.lib.Std.Std.compat;
|
std = inputs.self.lib.Std.Std.compat;
|
||||||
Std = inputs.std-fl.lib;
|
Std = inputs.std-fl.lib;
|
||||||
lib = {
|
lib = {
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
"''${NF_CONFIG_ROOT-${toString ../.}}#$ARG_CONFIG_PATH.system.build.tarball" \
|
"''${NF_CONFIG_ROOT-${toString ../.}}#$ARG_CONFIG_PATH.system.build.tarball" \
|
||||||
--show-trace "$@")
|
--show-trace "$@")
|
||||||
if [[ $ARG_NODE = ct ]]; then
|
if [[ $ARG_NODE = ct ]]; then
|
||||||
DATESTAMP=$(nix eval --raw "''${NF_CONFIG_ROOT-${toString ../.}}#inputs.nixpkgs.sourceInfo.lastModifiedDate")
|
DATESTAMP=$(nix eval --raw "''${NF_CONFIG_ROOT-${toString ../.}}#lib.inputs.nixpkgs.sourceInfo.lastModifiedDate")
|
||||||
DATENAME=''${DATESTAMP:0:4}''${DATESTAMP:4:2}''${DATESTAMP:6:2}
|
DATENAME=''${DATESTAMP:0:4}''${DATESTAMP:4:2}''${DATESTAMP:6:2}
|
||||||
SYSARCH=$(nix eval --raw "''${NF_CONFIG_ROOT-${toString ../.}}#$ARG_CONFIG_PATH.nixpkgs.system")
|
SYSARCH=$(nix eval --raw "''${NF_CONFIG_ROOT-${toString ../.}}#$ARG_CONFIG_PATH.nixpkgs.system")
|
||||||
TAREXT=$(nix eval --raw "''${NF_CONFIG_ROOT-${toString ../.}}#$ARG_CONFIG_PATH.system.build.tarball.extension")
|
TAREXT=$(nix eval --raw "''${NF_CONFIG_ROOT-${toString ../.}}#$ARG_CONFIG_PATH.system.build.tarball.extension")
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
{
|
{
|
||||||
meta,
|
meta,
|
||||||
lib,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = with meta; [
|
imports = with meta; [
|
||||||
nixos.reisen-ct
|
nixos.reisen-ct
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# allow proxmox to provide us with our hostname
|
||||||
|
environment.etc.hostname.enable = false;
|
||||||
|
services.avahi.hostName = "";
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
variable "proxmox_container_template" {
|
variable "proxmox_container_template" {
|
||||||
type = string
|
type = string
|
||||||
default = "local:vztmpl/ct-20240127-nixos-system-x86_64-linux.tar.xz"
|
default = "local:vztmpl/ct-20240205-nixos-system-x86_64-linux.tar.xz"
|
||||||
}
|
}
|
||||||
|
|
||||||
locals {
|
locals {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue