Can I create an sdImage with a preconfigured default channel?

If I understand the implementation correctly, that repo doesn’t only need to be local but to be cloned to /etc/nixos

It seems to work as I had expected and updates the lockfile all on its own. I created this flake-based no-channel system on the 22nd, initialized a git repo at /etc/nixos to track changes and made a commit or two, then just let it run for the last few days, and you can see an automatic flake update as the most recent change.

[root@nixpi:/etc/nixos]# nix-channel --list

[root@nixpi:/etc/nixos]# 
[root@nixpi:/etc/nixos]# git log
commit 3c7a8594fa7190a971d67f5af6e56c3c8751bb4d (HEAD -> master)
Author: System administrator <root@nixpi.home.arpa>
Date:   Wed Nov 23 00:03:37 2022 -0700

    flake.lock: Update
    
    Flake lock file updates:
    
    • Updated input 'nixpkgs':
        'github:NixOS/nixpkgs/41001c708d15d6f1de588b3443de970ebf1bec38' (2022-11-21)
      → 'github:NixOS/nixpkgs/56ca700ceabcfa15396bcf581a1296e8e27ad677' (2022-11-22)

commit 15064078109ea561970aa0da0865e4da7c2f788d
Author: System administrator <root@nixpi.home.arpa>
Date:   Tue Nov 22 19:23:23 2022 -0700

    Add wifi, update hourly

commit f0a7ab2946a6208f3fc3bb84f61c23525365ecdb
Author: System administrator <root@nixpi.home.arpa>
Date:   Tue Nov 22 19:17:32 2022 -0700

    Initial commit

I’ve let the system run (edit: unattended) and it continues to update the system and flake inputs as desired:

commit 81e0e20fcddc47f756acb1648e09e06263fa6cf3
Author: System administrator <root@nixpi.home.arpa>
Date:   Sat Nov 26 00:03:51 2022 -0700

    flake.lock: Update
    
    Flake lock file updates:
    
    • Updated input 'nixpkgs':
        'github:NixOS/nixpkgs/d4556b01cd32e95567656e7d9e11f39f011b5390' (2022-11-24)
      → 'github:NixOS/nixpkgs/695b3515251873e0a7e2021add4bba643c56cde3' (2022-11-25)

commit ac0c653f43cddb11e403430b02339c6574b183f7
Author: System administrator <root@nixpi.home.arpa>
Date:   Thu Nov 24 23:04:00 2022 -0700

    flake.lock: Update
    
    Flake lock file updates:
    
    • Updated input 'nixpkgs':
        'github:NixOS/nixpkgs/68ba2f40991e79a2e4e5c5b242e175a1ad270ab9' (2022-11-24)
      → 'github:NixOS/nixpkgs/d4556b01cd32e95567656e7d9e11f39f011b5390' (2022-11-24)

commit 6ad31ede200d1ff9ad878a6878889ec946846258
Author: System administrator <root@nixpi.home.arpa>
Date:   Thu Nov 24 09:03:48 2022 -0700

    flake.lock: Update
    
    Flake lock file updates:
    
    • Updated input 'nixpkgs':
        'github:NixOS/nixpkgs/56ca700ceabcfa15396bcf581a1296e8e27ad677' (2022-11-22)
      → 'github:NixOS/nixpkgs/68ba2f40991e79a2e4e5c5b242e175a1ad270ab9' (2022-11-24)

commit 3c7a8594fa7190a971d67f5af6e56c3c8751bb4d
Author: System administrator <root@nixpi.home.arpa>
Date:   Wed Nov 23 00:03:37 2022 -0700

    flake.lock: Update
    
    Flake lock file updates:
    
    • Updated input 'nixpkgs':
        'github:NixOS/nixpkgs/41001c708d15d6f1de588b3443de970ebf1bec38' (2022-11-21)
      → 'github:NixOS/nixpkgs/56ca700ceabcfa15396bcf581a1296e8e27ad677' (2022-11-22)

commit 15064078109ea561970aa0da0865e4da7c2f788d
Author: System administrator <root@nixpi.home.arpa>
Date:   Tue Nov 22 19:23:23 2022 -0700

    Add wifi, update hourly

commit f0a7ab2946a6208f3fc3bb84f61c23525365ecdb
Author: System administrator <root@nixpi.home.arpa>
Date:   Tue Nov 22 19:17:32 2022 -0700

    Initial commit