hostname/timezone abstractions

This commit is contained in:
Daylin Morgan 2024-05-12 14:50:33 -05:00
parent c740020fa8
commit 04a13ab976
Signed by: daylin
GPG key ID: 950D13E9719334AD
7 changed files with 18 additions and 24 deletions

View file

@ -8,9 +8,6 @@
bantime = "24h";
};
time.timeZone = "America/Chicago";
networking.hostName = "algiz";
# # added to make using `pip install` work in docker build
# networking.nameservers = [ "8.8.8.8"];

View file

@ -1,7 +1,5 @@
{ self, enabled, ... }:
{ enabled, ... }:
{
imports = with self.nixosModules; [ nix-ld ];
oizys = {
desktop = enabled;
nix-ld = enabled;

View file

@ -59,10 +59,8 @@
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
programs.nix-ld = enabled;
services.openssh = enabled;
networking.hostName = "mannaz";
# networking.wireless.enable = true;
# networking.networkmanager.enable = true;
@ -71,7 +69,6 @@
7860
];
time.timeZone = "America/Chicago";
security.sudo.wheelNeedsPassword = false;
# don't delete this you foo bar

View file

@ -23,9 +23,6 @@
environment.systemPackages = with pkgs; [ pamixer ];
networking.hostName = "othalan";
time.timeZone = "US/Central";
# catppuccin/tty move to "module"
boot.kernelParams = [
"vt.default_red=30,243,166,249,137,245,148,186,88,243,166,249,137,245,148,166"

View file

@ -29,18 +29,14 @@ rec {
nixosModules = listToAttrs (findModulesList ../modules);
mkSystem =
hostname:
hostName:
nixosSystem {
system = "x86_64-linux";
modules =
[
modules = [
../modules/oizys.nix
../overlays
inputs.lix-module.nixosModules.default
]
++ filter
isNixFile
(listFilesRecursive (../. + "/hosts/${hostname}"));
] ++ filter isNixFile (listFilesRecursive (../. + "/hosts/${hostName}"));
specialArgs = {
inherit
@ -50,6 +46,7 @@ rec {
mkDefaultOizysModule
mkOizysModule
enabled
hostName
;
};
};

View file

@ -1,4 +1,9 @@
{ lib, self, ... }:
{
lib,
self,
hostName,
...
}:
let
inherit (lib) mkEnableOption;
in
@ -35,4 +40,8 @@ in
];
options.oizys.desktop.enable = mkEnableOption "is desktop";
config = {
networking.hostName = hostName;
time.timeZone = "US/Central";
};
}

View file

@ -65,7 +65,6 @@ in
number = "2"; # todo: autogenerate based on hostname?
name = cfg.name;
};
})
];
}