diff options
| author | qaristote <quentin.aristote@ens.fr> | 2023-03-29 14:24:27 +0200 |
|---|---|---|
| committer | qaristote <quentin.aristote@ens.fr> | 2023-03-29 14:24:27 +0200 |
| commit | b94ddb1f9420240780054e60fa3acb6552ca3a82 (patch) | |
| tree | ffce37519f122f31630ad7d00e65d05f502484b3 /modules/nixos/personal/nix.nix | |
| parent | ab89e2efcbed6bc0055ee344bf921427ff5c623d (diff) | |
nixos: auto-ugprade: require networkmanager to be online
Diffstat (limited to 'modules/nixos/personal/nix.nix')
| -rw-r--r-- | modules/nixos/personal/nix.nix | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/nixos/personal/nix.nix b/modules/nixos/personal/nix.nix index a4948f4..1b49e13 100644 --- a/modules/nixos/personal/nix.nix +++ b/modules/nixos/personal/nix.nix @@ -44,14 +44,18 @@ in { before = lib.mkIf config.nix.gc.automatic [ "nix-gc.service" ]; wantedBy = lib.mkIf config.nix.gc.automatic [ "nix-gc.service" ]; }; - }; - programs.git = lib.mkIf (cfg.flake != null - && lib.hasPrefix "git+file" cfg.flake) { - enable = true; - config.user = { - name = "Root user of ${config.networking.hostName}"; - email = "root@${config.networking.hostName}"; + nixos-upgrade = { + wants = lib.optional config.networking.networkmanager.enable + "NetworkManager-wait-online.service"; }; }; + programs.git = + lib.mkIf (cfg.flake != null && lib.hasPrefix "git+file" cfg.flake) { + enable = true; + config.user = { + name = "Root user of ${config.networking.hostName}"; + email = "root@${config.networking.hostName}"; + }; + }; }; } |
