Skip to content

improve greeting, profiles, and /etc/os-release#360

Merged
24apricots merged 10 commits into
mainfrom
metadata
Jul 7, 2026
Merged

improve greeting, profiles, and /etc/os-release#360
24apricots merged 10 commits into
mainfrom
metadata

Conversation

@24apricots

@24apricots 24apricots commented Jul 6, 2026

Copy link
Copy Markdown
Member
  • profiles/*.nix is now consistent with hosts/*
  • the subdirectory in hosts/ is now what decides which profile is imported
  • greeting is now separated from motd, motd continues to be shown after login
  • greeting is shown before login on agetty, but prepended to motd after login on ssh
  • greeting color is now cyan instead of red to match the ocf color scheme better
  • new ocf.releaseMetadata.enable option
  • /etc/os-release now includes ocf urls to be shown in gui applications
  • set nixosConfigurations = self.colmenaHive.nodes

24apricots added 10 commits July 5, 2026 19:10
this changes the awkward "Hi, I am hostname, a desktops" to the grammatically
correct "Hi, I am hostname, a desktop"
the current nixosConfigurations implementation requires colmenaConfig to be an
attribute set so that modules for each host in nixosConfigurations can be set to
colmenaConfig.imports. this means that each host's config in colmenaHive cannot
accept arguments like config, lib, or pkgs.

setting nixosConfigurations directly to self.colmenaHive.nodes adds support for
passing arguments to each host while being so much simpler. this also sets the
hostname and hostid for each host in nixosConfigurations, which was previously
skipped due to nixosConfigurations having modules = colmenaConfig.imports which
skips the rest of colmenaConfig (where hostname and hostid is set, in addition
to colmena specific options that were not imported in nixosConfigurations).

(honestly this seems too good to be true. theres a reason this was not done
before, right?)
since the ocf is basically acting as the vendor, we should set the os-release
accordingly. this way, the documentation, support, bug report, etc urls that gui
applications show will be ocf specific.

fields like ID, NAME, CPE_NAME, etc are left as nixpkgs defaults since that is
os information, not vendor.
the greeting was split from the motd so that it will not be printed twice (in
both the greeting line and the motd) when logging in through agetty. however,
ssh still needs to print it after login, so ssh gets a special motd with the
greeting prepended to the motd like before.
the ocf color scheme includes california blue and gold, and cold colors like
snow and ice. bright cyan is a good choice that respects the ocf color scheme
and is widely compatible on terminals. it also happens to fit well with the nix
color scheme too
@24apricots 24apricots changed the title host metadata improve greeting, profiles, and /etc/os-release Jul 6, 2026
Comment thread flake.nix
@24apricots
24apricots merged commit b3531a8 into main Jul 7, 2026
4 checks passed
@24apricots
24apricots deleted the metadata branch July 7, 2026 06:46
@24apricots 24apricots mentioned this pull request Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants