Skip Navigation
Jump
Flakes use in home manager help required
  • Thank you for help. so now I have flake.nix and home.nix in ~/.config/home-manager. flake.nix looks like

    `{ description = "Plasma Manager Example";

    inputs = { # Specify the source of Home Manager and Nixpkgs home-manager.url = "github:nix-community/home-manager"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; home-manager.inputs.nixpkgs.follows = "nixpkgs";

    plasma-manager. url = "github:pjones/plasma-manager";
    plasma-manager. inputs. nixpkgs. follows = "nixpkgs";
    plasma-manager. inputs. home-manager. follows = "home-manager";
    

    };

    outputs = { home-manager , plasma-manager , nixpkgs , ... }: let system = "x86_64-linux"; username = "naresh"; in { homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system}; # extraModules = [ # plasma-manager.homeManagerModules.plasma-manager # ];

        modules = [
          # ./home.nix
          # {
          #   home = {
          #     inherit username;
          #     homeDirectory = "/home/${username}";
          #     # Update the state version as needed.
          #     stateVersion = "23.05";
          #   };
    
    
          # },
          plasma-manager.homeManagerModules.plasma-manager
    
        ];
    
    
      };
      devShells.${system}.default =
        let pkgs = import nixpkgs { inherit system; }; in
        pkgs.mkShell {
          buildInputs = [
            home-manager.packages.${system}.home-manager
          ];
        };
    };
    

    } `

    and home.nix looks like

    { config, pkgs, plasma-manager, ... }:
    
    {
      # Home Manager needs a bit of information about you and the paths it should
      # manage.
      home.username = "naresh";
      home.homeDirectory = "/home/naresh";
    
      # This value determines the Home Manager release that your configuration is
      # compatible with. This helps avoid breakage when a new Home Manager release
      # introduces backwards incompatible changes.
      #
      # You should not change this value, even if you update Home Manager. If you do
      # want to update the value, then make sure to first check the Home Manager
      # release notes.
      home.stateVersion = "23.05"; # Please read the comment before changing.
    
    
      imports = [ plasma-manager.homeManagerModules.plasma-manager ];
    
      # The home.packages option allows you to install Nix packages into your
      # environment.
      home.packages = with pkgs; [
        alacritty
        screenfetch
        konsole
        rnix-lsp
        # # Adds the 'hello' command to your environment. It prints a friendly
        # # "Hello, world!" when run.
        # pkgs.hello
    
        # # It is sometimes useful to fine-tune packages, for example, by applying
        # # overrides. You can do that directly here, just don't forget the
        # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
        # # fonts?
        # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
    
        # # You can also create simple shell scripts directly inside your
        # # configuration. For example, this adds a command 'my-hello' to your
        # # environment:
        # (pkgs.writeShellScriptBin "my-hello" ''
        #   echo "Hello, ${config.home.username}!"
        # '')
      ]; #) ++ ([(builtins.getFlake "github:pjones/plasma-manager")]);
    
      # Home Manager is pretty good at managing dotfiles. The primary way to manage
      # plain files is through 'home.file'.
      home.file = {
        # # Building this configuration will create a copy of 'dotfiles/screenrc' in
        # # the Nix store. Activating the configuration will then make '~/.screenrc' a
        # # symlink to the Nix store copy.
        # ".screenrc".source = dotfiles/screenrc;
    
        # # You can also set the file content immediately.
        # ".gradle/gradle.properties".text = ''
        #   org.gradle.console=verbose
        #   org.gradle.daemon.idletimeout=3600000
        # '';
      };
    
      # You can also manage environment variables but you will have to manually
      # source
      #
      #  ~/.nix-profile/etc/profile.d/hm-session-vars.sh
      #
      # or
      #
      #  /etc/profiles/per-user/naresh/etc/profile.d/hm-session-vars.sh
      #
      # if you don't want to manage your shell through Home Manager.
      home.sessionVariables = {
        # EDITOR = "emacs";
      };
    
      # Let Home Manager install and manage itself.
      programs.home-manager.enable = true;
    
      programs.plasma = {
        enable = true;
    
        # Some high-level settings:
        workspace.clickItemTo = "select";
    
        hotkeys.commands."Launch Konsole" = {
          key = "Meta+Alt+K";
          command = "konsole";
        };
    
        # Some mid-level settings:
        shortcuts = {
          ksmserver = {
            "Lock Session" = [ "Screensaver" "Meta+Ctrl+Alt+L" ];
          };
    
          kwin = {
            "Expose" = "Meta+,";
            "Switch Window Down" = "Meta+J";
            "Switch Window Left" = "Meta+H";
            "Switch Window Right" = "Meta+L";
            "Switch Window Up" = "Meta+K";
          };
        };
    
        # A low-level setting:
        configFile."baloofilerc"."Basic Settings"."Indexing-Enabled" = false;
      };
    }
    
    
    
    

    and when I run home-manager switch --flake ~/.config/home-manager/ It gives me

    `error: … while evaluating a branch condition

         at /nix/store/1ryprai4bllkrna60cmcygxc4qyn79s1-source/lib/lists.nix:57:9:
    
           56|       fold' = n:
           57|         if n == len
             |         ^
           58|         then nul
    
       … while calling the 'length' builtin
    
         at /nix/store/1ryprai4bllkrna60cmcygxc4qyn79s1-source/lib/lists.nix:55:13:
    
           54|     let
           55|       len = length list;
             |             ^
           56|       fold' = n:
    
       (stack trace truncated; use '--show-trace' to show the full trace)
    
       error: The option `home.stateVersion' is used but not defined.
    

    `

    Now don't know what to do. I got your latter advice regarding diff but first I need to make this work. I am on unstable nixos version. and

    home-manager --version gives 23.11-pre

    nixos-version gives 23.11pre546599.e44462d6021b (Tapir)

    ___``___

    1
  • I want to use Plasma-manager in my system. I have enabled flakes in configurations. Now what to do to use it. The output generated by tool rc2nix can be copied through terminal but when i put that in home.nix , it says that plasma is not available which is true but then how do I use this tool. flake file.

    3

    I have a particular folder at particular location in android which i want to keep permanently synchronised (bidirectional) to nextcloud folder. How can i do that, I dont want to change the location of local folder?

    2

    There is an app called FocusReader which does exactly above using user provided chatgpt Api key. I dont want to use api rather authentication in browser since api costs. If app is foss its better. If no such app exist. I may learn app development and integrate this feature in Flym. If anyone has any alternative in mind, please suggest or if you have android app development experience, suggest after looking at the code at github how can i go about the development myself.

    3