modules/community-builder: add motd

This commit is contained in:
zowoq 2024-09-24 10:31:46 +10:00
parent edeaf0e3a5
commit 49f6540544
3 changed files with 47 additions and 21 deletions
modules
darwin/community-builder
nixos/community-builder
shared

View file

@ -11,6 +11,8 @@
./users.nix
];
environment.etc.motd.text = config.nixCommunity.motd;
environment.systemPackages = [
pkgs.vim
];

View file

@ -1,4 +1,9 @@
{ inputs, pkgs, ... }:
{
config,
inputs,
pkgs,
...
}:
{
imports = [
"${inputs.self}/modules/shared/community-builder.nix"
@ -6,6 +11,8 @@
./users.nix
];
users.motd = config.nixCommunity.motd;
environment.systemPackages = [
# terminfo packages
pkgs.foot.terminfo

View file

@ -1,5 +1,21 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:
{
options.nixCommunity.motd = lib.mkOption {
type = lib.types.str;
description = "message of the day";
};
config = {
nixCommunity.motd = ''
Welcome to Nix Community!
For a faster Nixpkgs clone use:
git clone --reference /var/lib/nixpkgs.git https://github.com/NixOS/nixpkgs.git
'';
# useful for people that want to test stuff
environment.systemPackages = [
pkgs.fd
@ -23,4 +39,5 @@
'';
promptInit = ""; # otherwise it'll override the grml prompt
};
};
}