Set hostname in host module.
This commit is contained in:
@@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
outputs = { self, nixpkgs, deploy-rs, ... }@inputs:
|
outputs = { self, nixpkgs, deploy-rs, ... }@inputs:
|
||||||
let
|
let
|
||||||
mkNixos = hostname: modules: nixpkgs.lib.nixosSystem {
|
mkNixos = modules: nixpkgs.lib.nixosSystem {
|
||||||
inherit modules;
|
inherit modules;
|
||||||
specialArgs = { inherit inputs hostname; };
|
specialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
c1 = mkNixos "c1" [ ./hosts/c1 ];
|
c1 = mkNixos [ ./hosts/c1 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
deploy = {
|
deploy = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, inputs, hostname, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../common/global
|
../common/global
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
./hardware.nix
|
./hardware.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = hostname;
|
networking.hostName = "c1";
|
||||||
|
|
||||||
swapDevices = pkgs.lib.mkForce [ {
|
swapDevices = pkgs.lib.mkForce [ {
|
||||||
device = "/dev/disk/by-id/nvme-eui.002538b981b03d98-part2";
|
device = "/dev/disk/by-id/nvme-eui.002538b981b03d98-part2";
|
||||||
|
|||||||
Reference in New Issue
Block a user