Skip to content

Commit 231fc19

Browse files
committed
fix dynamic hostname
1 parent 92239df commit 231fc19

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

local-flake.nix

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@
88
};
99
};
1010

11-
outputs = { self, nixpkgs, microdesktop }: {
11+
outputs = { self, nixpkgs, microdesktop }:
12+
let
13+
hostName = "myhostname"; # Replace with desired hostname
14+
in
15+
{
1216
nixosConfigurations = {
13-
"${nixos-hostname}" = nixpkgs.lib.nixosSystem {
17+
"${hostName}" = nixpkgs.lib.nixosSystem {
1418
system = "x86_64-linux";
1519
modules = [
1620
microdesktop.nixosModules.microDesktop
1721
./hardware-configuration.nix
1822
({ config, lib, pkgs, ... }: {
19-
networking.hostName = "myhostname"; # Replace with desired hostname
23+
networking.hostName = "${hostName}";
2024

2125
time.timeZone = "America/New_York"; # Replace with your timezone
2226

0 commit comments

Comments
 (0)