Where are default programs defined?

I can list all installed binaries with this command:

[root@nixos:~]# for i in $(ls /run/current-system/sw/bin) ; do echo -n "$i "; done
[ addpart agetty arp arpd arping attr awk b2sum badblocks base32 base64 basename basenc bash bashbug bcache-super-show blkdiscard blkid blkzone blockdev bootctl bridge bunzip2 busctl bzcat bzcmp bzdiff bzegrep bzfgrep bzgrep bzip2 bzip2recover bzless bzmore cal capsh captoinfo cat catchsegv cfdisk chacl chage chattr chcon chcpu chfn chgpasswd chgrp chmem chmod choom chown chpasswd chroot chrt chsh cksum clear clockdiff cmp col colcrt colrm column comm command-not-found compile_et coredumpctl corelist coreutils cp cpan cpio csplit ctrlaltdel ctstat curl cut cvtsudoers date dbus-cleanup-sockets dbus-daemon dbus-launch dbus-monitor dbus-run-session dbus-send dbus-test-tool dbus-update-activation-environment dbus-uuidgen dd debugfs delpart df dhcpcd diff diff3 dir dircolors dirname dmesg dnsdomainname domainname dosfsck dosfslabel du dumpe2fs e2freefrag e2fsck e2image e2label e2mmpstatus e2scrub e2scrub_all e2undo e4crypt e4defrag echo egrep eject enc2xs encguess env expand expiry expr factor faillog fallocate false fatlabel fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan fc-validate fdformat fdisk fgrep filefrag fincore find findfs findmnt flock fmt fold free fsck fsck.cramfs fsck.ext2 fsck.ext3 fsck.ext4 fsck.fat fsck.minix fsck.msdos fsck.vfat fsfreeze fstrim fusermount fusermount3 gawk gencat genl getcap getconf getent getfacl getfattr getopt getpcaps gpasswd grep groupadd groupdel groupmems groupmod groups grpck grpconv grpunconv gunzip gzexe gzip h2ph h2xs halt head hexdump host hostid hostname hostnamectl hwclock i386 iconv iconvconfig id ifcfg ifconfig ifstat infotocap init install instmodsh ionice ip ipcmk ipcrm ipcs isosize join journalctl json_pp kexec kill last lastb lastlog ldattach ldconfig ldd less lessecho lesskey libnetcfg link linux32 linux64 ln lnstat locale localectl localedef locate logger login loginctl logname logoutd logsave look losetup ls lsattr lsblk lscpu lsipc lslocks lslogins lsmem lsns lzcat lzcmp lzdiff lzegrep lzfgrep lzgrep lzless lzma lzmadec lzmainfo lzmore machinectl make-bcache makedb mcookie md5sum mdadm mdmon mesg mk_cmds mkdir mkdosfs mke2fs mkfifo mkfs mkfs.bfs mkfs.cramfs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.fat mkfs.minix mkfs.msdos mkfs.vfat mkhomedir_helper mklost+found mknod mkswap mktemp more mount mount.fuse mount.fuse3 mountpoint mv namei nameif nano nc netstat networkctl newgidmap newgrp newuidmap newusers nice ninfod nisdomainname nix nix-build nix-channel nix-collect-garbage nix-copy-closure nix-daemon nix-env nix-hash nix-info nix-instantiate nixos-build-vms nixos-enter nixos-generate-config nixos-install nixos-option nixos-rebuild nixos-version nix-prefetch-url nix-shell nix-store nl nohup nologin nproc nscd nsenter nstat numfmt od pam_tally pam_tally2 pam_timestamp_check partx passwd paste patch pathchk pcprofiledump perl perl5.30.0 perlbug perldoc perlivp perlthanks pgrep piconv pidof ping pinky pivot_root pkaction pkcheck pk-example-frobnicate pkexec pkill pkttyagent pl2pm pldd plipconfig pmap pod2html pod2man pod2text pod2usage podchecker podselect portablectl poweroff pr printenv printf prlimit prove ps ptar ptardiff ptargrep ptx pwck pwconv pwd pwdx pwunconv rarp rarpd raw rdisc readlink readprofile realpath reboot rename renice reset resize2fs resizepart resolvconf resolvectl rev rfkill rm rmdir rnano route routef routel rpcgen rsync rtacct rtcwake rtmon rtpr rtstat runcon runlevel runuser scp script scriptreplay sdiff sed seq setarch setcap setfacl setfattr setsid setterm sfdisk sftp sg sh sha1sum sha224sum sha256sum sha384sum sha512sum shasum shred shuf shutdown slabtop slattach sleep sln sort sotruss splain split sprof ss ssh ssh-add ssh-agent ssh-copy-id sshd ssh-keygen ssh-keyscan stat stdbuf strace strace-graph strace-log-merge stty su sudo sudoedit sudoreplay sulogin sum swaplabel swapoff swapon switch_root sync sysctl systemctl systemd-analyze systemd-ask-password systemd-cat systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-escape systemd-hwdb systemd-id128 systemd-inhibit systemd-machine-id-setup systemd-mount systemd-notify systemd-nspawn systemd-path systemd-resolve systemd-run systemd-socket-activate systemd-stdio-bridge systemd-tmpfiles systemd-tty-ask-password-agent systemd-umount tabs tac tail tar taskset tc tee telinit test tftpd tic time timedatectl timeout tload top touch tput tr tracepath traceroute6 true truncate tset tsort tty tune2fs tzselect udevadm ul ulockmgr_server umount uname uname26 uncompress unexpand uniq unix_chkpwd unix_chkpwd.orig unix_update unlink unlzma unshare unxz updatedb update-mime-database uptime useradd userdel usermod users utmpdump uuidd uuidgen uuidparse vdir vigr vipw visudo vmcore-dmesg vmstat w wall watch wc wdctl whereis which who whoami wipefs write x86_64 xargs xsubpp xtrace xz xzcat xzcmp xzdec xzdiff xzegrep xzfgrep xzgrep xzless xzmore yes ypdomainname zcat zcmp zdiff zdump zegrep zfgrep zforce zgrep zic zipdetails zless zmore znew zramctl

where are they defined and how can i overwrite that?

1 Like

Is this what you’re looking for? https://github.com/NixOS/nixpkgs/blob/e0ece5aebe886d11c9e14f054e0af3cec3a60636/nixos/modules/profiles/base.nix

This module defines the software packages included in the “minimal” installation CD.

that don’t seem to be used after install

Looking at

and

it appears to just load all modules in module-list.nix so any module that adds to environment.systemPackages would be suspect. Mainly this one:

1 Like

thanks, that’s it.

second question is, how to overwrite it best, for example with empty list?