Skip to content

[BUG] Nixos installation via flakes + home-manager is broken #3204

Description

@Sipepper

Submission checklist

  • I have searched existing issues and confirmed this is not a duplicate.
  • I am using the latest available version of Noctalia.

Bug description

After sudo nix flake update the programs.noctalia-shell.enable = true stopped working, i.e. The option home-manager.users.mlys.programs.noctalia-shell does not exist.

Steps to reproduce

I have the following config structure:
Noctalia in the flake inputs

    noctalia = {
      url = "github:noctalia-dev/noctalia-shell";
      inputs.nixpkgs.follows = "nixpkgs";
    };

Separate noctalia.nix file

{ pkgs, inputs, ... }:
{
  imports = [
    inputs.noctalia.homeModules.default
  ];

  noctalia-shell.enable = true;
}

Imported into home.nix and

      nixosConfigurations = {
        desktop = nixpkgs.lib.nixosSystem {
          specialArgs = { inherit inputs; };
          modules = [
            ./configuration.nix
            ./hardware-desktop.nix
            {
              system.stateVersion = "24.05";
              boot.loader.grub.useOSProber = true;
            }
            determinate.nixosModules.default
            home-manager.nixosModules.default
            {
              home-manager.extraSpecialArgs = { inherit inputs; };
              home-manager.users."mlys" = {
                imports = [ ./home.nix ];
                programs.vscode.enable = true;
              };
            }
          ];
        };

Full config can be found at https://codeberg.org/mlys/mlys_flake

Expected behavior

NixOS rebuilds successfully.

Actual behavior

System can't rebuild itself.

Logs / error output

error:
       … while calling the 'head' builtin
         at «github:nixos/nixpkgs/e73de5b»/lib/attrsets.nix:1719:13:
         1718|           if length values == 1 || pred here (elemAt values 1) (head values) then
         1719|             head values
             |             ^
         1720|           else

       … while evaluating the attribute 'value'
         at «github:nixos/nixpkgs/e73de5b»/lib/modules.nix:1147:7:
         1146|     // {
         1147|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1148|       inherit (res.defsFinal') highestPrio;

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

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

       … while evaluating the option `assertions':

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

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

       error: The option `home-manager.users.mlys.noctalia-shell' does not exist. Definition values:
       - In `/nix/store/il45brczg3c6a0faqikc6laqkg2iwrqn-source/noctalia.nix':
           {
             enable = true;
           }

       Did you mean `home-manager.users.mlys.uninstall', `home-manager.users.mlys.fonts' or `home-manager.users.mlys.home-files'?
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '/home/mlys/Git/mlys_flake#nixosConfigurations."desktop".config.system.build.toplevel' --no-link' returned non-zero exit status 1.

Noctalia version

rev: "d19a6afcf044fc792d24b4c240539e147a585eff" obtained from flake.lock file

Compositor

Niri

Distribution

NixOS

Environment information

Nix installation via flakes and home-manager

  home.packages = [
    inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
    ...
  ]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions