Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
1484 views
Which settings of XFCE can be currently configured on NixOS (during build, or afterwards via Home Manager etc.)?
Currently I am trying to create a basic configuration for my NixOS 23.05 installation with the XFCE Desktop and Window Manager. My approach is to use `home-manager` in standalone-mode to configure the XFCE Theme etc. on a per-user basis, which is inspired by a [gist by nat-418](https://gist.github.c...
Currently I am trying to create a basic configuration for my NixOS 23.05 installation with the XFCE Desktop and Window Manager. My approach is to use home-manager in standalone-mode to configure the XFCE Theme etc. on a per-user basis, which is inspired by a [gist by nat-418](https://gist.github.com/nat-418/1101881371c9a7b419ba5f944a7118b0) .
My configuration looks as follows:
#~/.config/home-manager/home.nix

{ config, pkgs, ... }:

{
  imports = [
    ./xfce/xfce-home.nix
  ];

  home.username = USERNAME;
  home.homeDirectory = PATH/TO/HOME/DIR;

  home.stateVersion = "23.05"; # Please read the comment before changing.

  home.packages = [
    # installing icon themes
    pkgs.matcha-gtk-theme
    pkgs.zuki-themes
    pkgs.elementary-xfce-icon-theme
    pkgs.xfce.xfce4-icon-theme
  ];

  programs.home-manager.enable = true;
}
#~/.config/home-manager/xfce/xfce-home.nix

{ config, pkgs, lib, ... }:

{
  gtk = {
    enable = true;
      iconTheme = {
      name = "xfce4-icon-theme";
      package = pkgs.xfce.xfce4-icon-theme;
    };
    theme = {
      name = "matcha-dark-sea";
      package = pkgs.matcha-gtk-theme;
    };
    gtk3.extraConfig = {
      Settings = ''
        gtk-application-prefer-dark-theme=1
      '';
    };
    gtk4.extraConfig = {
      Settings = ''
        gtk-application-prefer-dark-theme=1
      '';
    };
  };

  programs.gpg.enable = true;
  services.gpg-agent.enable = true;
}
My programs.xfconf.enable = true; is already set in my configuration.nix and would throw an error if I would set it again in my home-manager configuration.
However, non of the changes are applied after running home-manager switch (or any of the other applicable commands). There are no errors, and the output claims that the changes are applied. But neither a log-out nor a reboot would result in visible changes in the (icon) theme, wallpaper etc. (sometimes there might occur glitches like switching from dark theme to light theme, even though this is configured nowhere). The majority of the sources say that [not many options exist](https://www.reddit.com/r/NixOS/comments/c8yqxl/is_there_a_way_to_configure_xfce_look_and_feel/) besides basic things like setting the wallpaper, [startup commands](https://unix.stackexchange.com/questions/445048/configure-xfce-startup-commands-in-nixos) or general options
services.xserver.desktopManager.xfce.enableScreensaver
services.xserver.desktopManager.xfce.enable
services.xserver.desktopManager.xfce.noDesktop
programs.thunar.enable
programs.xfconf.enable
programs.gnupg.agent.pinentryFlavor
sound.mediaKeys.enable
services.xserver.desktopManager.xfce.enableXfwm

#source: https://search.nixos.org/options?channel=23.05&from=0&size=50&sort=relevance&type=packages&query=xfce 
# Questions: # 1. Did I miss something (like additional commands to enable xfconf properly also for home-manager?) 2. Since nix is a functional language, I would not expect so, but: Do I have to move some package installation logic to other than home-manager files? 3. Is there a way with home-manager to do any detailed XFCE configuration changes (like task bar position) after having build the default NixOS XFCE? 4. Is it easily possible to make the configuration changes already during building the default NixOS XFCE? And if so, in an easy way with little to no additional scripting/settings that have to be applied manually by the user?
dsacre (111 rep)
Aug 28, 2023, 07:32 AM • Last activity: Sep 21, 2024, 05:38 PM
0 votes
2 answers
261 views
Can I (install and) use guix-home on a non-Guix Linux distribution?
I'm interested in setting up an environment of apps, libraries and utilities for use - independently and in conjunction - by a non-root user on a GNU/Linux system. Can I use [GUIX's "home" mechanism][1] for doing that, even though the OS distribution is not GUIX? Similarly to how [Nix' home-manager]...
I'm interested in setting up an environment of apps, libraries and utilities for use - independently and in conjunction - by a non-root user on a GNU/Linux system. Can I use GUIX's "home" mechanism for doing that, even though the OS distribution is not GUIX? Similarly to how Nix' home-manager is used?
einpoklum (10753 rep)
Aug 23, 2023, 02:07 PM • Last activity: Sep 6, 2024, 05:37 AM
0 votes
1 answers
246 views
Can't enable home manager in WSL NixOS
I'm trying to setup home manager in NixOS running in WSL. However, it seems my import is not working correctly. I'm not sure what I'm missing. Google and ChatGPT were of no use here. My /etc/nixos/configuration.nix { config, lib, pkgs, ... }: let home-manager = builtins.fetchTarball "https://github....
I'm trying to setup home manager in NixOS running in WSL. However, it seems my import is not working correctly. I'm not sure what I'm missing. Google and ChatGPT were of no use here. My /etc/nixos/configuration.nix { config, lib, pkgs, ... }: let home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz "; in { imports = [ # include NixOS-WSL modules ]; wsl.enable = true; wsl.defaultUser = "nixos"; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It's perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html) . environment.systemPackages = with pkgs; [ vim oh-my-zsh zsh zsh-completions zsh-powerlevel10k zsh-syntax-highlighting zsh-history-substring-search # other packages ]; system.stateVersion = "24.05"; # Did you read the comment? users.users.nixos.isNormalUser = true; home-manager.users.nixos = { pkgs, ... }: { home.stateVersion = "24.05"; home.username = "nixos"; users.defaultUserShell = pkgs.zsh; programs.zsh = { enable = true; oh-my-zsh = { enable = true; theme = "avit"; # Set the desired theme here plugins = [ "git" "vim" "sudo" "z"]; }; }; }; } The error I get is: $ sudo nixos-rebuild switch building Nix... building the system configuration... error: … while calling the 'head' builtin at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:1575:11: 1574| || pred here (elemAt values 1) (head values) then 1575| head values | ^ 1576| else … while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:809:9: 808| in warnDeprecation opt // 809| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 810| inherit (res.defsFinal') highestPrio; (stack trace truncated; use '--show-trace' to show the full trace) error: The option `home-manager.users.nixos.users' does not exist. Definition values: - In `/etc/nixos/configuration.nix': { defaultUserShell = ; What am I missing?
CalumMcCall (101 rep)
Jul 20, 2024, 04:01 PM • Last activity: Jul 21, 2024, 05:13 PM
0 votes
0 answers
274 views
NixOS unable to find binaries/commands/packages installed (globally or locally) by asdf
I recently started to use `NixOS 23.05`. I'm also using `Home Manager` (same version). Problem I'm facing is with [`asdf`][1]. I installed it using `Home Manager`, and everything went fine. I then installed a couple of plugins, but any time I make them available globally, the system is unable to fin...
I recently started to use NixOS 23.05. I'm also using Home Manager (same version). Problem I'm facing is with asdf . I installed it using Home Manager, and everything went fine. I then installed a couple of plugins, but any time I make them available globally, the system is unable to find the corresponding application/installation. I think this may be an issue with NixOS, and the way it *register* the binaries/commands, but I'm not sure how to fix it, because everything was managed by Home Manager. Anyone using this setup?
user280674
Jun 22, 2023, 11:30 PM • Last activity: Jun 28, 2023, 01:03 PM
0 votes
1 answers
1862 views
treesitter Neovim plugin not working on nixos
I have installed home-manager in a flake as a module. The Flake and the Module are in ```/etc/nixos/```. My Home manager File links to another file in which I configure neovim, this file is located in ```/etc/nixos/config/nvim/nvim.nix```. The Contents of that file are ``` # neovim configuration fil...
I have installed home-manager in a flake as a module.
The Flake and the Module are in
/etc/nixos/
.
My Home manager File links to another file in which I configure neovim, this file is located in
/etc/nixos/config/nvim/nvim.nix
.
The Contents of that file are
# neovim configuration file

pkgs:

{
  enable = true;
  vimAlias = true;

  # A simple configuration for neovim (sourced files)
  extraLuaConfig = ''
    -- Indentation
    vim.opt.smartindent = true
    vim.opt.autoindent = true

    -- UI settings
    vim.opt.number = true
    vim.opt.cursorline = true
  '';


  plugins = with pkgs.vimPlugins; [
    vim-nix
    yuck-vim
    markdown-preview-nvim
    {
      plugin = telescope-nvim;
      config = ''
        " Find files using Telescope command-line sugar.
noremap ff Telescope find_files
nnoremap fg Telescope live_grep
nnoremap fb Telescope buffers
nnoremap fh Telescope help_tags

" Using Lua functions
nnoremap ff lua require('telescope.builtin').find_files()
nnoremap fg lua require('telescope.builtin').live_grep()
nnoremap fb lua require('telescope.builtin').buffers()
nnoremap fh lua require('telescope.builtin').help_tags()
              '';

    }
    {
      type = "lua";
      plugin = catppuccin-nvim;
      config = ''
        require("catppuccin").setup({
          flavour = "mocha", -- latte, frappe, macchiato, mocha
          background = { -- :h background
            light = "latte",
            dark = "mocha",
          },
          transparent_background = false,
          show_end_of_buffer = false, -- show the '~' characters after the end of buffers
          term_colors = false,
          dim_inactive = {
            enabled = false,
            shade = "dark",
            percentage = 0.15,
          },
          no_italic = false, -- Force no italic
          no_bold = false, -- Force no bold
          styles = {
            comments = { "italic" },
            conditionals = { "italic" },
            loops = {},
            functions = {},
            keywords = {},
            strings = {},
            variables = {},
            numbers = {},
            booleans = {},
            properties = {},
            types = {},
            operators = {},
        },
        color_overrides = {},
        custom_highlights = {},
        integrations = {
            cmp = true,
            gitsigns = true,
            nvimtree = true,
            telescope = true,
            notify = false,
            mini = false,
            -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) 
        },
    })

    -- setup must be called before loading
    vim.cmd.colorscheme "catppuccin"

      '';
    }
    nvim-web-devicons
    neo-tree-nvim
    {
      type = "lua";
      plugin = nvim-treesitter;
      config = ''
        require'nvim-treesitter.configs'.setup {
          ensure_installed = "maintained",
          highlight = {
            enable = true,
          }
        }
      '';
    }
    nvim-lspconfig
    rust-tools-nvim
  ];

  extraPackages = with pkgs; [
    tree-sitter
    rust-analyzer
    ripgrep
    nil
    zig
    ripgrep
        kotlin-language-server
        fd
        statix
        cppcheck
        deadnix
        alejandra
        nodePackages.pyright
        nodejs-16_x
        tree-sitter
        nil
        clang-tools
        cmake-language-server
        # ccls
        wl-clipboard
        omnisharp-roslyn
        netcoredbg
        gcc # treesitter
        nixfmt
        nodePackages.typescript-language-server
        python310Packages.autopep8
        lazygit
  ];
}
When I open a file, for example a
*.lua
I get the error Message:
Error detected while processing /home/simon/.config/nvim/init.lua:                                                                                                                      
Could not create parser dir ' /nix/store/w3x3582xldrjymxbxz98lzlfmhazibmy-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/parser ':  Vim:E739: Cannot create directory /nix/sto
re/w3x3582xldrjymxbxz98lzlfmhazibmy-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/parser: read-only file system
How can I fix this? Any help is greatly appreciated.
Zxmon (3 rep)
Feb 11, 2023, 06:03 PM • Last activity: Feb 11, 2023, 06:38 PM
1 votes
1 answers
1235 views
Conflicting Nix Home Manager packages
I've been using Nix Home Manager to manage packages on Mac OS, and hit a new problem adding `ripgrep` to `home.packages` - this has previously been fine. I don't really know what the error means or how to correctly fix it - help appreciated! ``` $ home-manager switch /nix/store/g9wiv0f7nhwqjqdn1cwi3...
I've been using Nix Home Manager to manage packages on Mac OS, and hit a new problem adding ripgrep to home.packages - this has previously been fine. I don't really know what the error means or how to correctly fix it - help appreciated!
$ home-manager switch
/nix/store/g9wiv0f7nhwqjqdn1cwi317zw9anknfs-home-manager-generation
Starting Home Manager activation
Activating checkFilesChanged
Activating checkLaunchAgents
Activating checkLinkTargets
Activating writeBoundary
Activating copyFonts
Activating installPackages
error: files '/nix/store/qdylbr09f0zjc44zkxjrf4ilzkpj05gl-home-manager-path/bin/man' and '/nix/store/2jahwbgdzz4cabfp0w1009ysdpb47ycb-home-manager-path/bin/man' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' or type 'nix profile install --help' if using 'nix profile' to find out howto change the priority of one of the conflicting packages (0 being the highest priority)

Oops, Nix failed to install your new Home Manager profile!

Perhaps there is a conflict with a package that was installed using
"nix profile install"? Try running

    nix profile list

and if there is a conflicting package you can remove it with

    nix profile remove {number | store path}

Then try activating your Home Manager configuration again.
And
$ nix profile list
0 - - /nix/store/2jahwbgdzz4cabfp0w1009ysdpb47ycb-home-manager-path
1 github:nix-community/comma#packages.aarch64-darwin.default github:nix-community/comma/691120d169189f3a9cb29b1c72bcd521ac372b2b#packages.aarch64-darwin.default /nix/store/la30szfb9m9bq7y8nwc2dmxjlq361rqm-comma-1.2.3
2 - - /nix/store/2jahwbgdzz4cabfp0w1009ysdpb47ycb-home-manager-path
I have recently installed comma , which sounds like it could plausibly be part of the issue?
Matt R (395 rep)
Oct 24, 2022, 12:33 PM • Last activity: Oct 31, 2022, 06:41 PM
2 votes
1 answers
1226 views
users.users.<name>.packages vs home-manager packages
Is there any practical difference between ```nix users.users.default.packages = [ pkgs.foo ]; ``` and ```nix home-manager = { users.default = { config, pkgs, nixpkgs, lib, specialArgs, options, modulesPath, nixosConfig, osConfig, }: { home = { packages = [ pkgs.foo ]; }; }; useGlobalPkgs = true; };...
Is there any practical difference between
users.users.default.packages = [
  pkgs.foo
];
and
home-manager = {
  users.default = {
    config,
    pkgs,
    nixpkgs,
    lib,
    specialArgs,
    options,
    modulesPath,
    nixosConfig,
    osConfig,
  }: {
    home = {
      packages = [
        pkgs.foo
      ];
    };

  };
  useGlobalPkgs = true;
};
l0b0 (53368 rep)
Oct 5, 2022, 01:43 AM • Last activity: Oct 5, 2022, 07:21 PM
Showing page 1 of 7 total questions