Skip to content

How to get fileSystems working? #1

@braindefender

Description

@braindefender

Hello. I've tried to rewrite my current NixOS flake config into nixverse, but currently stuck with the problem with fileSystems configuation.

In my nodes/helix/configuration.nix I have imports field that have an array of paths. It imports partitions.nix file with fileSystems definitions.

But when I try to nixos-rebuild switch --flake .#helix I get an error with fileSystems field:

Error
building the system configuration...
error:
       … while calling the 'head' builtin
         at /nix/store/x49v3cjfjgyn9sfd1m84gfkncvfa6kgn-source/lib/attrsets.nix:1534:13:
         1533|           if length values == 1 || pred here (elemAt values 1) (head values) then
         1534|             head values
             |             ^
         1535|           else

       … while evaluating the attribute 'value'
         at /nix/store/x49v3cjfjgyn9sfd1m84gfkncvfa6kgn-source/lib/modules.nix:1084:7:
         1083|     // {
         1084|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1085|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/x49v3cjfjgyn9sfd1m84gfkncvfa6kgn-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `assertions':

       … while evaluating definitions from `/nix/store/lhm2ldsgqxrffj3ak93nz5m8msa8z3y2-source/nixos/common.nix':

       … while evaluating the option `home-manager.users.brain.assertions':

       … while evaluating definitions from `/nix/store/lhm2ldsgqxrffj3ak93nz5m8msa8z3y2-source/modules/systemd.nix':

       … while evaluating the option `home-manager.users.brain.home.username':

       … while evaluating definitions from `/nix/store/lhm2ldsgqxrffj3ak93nz5m8msa8z3y2-source/nixos/common.nix':

       … while evaluating the option `users.users':

       … while evaluating definitions from `/nix/store/x49v3cjfjgyn9sfd1m84gfkncvfa6kgn-source/nixos/modules/services/networking/rpcbind.nix':

       … while evaluating the option `services.rpcbind.enable':

       … while evaluating definitions from `/nix/store/x49v3cjfjgyn9sfd1m84gfkncvfa6kgn-source/nixos/modules/tasks/filesystems/nfs.nix':

       … while evaluating the option `boot.supportedFilesystems':

       … while evaluating definitions from `/nix/store/x49v3cjfjgyn9sfd1m84gfkncvfa6kgn-source/nixos/modules/tasks/filesystems.nix':

       … while evaluating the option `fileSystems."/".device':

       … while evaluating definitions from `/nix/store/x49v3cjfjgyn9sfd1m84gfkncvfa6kgn-source/nixos/modules/tasks/filesystems.nix':

       … while evaluating the option `fileSystems."/".fsType':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: A definition for option `fileSystems."/".fsType' is not of type `string (with check: non-empty)'. Definition values:
       - In `/nix/store/x49v3cjfjgyn9sfd1m84gfkncvfa6kgn-source/flake.nix': null

I have seen your configs where you define partitions in meta-config of the node/group.

Can't I use non-meta partitions definition? And if I can, how?

Link to the repo with my attempt. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions