Less rebuilds because of commit versions
This commit is contained in:
parent
5cc42dac77
commit
3af8c50a52
|
@ -6,24 +6,11 @@
|
|||
}: let
|
||||
inherit (config.m-0) hosts;
|
||||
inherit (config.networking) hostName;
|
||||
inherit (pkgs.flake-inputs.self) sourceInfo;
|
||||
s = builtins.substring;
|
||||
formatDate = date: "${s 0 4 date}-${s 4 2 date}-${s 6 2 date}-${s 8 2 date}:${s 10 2 date}";
|
||||
in {
|
||||
imports = [
|
||||
../../common
|
||||
./admin.nix
|
||||
];
|
||||
system = {
|
||||
configurationRevision = sourceInfo.rev or null;
|
||||
nixos.label =
|
||||
if sourceInfo ? shortRev
|
||||
then "${formatDate sourceInfo.lastModifiedDate}-${sourceInfo.shortRev}"
|
||||
else "${formatDate sourceInfo.lastModifiedDate}-dirty";
|
||||
systemBuilderCommands = lib.mkIf (sourceInfo ? rev) ''
|
||||
echo ${sourceInfo.rev} > $out/config-commit
|
||||
'';
|
||||
};
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_DK.UTF-8";
|
||||
|
|
|
@ -3,10 +3,24 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (pkgs.flake-inputs.self) sourceInfo;
|
||||
s = builtins.substring;
|
||||
formatDate = date: "${s 0 4 date}-${s 4 2 date}-${s 6 2 date}-${s 8 2 date}:${s 10 2 date}";
|
||||
in {
|
||||
imports = [
|
||||
../vpn.nix
|
||||
];
|
||||
services.getty.greetingLine = "Welcome to NixOS ${config.system.nixos.version} (\m) - \l";
|
||||
system = {
|
||||
nixos.label =
|
||||
if sourceInfo ? shortRev
|
||||
then "${formatDate sourceInfo.lastModifiedDate}-${sourceInfo.shortRev}"
|
||||
else "${formatDate sourceInfo.lastModifiedDate}-dirty";
|
||||
systemBuilderCommands = lib.mkIf (sourceInfo ? rev) ''
|
||||
echo ${sourceInfo.rev} > $out/config-commit
|
||||
'';
|
||||
};
|
||||
|
||||
boot = {
|
||||
plymouth.enable = true;
|
||||
|
|
Loading…
Reference in a new issue