my over complex system configurations dotfiles.isabelroses.com/
nixos nix flake dotfiles linux
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

modules/base/system/diff: remove

removing activation scripts due to #475305 in nixpkgs

isabel 65edc44c 23068985

+11 -49
+11 -2
justfile
··· 22 22 |& {{ nom-cmd }} 23 23 24 24 [group('rebuild')] 25 - deploy host *args: (builder "switch" "--target-host " + host "--use-substitutes " + args) 25 + deploy host *args: 26 + #!/usr/bin/env bash 27 + before=$(ssh host 'readlink -f /run/current-system') 28 + before=$(echo "$before" | tail -n 1) 29 + just builder "switch" "--target-host " + host "--use-substitutes " + args) 30 + ssh {{ host }} 'lix-diff "$before" /run/current-system' 26 31 27 32 [group('rebuild')] 28 33 deploy-all: ··· 42 47 43 48 # switch the new system configuration 44 49 [group('rebuild')] 45 - switch *args: (builder "switch" args) 50 + switch *args: 51 + #!/usr/bin/env bash 52 + before="$(readlink -f /run/current-system)" 53 + just builder "switch" args 54 + lix-diff "$before" /run/current-system 46 55 47 56 [group('rebuild')] 48 57 [macos]
-1
modules/base/system/default.nix
··· 1 1 { 2 2 imports = [ 3 3 # keep-sorted start 4 - ./diff.nix 5 4 ./fonts.nix # font configuration 6 5 ./revision.nix 7 6 ./tools.nix
-46
modules/base/system/diff.nix
··· 1 - { 2 - lib, 3 - pkgs, 4 - config, 5 - ... 6 - }: 7 - let 8 - inherit (lib) 9 - mkIf 10 - mkMerge 11 - mkAfter 12 - mkEnableOption 13 - ; 14 - in 15 - { 16 - options.garden.system.activation.diff.enable = mkEnableOption "Enable a system diff" // { 17 - default = true; 18 - }; 19 - 20 - # if the system supports dry activation, this means that we can compare 21 - # the current system with the one we are about to switch to 22 - # this can be useful to see what will change, and the clousure size 23 - config = mkIf config.garden.system.activation.diff.enable (mkMerge [ 24 - { 25 - system.activationScripts.diff = { 26 - text = '' 27 - if [[ -e /run/current-system ]]; then 28 - echo "=== diff to current-system ===" 29 - ${lib.getExe pkgs.lix-diff} --lix-bin ${config.nix.package}/bin /run/current-system "$systemConfig" 30 - echo "=== end of the system diff ===" 31 - fi 32 - ''; 33 - }; 34 - } 35 - 36 - (mkIf pkgs.stdenv.hostPlatform.isLinux { 37 - system.activationScripts.diff.supportsDryActivation = true; 38 - }) 39 - 40 - (mkIf pkgs.stdenv.hostPlatform.isDarwin { 41 - system.activationScripts.postActivation.text = mkAfter '' 42 - ${config.system.activationScripts.diff.text} 43 - ''; 44 - }) 45 - ]); 46 - }