mirror of https://gitlab.crans.org/nounous/nixos
MOTD avec version de la flake !
parent
e4539a2b69
commit
bf2103f9d4
|
|
@ -1,4 +1,9 @@
|
||||||
{ config, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.crans.users;
|
cfg = config.crans.users;
|
||||||
|
|
@ -34,6 +39,20 @@ in
|
||||||
users = {
|
users = {
|
||||||
mutableUsers = false;
|
mutableUsers = false;
|
||||||
|
|
||||||
|
motd =
|
||||||
|
let
|
||||||
|
shortRev = self.shortRev or self.dirtyShortRev or "inconnue";
|
||||||
|
rev = self.rev or (lib.strings.removeSuffix "-dirty" (self.dirtyRev or "inconnue"));
|
||||||
|
isDirty = !(self ? rev);
|
||||||
|
in
|
||||||
|
''
|
||||||
|
${
|
||||||
|
if isDirty then "!! DIRTY !! " else ""
|
||||||
|
}Version déployée ${shortRev}, modifiée le ${self.lastModifiedDate or "??"}.
|
||||||
|
|
||||||
|
https://gitlab.crans.org/nounous/nixos/-/commit/${rev}
|
||||||
|
'';
|
||||||
|
|
||||||
users.root = {
|
users.root = {
|
||||||
hashedPasswordFile = config.age.secrets.root-passwd-hash.path;
|
hashedPasswordFile = config.age.secrets.root-passwd-hash.path;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }:
|
{ lib, self, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -25,6 +25,9 @@
|
||||||
cleanOnBoot = true;
|
cleanOnBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Version de la flake pour nixos-version --configuration-revision
|
||||||
|
system.configurationRevision = self.rev or self.dirtyRev or "inconnue";
|
||||||
|
|
||||||
# Recommandé depuis le passage à 26.05
|
# Recommandé depuis le passage à 26.05
|
||||||
boot.zfs.forceImportAll = lib.mkDefault false;
|
boot.zfs.forceImportAll = lib.mkDefault false;
|
||||||
boot.zfs.forceImportRoot = lib.mkDefault false;
|
boot.zfs.forceImportRoot = lib.mkDefault false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue