nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
6.1k stars 1.65k forks source link

bug: error: fcitx-engines is deprecated, please use fcitx5 instead. #5382

Open drzln opened 3 weeks ago

drzln commented 3 weeks ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

this is my home configuration

{ outputs, pkgs, ... }:
{
  home.stateVersion = "22.11";
  home.username = "luis";
  home.homeDirectory = "/home/luis";
  # imports = [
  #   outputs.homeManagerModules.blackmatter
  #   ../../luis/common
  #   ../common
  # ];
  # nixpkgs.overlays = [
  #   (self: super: {
  #     fcitx-engines = self.fcitx5;
  #   })
  # ];
  # blackmatter.programs.nvim.enable = true;
  # blackmatter.shell.enable = true;
  # blackmatter.desktop.enable = false;
  # blackmatter.desktop.alacritty.config.enable = true;
  # nixpkgs.config.allowUnfree = true;
  # nixpkgs.config.allowBroken = true;
  # nixpkgs.config.permittedInsecurePackages = [
  #   "electron-25.9.0"
  # ];
}

luis@ego:~/nix$ home-manager --version /nix/store/yz86ajzzp2h59ci6h0wxy18b10a8z0qr-bash-5.2p26/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) 24.05-pre luis@ego:~/nix$

luis@ego:~/nix$ nix --version nix (Nix) 2.18.2 luis@ego:~/nix$

Maintainer CC

No response

System information

luis@ego:~/nix$ nix-shell -p nix-info --run "nix-info -m"
querying info about '/nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info' on 'https://cache.nixos.org'...
downloading 'https://cache.nixos.org/irq6dysd1b13n6gv6a5j7mi39p4vjmhh.narinfo'...
this derivation will be built:
  /nix/store/03snsyci6iysp8js732xl1fdsnmmd3az-nix-info.drv
building '/nix/store/03snsyci6iysp8js732xl1fdsnmmd3az-nix-info.drv'...
Running phase: unpackPhase
Running phase: unpackPhase
unpacking source archive /nix/store/j4lk1cij380x7qn4phv82pz6acn2i12r-info.sh
unpacking source archive /nix/store/j4lk1cij380x7qn4phv82pz6acn2i12r-info.sh
source root is nix-info
source root is nix-info
Running phase: patchPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
Running phase: configurePhase
no configure script, doing nothing
no configure script, doing nothing
Running phase: buildPhase
Running phase: buildPhase
Running phase: installPhase
Running phase: installPhase
Running phase: fixupPhase
Running phase: fixupPhase
shrinking RPATHs of ELF executables and libraries in /nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info
shrinking RPATHs of ELF executables and libraries in /nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info
checking for references to /build/ in /nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info...
checking for references to /build/ in /nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info...
patching script interpreter paths in /nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info
patching script interpreter paths in /nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info
/nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info/bin/nix-info: interpreter directive changed from "#!/bin/bash" to "/nix/store/yz86ajzzp2h59ci6h0wxy18b10a8z0qr-bash-5.2p26/bin/bash"
/nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info/bin/nix-info: interpreter directive changed from "#!/bin/bash" to "/nix/store/yz86ajzzp2h59ci6h0wxy18b10a8z0qr-bash-5.2p26/bin/bash"
stripping (with command strip and flags -S -p) in  /nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info/bin
stripping (with command strip and flags -S -p) in  /nix/store/irq6dysd1b13n6gv6a5j7mi39p4vjmhh-nix-info/bin
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/nix/store/yz86ajzzp2h59ci6h0wxy18b10a8z0qr-bash-5.2p26/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.0-105-generic, Ubuntu, 22.04.4 LTS (Jammy Jellyfish), nobuild`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(luis): `"home-manager, nixpkgs-24.05pre621355.d32560238207"`
 - channels(root): `"nixpkgs-24.05pre621355.d32560238207"`
 - nixpkgs: `/home/luis/.nix-defexpr/channels/nixpkgs`

luis@ego:~/nix$
drzln commented 3 weeks ago

This is the build command I'm using

home-manager switch --flake ".#luis@ego" --experimental-features 'nix-command flakes' --show-trace

It seems that a configuration that is relatively empty with these versions produces this


  description = "nix configurations";

  #############################################################################
  # inputs
  #############################################################################

  inputs = {
    dream2nix.url = github:nix-community/dream2nix?branch=main;
    nixpkgs.url = github:NixOS/nixpkgs?branch=release-24.05;
    home-manager.url = github:drzln/home-manager?branch=release-24.05;
    flake-utils.url = github:numtide/flake-utils?branch=master;
    nix-darwin.url = github:LnL7/nix-darwin?branch=master;
    pythonix.url = github:Mic92/pythonix?branch=master;
    sops-nix.url = github:Mic92/sops-nix;
    nix-funcs.url = github:t3rro/nix-funcs;
    bundix = {
      url = github:nix-community/bundix?branch=master;
      flake = false;
    };
    hydra.url = github:NixOS/hydra?branch=master;
    arion.url = github:hercules-ci/arion?branch=master;
    stitches.url = github:drzln/stitches?ref=main;
    nixt = {
      url = github:nix-community/nixt?branch=master;
      flake = false;
    };
    nur.url = github:nix-community/nur;
  };

  # end inputs

  #############################################################################
  # outputs
  #############################################################################

  outputs =
    { home-manager
    , flake-utils
    , nix-darwin
    , dream2nix
    , nix-funcs
    , pythonix
    , sops-nix
    , stitches
    , nixpkgs
    , bundix
    , hydra
    , arion
    , nixt
    , self
    , nur
    }@inputs:
    let
      systems =
        let
          #####################################################################
          # imports
          #####################################################################
          # import some stuff and set values

          inherit (self) outputs;
          funcs = import ./funcs;
          stdenv = pkgs.stdenv;
          home.modules = import ./modules/home-manager;
          node.modules = import ./modules/nixos;
          specialArgs = { inherit inputs outputs stdenv; };
          extraSpecialArgs = specialArgs // { inherit pkgs; };
          localPackages = import ./pkgs extraSpecialArgs;

          # end imports

          #####################################################################
          # func helpers
          #####################################################################

          # make a home configuration structure according to some rules
          mkHomeConfiguration = name: node: pkgs: extraSpecialArgs:
            home-manager.lib.homeManagerConfiguration {
              inherit extraSpecialArgs pkgs;
              modules = [ users/${name}/${node}/home.nix ];
            };

          # end func helpers
          system = "x86_64-linux";

          #####################################################################
          # configure nixpkgs
          #####################################################################

          # This instantiates nixpkgs for each system listed
          # Allowing you to configure it (e.g. allowUnfree)
          # Our configurations will use these instances
          pkgs = legacyPackages.${system};
          legacyPackages = nixpkgs.lib.genAttrs [
            "x86_64-linux"
            "x86_64-darwin"
            "aarch64-darwin"
          ]
            (system:
              import inputs.nixpkgs {
                inherit system;
                # NOTE: Using `nixpkgs.config` in your NixOS config won't work
                # Instead, you should set nixpkgs configs here
                # (https://nixos.org/manual/nixpkgs/stable/#idm140737322551056)

                config.allowUnfree = true;
              }
            );

          # end configure nixpkgs

          #####################################################################
          # home configurations
          # these are exposed to outputs
          #####################################################################

          home.configurations = {
            ###################################################################
            # ubuntu machines
            ###################################################################

            "luis@ego" =
              mkHomeConfiguration "luis" "ego" pkgs extraSpecialArgs;

            ###################################################################
            # PGR AML2
            # my personal amazon-linux 2 box for PGR
            ###################################################################

            # lucas pereira popos support

            "LILU" =
              mkHomeConfiguration "lucas" "LILU" pkgs extraSpecialArgs;

            "tupa" =
              mkHomeConfiguration "root" "tupa" pkgs extraSpecialArgs;

            "tupa-ssm-user" =
              mkHomeConfiguration "ssm-user" "tupa" pkgs extraSpecialArgs;

            # end PGR AML2

            # amazon-linux 2 box for MBG
            "burgundy" =
              mkHomeConfiguration "root" "burgundy" pkgs extraSpecialArgs;

            "luis@rai" =
              mkHomeConfiguration "luis" "rai" pkgs extraSpecialArgs;

            "ldesiqueira@rai" =
              mkHomeConfiguration "ldesiqueira" "rai" pkgs extraSpecialArgs;

            "luis@plo" =
              mkHomeConfiguration "luis" "plo" pkgs extraSpecialArgs;

            "t3rro@rai" =
              mkHomeConfiguration "t3rro" "rai" pkgs extraSpecialArgs;
            "t3rro@plo" =
              mkHomeConfiguration "t3rro" "plo" pkgs extraSpecialArgs;
          };

          # end home configurations

          #####################################################################
          # nixos configurations
          #####################################################################

          node.configurations = rec {

            # coding desktop
            rai = nixpkgs.lib.nixosSystem {
              inherit system specialArgs;
              modules = [
                nodes/rai
              ];
            };

            # gaming desktop
            plo = nixpkgs.lib.nixosSystem {
              inherit system specialArgs;
              modules = [ nodes/plo ];
            };
          };

          # end nixos configurations

          #####################################################################
          # nix-darwin configurations
          #####################################################################

          darwin.configurations = {
            # personal macos laptop
            ani = nix-darwin.lib.darwinSystem {
              specialArgs = {
                inherit outputs;
              };
              system = "x86_64-darwin";
              modules = [
                home-manager.darwinModules.home-manager
                ./nodes/ani
              ];
            };

            # TODO: module to add stitches, consider
            # TODO: making more concise
            cidStitchesMod = { ... }: {
              environment.systemPackages = [
                stitches.packages.aarch64-darwin.default
              ];
            };

            # work macos laptop
            cid = nix-darwin.lib.darwinSystem {
              specialArgs = {
                inherit outputs;
              };
              system = "x86_64-darwin";
              modules = [
                home-manager.darwinModules.home-manager
                ./nodes/cid
              ];
            };
          };

          # end nix-darwin configurations
        in
        {
          # attach to outputs so you can access it in nixos module
          # and pass to home-manager modules called by nixos modules
          inherit specialArgs extraSpecialArgs funcs;

          #####################################################################
          # packages
          # offered by outputs
          # access with: outputs.packages.${system}.${pname}
          #####################################################################

          packages =
            {
              x86_64-darwin =
                flake-utils.lib.flattenTree
                  localPackages;
              x86_64-linux =
                flake-utils.lib.flattenTree
                  localPackages;
              aarch64-darwin =
                flake-utils.lib.flattenTree
                  localPackages;
            };

          # end packages

          #####################################################################
          # expose to outputs
          # expose these things to nix flake show
          # also to anything that uses this flake
          # also to internal modules via outputs
          #####################################################################

          homeManagerModules = home.modules;
          homeConfigurations = home.configurations;
          nixosModules = node.modules;
          nixosConfigurations = node.configurations;
          darwinConfigurations = darwin.configurations;

          # end expose to outputs
        };
    in
    systems;
  # end outputs
}

This is my flake setup where I specify versions that match 23.11 for both nix and home-manager.