mirror of https://gitlab.crans.org/nounous/nixos
Merge branch 'flake-rev' into 'main'
MOTD avec version de la flake ! See merge request nounous/nixos!82telephonie
commit
a34be8a1e1
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.crans.users;
|
||||
|
|
@ -34,6 +39,20 @@ in
|
|||
users = {
|
||||
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 = {
|
||||
hashedPasswordFile = config.age.secrets.root-passwd-hash.path;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, ... }:
|
||||
{ lib, self, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
|
@ -25,6 +25,9 @@
|
|||
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
|
||||
boot.zfs.forceImportAll = lib.mkDefault false;
|
||||
boot.zfs.forceImportRoot = lib.mkDefault false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue