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"; bantime = "24h";
}; };
time.timeZone = "America/Chicago";
networking.hostName = "algiz";
# # added to make using `pip install` work in docker build # # added to make using `pip install` work in docker build
# networking.nameservers = [ "8.8.8.8"]; # networking.nameservers = [ "8.8.8.8"];

View file

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

View file

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

View file

@ -23,9 +23,6 @@
environment.systemPackages = with pkgs; [ pamixer ]; environment.systemPackages = with pkgs; [ pamixer ];
networking.hostName = "othalan";
time.timeZone = "US/Central";
# catppuccin/tty move to "module" # catppuccin/tty move to "module"
boot.kernelParams = [ boot.kernelParams = [
"vt.default_red=30,243,166,249,137,245,148,186,88,243,166,249,137,245,148,166" "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); nixosModules = listToAttrs (findModulesList ../modules);
mkSystem = mkSystem =
hostname: hostName:
nixosSystem { nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = modules = [
[
../modules/oizys.nix ../modules/oizys.nix
../overlays ../overlays
inputs.lix-module.nixosModules.default inputs.lix-module.nixosModules.default
] ] ++ filter isNixFile (listFilesRecursive (../. + "/hosts/${hostName}"));
++ filter
isNixFile
(listFilesRecursive (../. + "/hosts/${hostname}"));
specialArgs = { specialArgs = {
inherit inherit
@ -50,6 +46,7 @@ rec {
mkDefaultOizysModule mkDefaultOizysModule
mkOizysModule mkOizysModule
enabled enabled
hostName
; ;
}; };
}; };

View file

@ -1,4 +1,9 @@
{ lib, self, ... }: {
lib,
self,
hostName,
...
}:
let let
inherit (lib) mkEnableOption; inherit (lib) mkEnableOption;
in in
@ -35,4 +40,8 @@ in
]; ];
options.oizys.desktop.enable = mkEnableOption "is desktop"; 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? number = "2"; # todo: autogenerate based on hostname?
name = cfg.name; name = cfg.name;
}; };
}) })
]; ];
} }