aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/motd.nix9
-rw-r--r--profiles/server.nix2
2 files changed, 11 insertions, 0 deletions
diff --git a/modules/motd.nix b/modules/motd.nix
new file mode 100644
index 0000000..01575e1
--- /dev/null
+++ b/modules/motd.nix
@@ -0,0 +1,9 @@
+{ self, config, ... }:
+{
+ users.motdFile = "/etc/motd";
+ environment.etc.motd.text = ''
+ Machine ${config.networking.hostName}
+ NixOS ${config.system.nixos.release}
+ @ ${self.shortRev or self.dirtyShortRev}
+ '';
+}
diff --git a/profiles/server.nix b/profiles/server.nix
index 3bcd529..ae46bce 100644
--- a/profiles/server.nix
+++ b/profiles/server.nix
@@ -2,12 +2,14 @@
config,
lib,
pkgs,
+ self,
...
}:
{
imports = [
./default.nix
+ "${self}/modules/motd.nix"
];
# Virtualization settings