Create a beatific module with options
This commit is contained in:
parent
9948b73eff
commit
4e8a2bb7e4
|
@ -31,10 +31,13 @@
|
||||||
intake,
|
intake,
|
||||||
intake-sources,
|
intake-sources,
|
||||||
}: {
|
}: {
|
||||||
|
nixosModules.beatific = import ./modules/beatific.nix;
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
backyard = nixpkgs-next.lib.nixosSystem {
|
backyard = nixpkgs-next.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
|
self.nixosModules.beatific
|
||||||
./machine/backyard
|
./machine/backyard
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "backyard"; # Define your hostname.
|
beatific.hostName = "backyard";
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkOption types;
|
||||||
|
cfg = config.beatific;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
beatific.hostName = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "Hostname";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
in {
|
||||||
|
networking.hostName = cfg.hostName;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue