1
1
Fork 0

Create a beatific module with options

This commit is contained in:
Tim Van Baak 2023-08-02 01:59:06 +00:00
parent 9948b73eff
commit 4e8a2bb7e4
3 changed files with 22 additions and 1 deletions

View File

@ -31,10 +31,13 @@
intake,
intake-sources,
}: {
nixosModules.beatific = import ./modules/beatific.nix;
nixosConfigurations = {
backyard = nixpkgs-next.lib.nixosSystem {
system = "x86_64-linux";
modules = [
self.nixosModules.beatific
./machine/backyard
];
};

View File

@ -11,7 +11,7 @@
efi.canTouchEfiVariables = true;
};
networking.hostName = "backyard"; # Define your hostname.
beatific.hostName = "backyard";
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Enable networking

18
modules/beatific.nix Normal file
View File

@ -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;
};
}