-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add swap module #19
Draft
brianmcgee
wants to merge
1
commit into
main
Choose a base branch
from
feat/swap
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configures `swapDevices` based on the active swap partitions when the report was captured. Intended to match the behaviour of `nixos-generate-config` https://github.com/NixOS/nixpkgs/blob/dac9cdf8c930c0af98a63cbfe8005546ba0125fb/nixos/modules/installer/tools/nixos-generate-config.pl#L335-L357 Signed-off-by: Brian McGee <[email protected]>
brianmcgee
added a commit
that referenced
this pull request
Feb 4, 2025
Provides a `debug` namespace within `config.facter` which can be used to display a diff between the system closure with facter enabled, and without. The diffs are in the form of `nvd` or `nix-diff` output e.g. higher level summary versus detailed breakdown. Usage: - `nix run .#nixosConfigurations.basic.config.facter.debug.nvd` - `nix run .#nixosConfigurations.basic.config.facter.debug.nix-diff` Examples: ``` ❯ nix run .#nixosConfigurations.basic.config.facter.debug.nvd <<< /nix/store/fqbia5p8hfnyzxipfjmzxn8v3b69mjvs-nixos-system-nixos-24.11.20240831.12228ff >>> /nix/store/ijkh9sq03y72pfrjvncrsrhwh7g6k8q0-nixos-system-nixos-24.11.20240831.12228ff Added packages: [A.] #1 X-Reload-Triggers-systemd-networkd <none> [A.] #2 X-Restart-Triggers-systemd-networkd <none> [A.] #3 X-Restart-Triggers-systemd-resolved <none> [A.] #4 etc-systemd-networkd.conf <none> [A.] #5 etc-systemd-resolved.conf <none> [A.] #6 graphics-driver.conf <none> [A.] #7 graphics-drivers <none> [A.] #8 hwdata 0.385 [A.] #9 libXfixes 6.0.1 [A.] #10 libXxf86vm 1.1.5 [A.] #11 libdrm 2.4.122 [A.] #12 libpciaccess 0.18.1 [A.] #13 libxshmfence 1.3.2 [A.] #14 llvm 18.1.8-lib [A.] #15 lm-sensors 3.6.0 [A.] #16 mesa 24.2.1, 24.2.1-drivers [A.] #17 unit 99-ethernet-default-dhcp.network, 99-wireless-client-dhcp.network [A.] #18 unit-systemd-network-wait-online-.service <none> [A.] #19 unit-systemd-networkd-wait-online.service <none> [A.] #20 unit-systemd-networkd.service <none> [A.] #21 unit-systemd-networkd.socket <none> [A.] #22 unit-systemd-resolved.service <none> [A.] #23 vulkan-loader 1.3.283.0 [A.] #24 wayland 1.23.0 [A.] #25 xcb-util-keysyms 0.4.1 Removed packages: [R.] #1 X-Restart-Triggers-resolvconf <none> [R-] #2 dhcpcd 10.0.6 [R.] #3 dhcpcd.conf <none> [R-] #4 openresolv 3.13.2 [R.] #5 unit-dhcpcd.service <none> [R.] #6 unit-network-setup.service <none> [R.] #7 unit-resolvconf.service <none> [R.] #8 unit-script-network-setup-start <none> Closure size: 562 -> 581 (55 paths added, 36 paths removed, delta +19, disk usage +700.6MiB). ``` ``` ❯ nix run .#nixosConfigurations.basic.config.facter.debug.nix-diff - /nix/store/fqbia5p8hfnyzxipfjmzxn8v3b69mjvs-nixos-system-nixos-24.11.20240831.12228ff:{out} + /nix/store/ijkh9sq03y72pfrjvncrsrhwh7g6k8q0-nixos-system-nixos-24.11.20240831.12228ff:{out} • The input derivation named `boot.json` differs - /nix/store/zcmdy29f5di6rrfkkld3x773q1d7c1bv-boot.json.drv:{out} + /nix/store/j0wxsmw6fxgzd59pdcljkpq430jbk8jn-boot.json.drv:{out} • The input derivation named `initrd-linux-6.6.48` differs - /nix/store/3z3jgifv3rj5wrh4cx23gzc9hlrwrxwj-initrd-linux-6.6.48.drv:{out} + /nix/store/ds7pcp97k33p93z460b5vzrii02jjkcf-initrd-linux-6.6.48.drv:{out} • The input derivation named `initrd-nixos.conf` differs - /nix/store/y458hw08d5hv2bcf295fv9wvbsfvprrq-initrd-nixos.conf.drv:{out} + /nix/store/989v278ws16mnvlx6fwsa925vgx9a0ia-initrd-nixos.conf.drv:{out} • The environments do not match: text='' virtio_balloon virtio_console virtio_rng virtio_gpu bochs dm_mod '' • The input derivation named `linux-6.6.48-modules-shrunk` differs - /nix/store/dk2xshi6hr85wjyia60nizahl2rq31sz-linux-6.6.48-modules-shrunk.drv:{out} + /nix/store/xxk67p9wy7hxq33gd1mfz5dqcsm2mhsr-linux-6.6.48-modules-shrunk.drv:{out} • The environments do not match: rootModules='' virtio_net virtio_pci virtio_mmio virtio_blk 9p 9pnet_virtio uhci_hcd ata_piix floppy virtio_blk virtio_pci ext2 ext4 autofs tpm-tis tpm-crb efivarfs ahci sata_nv sata_via sata_sis sata_uli ata_piix pata_marvell nvme sd_mod sr_mod mmc_block uhci_hcd ehci_hcd ehci_pci ohci_hcd ohci_pci xhci_hcd xhci_pci usbhid hid_generic hid_lenovo hid_apple hid_roccat hid_logitech_hidpp hid_logitech_dj hid_microsoft hid_cherry hid_corsair pcips2 atkbd i8042 rtc_cmos virtio_balloon virtio_console virtio_rng virtio_gpu bochs dm_mod '' • Skipping environment comparison • Skipping environment comparison ... ... ... ```
brianmcgee
added a commit
that referenced
this pull request
Feb 4, 2025
Provides a `debug` namespace within `config.facter` which can be used to display a diff between the system closure with facter enabled, and without. The diffs are in the form of `nvd` or `nix-diff` output e.g. higher level summary versus detailed breakdown. Usage: - `nix run .#nixosConfigurations.basic.config.facter.debug.nvd` - `nix run .#nixosConfigurations.basic.config.facter.debug.nix-diff` Examples: ``` ❯ nix run .#nixosConfigurations.basic.config.facter.debug.nvd <<< /nix/store/fqbia5p8hfnyzxipfjmzxn8v3b69mjvs-nixos-system-nixos-24.11.20240831.12228ff >>> /nix/store/ijkh9sq03y72pfrjvncrsrhwh7g6k8q0-nixos-system-nixos-24.11.20240831.12228ff Added packages: [A.] #1 X-Reload-Triggers-systemd-networkd <none> [A.] #2 X-Restart-Triggers-systemd-networkd <none> [A.] #3 X-Restart-Triggers-systemd-resolved <none> [A.] #4 etc-systemd-networkd.conf <none> [A.] #5 etc-systemd-resolved.conf <none> [A.] #6 graphics-driver.conf <none> [A.] #7 graphics-drivers <none> [A.] #8 hwdata 0.385 [A.] #9 libXfixes 6.0.1 [A.] #10 libXxf86vm 1.1.5 [A.] #11 libdrm 2.4.122 [A.] #12 libpciaccess 0.18.1 [A.] #13 libxshmfence 1.3.2 [A.] #14 llvm 18.1.8-lib [A.] #15 lm-sensors 3.6.0 [A.] #16 mesa 24.2.1, 24.2.1-drivers [A.] #17 unit 99-ethernet-default-dhcp.network, 99-wireless-client-dhcp.network [A.] #18 unit-systemd-network-wait-online-.service <none> [A.] #19 unit-systemd-networkd-wait-online.service <none> [A.] #20 unit-systemd-networkd.service <none> [A.] #21 unit-systemd-networkd.socket <none> [A.] #22 unit-systemd-resolved.service <none> [A.] #23 vulkan-loader 1.3.283.0 [A.] #24 wayland 1.23.0 [A.] #25 xcb-util-keysyms 0.4.1 Removed packages: [R.] #1 X-Restart-Triggers-resolvconf <none> [R-] #2 dhcpcd 10.0.6 [R.] #3 dhcpcd.conf <none> [R-] #4 openresolv 3.13.2 [R.] #5 unit-dhcpcd.service <none> [R.] #6 unit-network-setup.service <none> [R.] #7 unit-resolvconf.service <none> [R.] #8 unit-script-network-setup-start <none> Closure size: 562 -> 581 (55 paths added, 36 paths removed, delta +19, disk usage +700.6MiB). ``` ``` ❯ nix run .#nixosConfigurations.basic.config.facter.debug.nix-diff - /nix/store/fqbia5p8hfnyzxipfjmzxn8v3b69mjvs-nixos-system-nixos-24.11.20240831.12228ff:{out} + /nix/store/ijkh9sq03y72pfrjvncrsrhwh7g6k8q0-nixos-system-nixos-24.11.20240831.12228ff:{out} • The input derivation named `boot.json` differs - /nix/store/zcmdy29f5di6rrfkkld3x773q1d7c1bv-boot.json.drv:{out} + /nix/store/j0wxsmw6fxgzd59pdcljkpq430jbk8jn-boot.json.drv:{out} • The input derivation named `initrd-linux-6.6.48` differs - /nix/store/3z3jgifv3rj5wrh4cx23gzc9hlrwrxwj-initrd-linux-6.6.48.drv:{out} + /nix/store/ds7pcp97k33p93z460b5vzrii02jjkcf-initrd-linux-6.6.48.drv:{out} • The input derivation named `initrd-nixos.conf` differs - /nix/store/y458hw08d5hv2bcf295fv9wvbsfvprrq-initrd-nixos.conf.drv:{out} + /nix/store/989v278ws16mnvlx6fwsa925vgx9a0ia-initrd-nixos.conf.drv:{out} • The environments do not match: text='' virtio_balloon virtio_console virtio_rng virtio_gpu bochs dm_mod '' • The input derivation named `linux-6.6.48-modules-shrunk` differs - /nix/store/dk2xshi6hr85wjyia60nizahl2rq31sz-linux-6.6.48-modules-shrunk.drv:{out} + /nix/store/xxk67p9wy7hxq33gd1mfz5dqcsm2mhsr-linux-6.6.48-modules-shrunk.drv:{out} • The environments do not match: rootModules='' virtio_net virtio_pci virtio_mmio virtio_blk 9p 9pnet_virtio uhci_hcd ata_piix floppy virtio_blk virtio_pci ext2 ext4 autofs tpm-tis tpm-crb efivarfs ahci sata_nv sata_via sata_sis sata_uli ata_piix pata_marvell nvme sd_mod sr_mod mmc_block uhci_hcd ehci_hcd ehci_pci ohci_hcd ohci_pci xhci_hcd xhci_pci usbhid hid_generic hid_lenovo hid_apple hid_roccat hid_logitech_hidpp hid_logitech_dj hid_microsoft hid_cherry hid_corsair pcips2 atkbd i8042 rtc_cmos virtio_balloon virtio_console virtio_rng virtio_gpu bochs dm_mod '' • Skipping environment comparison • Skipping environment comparison ... ... ... ``` Co-authored-by: magicrb <[email protected]>
brianmcgee
added a commit
that referenced
this pull request
Feb 4, 2025
Provides a `debug` namespace within `config.facter` which can be used to display a diff between the system closure with facter enabled, and without. The diffs are in the form of `nvd` or `nix-diff` output e.g. higher level summary versus detailed breakdown. Usage: - `nix run .#nixosConfigurations.basic.config.facter.debug.nvd` - `nix run .#nixosConfigurations.basic.config.facter.debug.nix-diff` Examples: ``` ❯ nix run .#nixosConfigurations.basic.config.facter.debug.nvd <<< /nix/store/fqbia5p8hfnyzxipfjmzxn8v3b69mjvs-nixos-system-nixos-24.11.20240831.12228ff >>> /nix/store/ijkh9sq03y72pfrjvncrsrhwh7g6k8q0-nixos-system-nixos-24.11.20240831.12228ff Added packages: [A.] #1 X-Reload-Triggers-systemd-networkd <none> [A.] #2 X-Restart-Triggers-systemd-networkd <none> [A.] #3 X-Restart-Triggers-systemd-resolved <none> [A.] #4 etc-systemd-networkd.conf <none> [A.] #5 etc-systemd-resolved.conf <none> [A.] #6 graphics-driver.conf <none> [A.] #7 graphics-drivers <none> [A.] #8 hwdata 0.385 [A.] #9 libXfixes 6.0.1 [A.] #10 libXxf86vm 1.1.5 [A.] #11 libdrm 2.4.122 [A.] #12 libpciaccess 0.18.1 [A.] #13 libxshmfence 1.3.2 [A.] #14 llvm 18.1.8-lib [A.] #15 lm-sensors 3.6.0 [A.] #16 mesa 24.2.1, 24.2.1-drivers [A.] #17 unit 99-ethernet-default-dhcp.network, 99-wireless-client-dhcp.network [A.] #18 unit-systemd-network-wait-online-.service <none> [A.] #19 unit-systemd-networkd-wait-online.service <none> [A.] #20 unit-systemd-networkd.service <none> [A.] #21 unit-systemd-networkd.socket <none> [A.] #22 unit-systemd-resolved.service <none> [A.] #23 vulkan-loader 1.3.283.0 [A.] #24 wayland 1.23.0 [A.] #25 xcb-util-keysyms 0.4.1 Removed packages: [R.] #1 X-Restart-Triggers-resolvconf <none> [R-] #2 dhcpcd 10.0.6 [R.] #3 dhcpcd.conf <none> [R-] #4 openresolv 3.13.2 [R.] #5 unit-dhcpcd.service <none> [R.] #6 unit-network-setup.service <none> [R.] #7 unit-resolvconf.service <none> [R.] #8 unit-script-network-setup-start <none> Closure size: 562 -> 581 (55 paths added, 36 paths removed, delta +19, disk usage +700.6MiB). ``` ``` ❯ nix run .#nixosConfigurations.basic.config.facter.debug.nix-diff - /nix/store/fqbia5p8hfnyzxipfjmzxn8v3b69mjvs-nixos-system-nixos-24.11.20240831.12228ff:{out} + /nix/store/ijkh9sq03y72pfrjvncrsrhwh7g6k8q0-nixos-system-nixos-24.11.20240831.12228ff:{out} • The input derivation named `boot.json` differs - /nix/store/zcmdy29f5di6rrfkkld3x773q1d7c1bv-boot.json.drv:{out} + /nix/store/j0wxsmw6fxgzd59pdcljkpq430jbk8jn-boot.json.drv:{out} • The input derivation named `initrd-linux-6.6.48` differs - /nix/store/3z3jgifv3rj5wrh4cx23gzc9hlrwrxwj-initrd-linux-6.6.48.drv:{out} + /nix/store/ds7pcp97k33p93z460b5vzrii02jjkcf-initrd-linux-6.6.48.drv:{out} • The input derivation named `initrd-nixos.conf` differs - /nix/store/y458hw08d5hv2bcf295fv9wvbsfvprrq-initrd-nixos.conf.drv:{out} + /nix/store/989v278ws16mnvlx6fwsa925vgx9a0ia-initrd-nixos.conf.drv:{out} • The environments do not match: text='' virtio_balloon virtio_console virtio_rng virtio_gpu bochs dm_mod '' • The input derivation named `linux-6.6.48-modules-shrunk` differs - /nix/store/dk2xshi6hr85wjyia60nizahl2rq31sz-linux-6.6.48-modules-shrunk.drv:{out} + /nix/store/xxk67p9wy7hxq33gd1mfz5dqcsm2mhsr-linux-6.6.48-modules-shrunk.drv:{out} • The environments do not match: rootModules='' virtio_net virtio_pci virtio_mmio virtio_blk 9p 9pnet_virtio uhci_hcd ata_piix floppy virtio_blk virtio_pci ext2 ext4 autofs tpm-tis tpm-crb efivarfs ahci sata_nv sata_via sata_sis sata_uli ata_piix pata_marvell nvme sd_mod sr_mod mmc_block uhci_hcd ehci_hcd ehci_pci ohci_hcd ohci_pci xhci_hcd xhci_pci usbhid hid_generic hid_lenovo hid_apple hid_roccat hid_logitech_hidpp hid_logitech_dj hid_microsoft hid_cherry hid_corsair pcips2 atkbd i8042 rtc_cmos virtio_balloon virtio_console virtio_rng virtio_gpu bochs dm_mod '' • Skipping environment comparison • Skipping environment comparison ... ... ... ``` Co-authored-by: magicrb <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Configures
swapDevices
based on the active swap partitions when the report was captured.Intended to match the behaviour of
nixos-generate-config
https://github.com/NixOS/nixpkgs/blob/dac9cdf8c930c0af98a63cbfe8005546ba0125fb/nixos/modules/installer/tools/nixos-generate-config.pl#L335-L357