Coder Social home page Coder Social logo

nix-community / home-manager Goto Github PK

View Code? Open in Web Editor NEW
6.3K 54.0 1.7K 46.05 MB

Manage a user environment using Nix [maintainer=@rycee]

Home Page: https://nix-community.github.io/home-manager/

License: MIT License

Nix 96.38% Shell 3.14% Perl 0.05% Ruby 0.30% CSS 0.03% Lua 0.01% Makefile 0.02% HTML 0.05% Sage 0.01% Nushell 0.01% Nu 0.01%
nix nixpkgs dotfiles nixos nix-dotfiles

home-manager's Introduction

Home Manager using Nix

This project provides a basic system for managing a user environment using the Nix package manager together with the Nix libraries found in Nixpkgs. It allows declarative configuration of user specific (non-global) packages and dotfiles.

Usage

Before attempting to use Home Manager please read the warning below.

For a systematic overview of Home Manager and its available options, please see:

If you would like to contribute to Home Manager, then please have a look at "Contributing" in the manual.

Releases

Home Manager is developed against nixpkgs-unstable branch, which often causes it to contain tweaks for changes/packages not yet released in stable NixOS. To avoid breaking users' configurations, Home Manager is released in branches corresponding to NixOS releases (e.g. release-24.05). These branches get fixes, but usually not new modules. If you need a module to be backported, then feel free to open an issue.

Words of warning

Unfortunately, it is quite possible to get difficult to understand errors when working with Home Manager. You should therefore be comfortable using the Nix language and the various tools in the Nix ecosystem.

If you are not very familiar with Nix but still want to use Home Manager then you are strongly encouraged to start with a small and very simple configuration and gradually make it more elaborate as you learn.

In some cases Home Manager cannot detect whether it will overwrite a previous manual configuration. For example, the Gnome Terminal module will write to your dconf store and cannot tell whether a configuration that it is about to be overwritten was from a previous Home Manager generation or from manual configuration.

Home Manager targets NixOS unstable and NixOS version 24.05 (the current stable version), it may or may not work on other Linux distributions and NixOS versions.

Also, the home-manager tool does not explicitly support rollbacks at the moment so if your home directory gets messed up you'll have to fix it yourself. See the rollbacks section for instructions on how to manually perform a rollback.

Now when your expectations have been built up and you are eager to try all this out you can go ahead and read the rest of this text.

Contact

You can chat with us on IRC in the channel #home-manager on OFTC. There is also a Matrix room, which is bridged to the IRC channel.

Installation

Home Manager can be used in three primary ways:

  1. Using the standalone home-manager tool. For platforms other than NixOS and Darwin, this is the only available choice. It is also recommended for people on NixOS or Darwin that want to manage their home directory independently of the system as a whole. See "Standalone installation" in the manual for instructions on how to perform this installation.

  2. As a module within a NixOS system configuration. This allows the user profiles to be built together with the system when running nixos-rebuild. See "NixOS module" in the manual for a description of this setup.

  3. As a module within a nix-darwin system configuration. This allows the user profiles to be built together with the system when running darwin-rebuild. See "nix-darwin module" in the manual for a description of this setup.

Home Manager provides both the channel-based setup and the flake-based one. See Nix Flakes for a description of the flake-based setup.

Translations

Home Manager has basic support for internationalization through gettext. The translations are hosted by Weblate. If you would like to contribute to the translation effort then start by going to the Home Manager Weblate project.

Translation status

License

This project is licensed under the terms of the MIT license.

home-manager's People

Contributors

arcnmx avatar berbiche avatar considerate avatar damiencassou avatar dependabot[bot] avatar dermetfan avatar emilazy avatar gerschtli avatar github-actions[bot] avatar home-manager-bot avatar infinisil avatar kalbasit avatar liff avatar lunnova avatar marsam avatar midchildan avatar ncfavier avatar nonsequitur avatar olmokramer avatar polykernel avatar ryanorendorff avatar rycee avatar somasis avatar sumnerevans avatar supersandro2000 avatar tadfisher avatar teto avatar thiagokokada avatar uvnikita avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

home-manager's Issues

proposition: Have an XDG configuration setting

This is a copy of my initial post in NixOS/nixpkgs#29945 as home-manager might be a better place to deal with this kind of behavior.

I like to sync my dotfiles across machines in a repository. It's easier to do with programs that comply with XDG specs as there is a clean separation between cache files and config ($XDG_CACHE_HOME)/$XDG_CONFIG_HOME. Some programs don't follow XDG but their behavior can still be changed (via environment variables) to mimic XDG. For instance for zsh one can set ZDOTDIR="$XDG_CONFIG_HOME/zsh".
A list of such software is available
https://wiki.archlinux.org/index.php/XDG_Base_Directory_support

I wonder if this could be generalized via some nixos option, i.e., autoexport some variables (or wrap programs to use command line flags towards the config path) so that program behaves more XDG-like.

Might be problematic and more of a toy-thing but I would fancy sthg like that xD (and can contribute to it

Allow for bash & zsh specific .programs.zsh.

Recently I seem to have trouble with the value of HISTFILE being the same for zsh/bash while the format of zsh history seems to have changed (not sure if it's because of my configuration or a zsh update, now it seems to prepend a timestamp):
: 1507686477:0;git fetch -a channels && git rebase channels/nixpkgs-unstable
but even without that I prefer to have bash and zsh use different HISTFILE(s).

WOuld you be ok with a "variables" options specific to zsh or bash that write into .zshenv for instance. I can contribute.

i3 doesn t use xdg setting

the i3 module should use xdg module instead of home.file. Maybe it should also change $HOME/.config/i3/config with ${XDG_CONFIG_HOME:-HOME/.config}/i3/config (I am no bash expert so that might be wrong).

      xsession.windowManager.command = "${cfg.package}/bin/i3";
      home.file.".config/i3/config".source = configFile;

      home.activation.checkI3 = dagEntryBefore [ "linkGeneration" ] ''
        if ! cmp --quiet \
            "${configFile}" \
            "$HOME/.config/i3/config"; then
          i3Changed=1

Error in generators.nix when switching

When doing a home-manager switch using HEAD, I get the following output:

error: value is a function while a set was expected, at /home/philipp/.config/nixpkgs/home-manager/modules/lib/generators.nix:71:11

Using -v, it seems to stem from git.nix:

error: while evaluating the attribute ‘activationPackage’ at /home/philipp/.config/nixpkgs/home-manager/modules/default.nix:94:3:
while evaluating ‘showWarnings’ at /home/philipp/.config/nixpkgs/home-manager/modules/default.nix:63:18, called from /home/philipp/.config/nixpkgs/home-manager/modules/default.nix:79:12:
while evaluating ‘foldr’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/lists.nix:34:20, called from /home/philipp/.config/nixpkgs/home-manager/modules/default.nix:67:7:
while evaluating ‘fold'’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/lists.nix:37:15, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/lists.nix:41:8:
while evaluating ‘collectFailed’ at /home/philipp/.config/nixpkgs/home-manager/modules/default.nix:60:19, called from /home/philipp/.config/nixpkgs/home-manager/modules/default.nix:81:16:
while evaluating anonymous function at /home/philipp/.config/nixpkgs/home-manager/modules/default.nix:61:33, called from undefined position:
while evaluating the attribute ‘assertion’ at /home/philipp/.config/nixpkgs/home-manager/modules/home-environment.nix:225:11:
while evaluating anonymous function at /home/philipp/.config/nixpkgs/home-manager/modules/home-environment.nix:219:19, called from undefined position:
while evaluating ‘hasPrefix’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/strings.nix:148:21, called from /home/philipp/.config/nixpkgs/home-manager/modules/home-environment.nix:219:22:
while evaluating anonymous function at /home/philipp/.config/nixpkgs/home-manager/modules/home-environment.nix:220:17, called from undefined position:
while evaluating the attribute ‘source’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/attrsets.nix:199:44:
while evaluating anonymous function at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:75:45, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/attrsets.nix:199:52:
while evaluating the attribute ‘value’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:312:9:
while evaluating the option `home.file..gitconfig.source':
while evaluating the attribute ‘isDefined’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:344:5:
while evaluating ‘filterOverrides’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:419:21, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:328:18:
while evaluating ‘concatMap’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/lists.nix:102:18, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:425:8:
while evaluating ‘concatMap’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/lists.nix:102:18, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:323:17:
while evaluating anonymous function at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:323:28, called from undefined position:
while evaluating ‘dischargeProperties’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:386:25, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:324:62:
while evaluating the attribute ‘condition’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:467:14:
while evaluating the attribute ‘text’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/attrsets.nix:199:44:
while evaluating anonymous function at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:75:45, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/attrsets.nix:199:52:
while evaluating the attribute ‘value’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:312:9:
while evaluating the option `home.file..gitconfig.text':
while evaluating the attribute ‘isDefined’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:344:5:
while evaluating ‘filterOverrides’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:419:21, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:328:18:
while evaluating ‘concatMap’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/lists.nix:102:18, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:425:8:
while evaluating ‘concatMap’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/lists.nix:102:18, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:323:17:
while evaluating anonymous function at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:323:28, called from undefined position:
while evaluating ‘dischargeProperties’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:386:25, called from /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:324:62:
while evaluating the attribute ‘value’ at /nix/store/4ycxbyds2bna475vj0lp6wamkj69y4y4-nixos-18.03pre116054.a75265924f/nixos/lib/modules.nix:216:48:
while evaluating the attribute ‘config.text’ at /home/philipp/.config/nixpkgs/home-manager/modules/programs/git.nix:96:9:
while evaluating ‘toINI’ at /home/philipp/.config/nixpkgs/home-manager/modules/lib/generators.nix:67:6, called from /home/philipp/.config/nixpkgs/home-manager/modules/programs/git.nix:96:39:
while evaluating ‘mapAttrsToStringsSep’ at /home/philipp/.config/nixpkgs/home-manager/modules/lib/generators.nix:70:44, called from /home/philipp/.config/nixpkgs/home-manager/modules/lib/generators.nix:78:7:
value is a function while a set was expected, at /home/philipp/.config/nixpkgs/home-manager/modules/lib/generators.nix:71:11

Write note in README about backups

A backup of a home directory will include link to the Nix store, which most likely will be dead in a restore situation. It may be necessary to clean these up manually. Also it is very important to back up the HM configuration. Need to note this in the README. See #123 for discussion.

Milestone for Darwin

What needs to be done for Darwin support? I imagine launchd support, environment variable injection, others?

Right now the basic package installation works, I didn't try anything else.

PAM fails to set the session variables [properly].

Session variables written to .pam_environment are sorted alphabetically is the culprit here.

Given:

home.sessionVariableSetter = "pam";
home.sessionVariables = { XDG_CONFIG_HOME="@{HOME}/.config";
                          HOMERC="$\{XDG_CONFIG_HOME\}/htop/htoprc";
                        };
$ cat ~/.pam_environment

HOMERC OVERRIDE=${XDG_CONFIG_HOME}/htop/htoprc
XDG_CONFIG_HOME OVERRIDE=@{HOME}/.config

Which causes PAM to fail, due to XDG_CONFIG_HOME, not being defined before HOMERC .

I believe this is due to home.sessionVariables being a set ({}), instead of a list ([]) which means order is not preserved. (I have not dived deep enough into the Nix language to know if that is the case, just a conjecture on my part.)

Feature request: Default programs

It would be great if I could manage my default programs with home-manager. For example, I want to open PDF files with zathura (for example, when clicking on a PDF download in chrome). Most programs use xdg-open file.pdf to open files. Using

xdg-mime default zathura.desktop application/pdf

I can change the default program for pdfs to zathura. Otherwise, xdg-open "guesses" and chooses gimp (!) on my system.

What the above xdg-mime command generates or adds is a file $HOME/.config/mimeapps.list, like so:

[Default Applications]
application/pdf=zathura.desktop

We could just generate this file using home-manager. The nix-pseudocode for this could be:

{
  defaultPrograms."application/pdf" = "${pkgs.zathura}/share/applications/zathura.desktop";
}

Does this sound like a thing for home-manager?

I have practically zero experience with nix, so I might try this myself as an exercise. However, I'd be glad, too, if somebody else would tackle this problem.

xsession.windowManager should take an expression

Hi,

currently, setting a wm requires the path to the executable:
xsession.windowManager = "${pkgs.wm}/bin/wm";
I think this should instead be handled like it is in configuration.nix:
xsession.windowManager = pkgs.wm;.

dunst process is not picked up => two dunst processes

I had changed my dunst settings but they were not picked up after home-manager switch. I noticed there were many dunst instances running.

After killall dunst and systemctl --user start dunst:

2017-11-08t17 45 15 481182268 01 00

After subsequent home-manager switch (which calls notify-send to display unread news):

2017-11-08t17 45 35 172826192 01 00

As you can see, the systemd service process was not picked up and new instance was started instead.

It's not a big problem in practise but you'll have to kill the second dunst process before every home-manager switch to get your changes into effect. If you don't mind running two instances...

neovim module

I needed to experiment a bit with neovim and language server protocols so I've started a neovim module. Just let you know to prevent duplicate work.

mail management

Mail management is my biggest nightmare on linux. So many software to configure; most of the time with redundant data, which becomes painful with several accounts.
Thunderbird is easy to configure/use but it has numerous flaws and I prefer handling mails via astroid/notmuch/alot/offlineimap setup (never got to sync notmuch tags across computers but that could add yet another soft).
That's where nix should shine.
I imagine having a central list of accout sets that would be used to generate "X" mail program configs so that you need to change it only once instead of "X".
There seems to be a nixos project + that one https://github.com/r-raymond/nixos-mailserver but they seem more full fledged and ignore notmuch/astroid/notmuch I believe.
I got hit by the problem when deploying my config on a new machine. Everytime everything works but the mail so I started writing some code but maybe it's best to have some feedback first.

home-manager module is conflicting with home-manager

More precisely, I have the following home.nix

{ pkgs, ... }:

{
  # Maintain home-manager up-to-date
  programs.home-manager.enable = true;
}

When running home-manager switch, I get the following error

/nix/store/0kfik30f4b3q1h3girqqrg1cpmznwymn-home-manager-generation
Starting home manager activation
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
installing ‘home-manager-path’
building path(s) ‘/nix/store/ckgcpiqjnashnd791bzl3hfnkvahsz41-user-environment’
Wide character in die at /nix/store/64jc9gd2rkbgdb4yjx3nrgc91bpjj5ky-buildenv.pl line 79.
collision between ‘/nix/store/kcm2957czc8lip13w88kybhk31gf2616-home-manager/bin/home-manager’ and ‘/nix/store/aiyf3wby4m0ckag3zpifr5gzap0ivbkp-home-manager-path/bin/home-manager’; use ‘nix-env --set-flag priority NUMBER PKGNAME’ to change the priority of one of the conflicting packages
builder for ‘/nix/store/vcc3vh3r5svh3bfq0rkyhjj0ixgqa3z1-user-environment.drv’ failed with exit code 255
error: build of ‘/nix/store/vcc3vh3r5svh3bfq0rkyhjj0ixgqa3z1-user-environment.drv’ failed

My guess is that my user installation of home-manager is already providing the binary home-manager in my user environment. When enabling the home-manager module, there's another binary to be linked in my user environment. This is not a really blocking bug, but maybe it should eventually be documented in the installation procedure.

Moreover, I understand the home-manager module is fairly new (just a few days) and I'm very excited to finally get some time to test it out.

How to remove previous generations?

home-manager shows the available generations, e.g.:

Nov  7 16:21 home-manager-8-link -> /nix/store/ikvaxmyvld9njc23zhkimxpigxji14ll-home-manager-generation
Nov  6 21:43 home-manager-7-link -> /nix/store/n0fv59zhgdbhixch7s45lg0y5n67sh5r-home-manager-generation
Nov  6 21:38 home-manager-6-link -> /nix/store/f088kkan6ij42gva9lfkv7pw55jxnzpv-home-manager-generation
Nov  6 10:54 home-manager-5-link -> /nix/store/ddiiklqlmy5mn4vqcsfamvgqqyqpcl4y-home-manager-generation
Nov  4 18:40 home-manager-4-link -> /nix/store/7cd90r45d2jrd0yki9npz0wjx3k5fzn7-home-manager-generation
Nov  4 18:19 home-manager-3-link -> /nix/store/1k6fv7vyki88l3afidpf29r98h174il1-home-manager-generation
Nov  4 18:10 home-manager-2-link -> /nix/store/13md526sfs3h2i6brlysywqi2m2gfz8y-home-manager-generation
Nov  4 18:02 home-manager-1-link -> /nix/store/s3qcfgp2zwsqc6p7zgsr98ka69ni46mi-home-manager-generation

Is there a command to erase some of them?

Activation should fail if it needs to overwrite a user file

When switching to a new configuration, the activation should halt and print a helpful message if a non-managed file needs to be overwritten. For example, this should be triggered if a user adds home.file.hello.text = "foo"; and the ~/hello path exists as anything other than a link into the Nix store.

News module

When updating Home Manager and its modules then it would be nice to be informed about any changes that affect my configuration, e.g., deprecation of options, change in behavior, upcoming breaking changes, etc.

This can be accomplished by having the home-manager command hook into a news module. This news module declares an option news.entries that holds a list of news entries. A news may optionally have a condition that will determine whether the entry is relevant to the user.

When performing a home-manager build or home-manager switch one can then notify the user of any unread news. The user can then run home-manager news to see the actual news entries. Alternatively, with news.display = "show"; in the configuration, the news will be shown immediately on build or switch.

home-manager switch fails

Hey, I've been facing this error after running home-manager switch recently. I'm using the nixos-unstable channel.

these derivations will be built:
  /nix/store/5m55psj9v5ni8djb8zlh4j5g4krsm430-home-manager-path.drv
  /nix/store/vs9zrpash3c7iqamhn2qy1wfcycdkaba-activation-script.drv
  /nix/store/nbrg4ahpvn67q9diqz82sh079jaff4ba-home-manager-generation.drv
building path(s) ‘/nix/store/cnbpx3ljhg3hxbnjsfnsww48ifw3dcgl-home-manager-path’
Use of uninitialized value $stat2 in numeric ne (!=) at /nix/store/9g4wc31j7a2xp22xpgwr0qssfxahxdzl-builder.pl line 74.
Use of uninitialized value $stat1 in numeric ne (!=) at /nix/store/9g4wc31j7a2xp22xpgwr0qssfxahxdzl-builder.pl line 74.
collision between `/nix/store/5w4m6vf5lawhbhfrgv6b55gg5kcpczcs-xmonad-with-packages/share/man' and `'
builder for ‘/nix/store/5m55psj9v5ni8djb8zlh4j5g4krsm430-home-manager-path.drv’ failed with exit code 2
cannot build derivation ‘/nix/store/vs9zrpash3c7iqamhn2qy1wfcycdkaba-activation-script.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/nbrg4ahpvn67q9diqz82sh079jaff4ba-home-manager-generation.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/nbrg4ahpvn67q9diqz82sh079jaff4ba-home-manager-generation.drv’ failed

I have trouble determining if this comes from home-manager at all, I'll check more thouroughly, but in the meantime, if you know this, please help : )

cannot enable services

<service>.enable = true; does not seem to work for me. I tried

  • xscreensaver
  • network-manager-applet
  • dunst and
  • udiskie.

For xscreensaver I tried changing WantedBy = [ "graphical-session.target" ]; to "graphical.target", but that's about my only idea as I am not the greatest systemd fan or expert.

zsh: plugins

I recently extended the zsh module by a plugins option in my dotfiles:

programs.zsh.plugins = [
  {
    file = "zsh-256color.plugin.zsh";
    src = pkgs.fetchFromGitHub {
      owner = "chrissicool";
      repo = "zsh-256color";
      rev = "ae40a49ccfc7520d2d7b575aaea160ff876fe3dc";
      sha256 = "0c2yzbd4y0fyn9yycrxh32am27r0df0x3r526gf1pmyqiv49rg5z";
    };
  }
  {
    file = "fast-syntax-highlighting.plugin.zsh";
    src = pkgs.fetchFromGitHub {
      owner = "zdharma";
      repo = "fast-syntax-highlighting";
      rev = "5fab542516579bdea5cc8b94137d9d85a0c3fda5";
      sha256 = "1ff1z2snbl9rx3mrcjbamlvc21fh9l32zi2hh9vcgcwbjwn5kikg";
    };
  }
];

The result looks like this in .zshrc:

autoload -Uz compinit; compinit -iCd $HOME/.zcompdump
path+="/nix/store/w8jv67h8l60dj6fzm35q5sxdimi62bps-zsh-256color-ae40a49ccfc7520d2d7b575aaea160ff876fe3dc-src"
fpath+="/nix/store/w8jv67h8l60dj6fzm35q5sxdimi62bps-zsh-256color-ae40a49ccfc7520d2d7b575aaea160ff876fe3dc-src"
source "/nix/store/w8jv67h8l60dj6fzm35q5sxdimi62bps-zsh-256color-ae40a49ccfc7520d2d7b575aaea160ff876fe3dc-src/zsh-256color.plugin.zsh"
path+="/nix/store/13r11ycprwslr6851qr13pl6ms73906m-fast-syntax-highlighting-5fab542516579bdea5cc8b94137d9d85a0c3fda5-src"
fpath+="/nix/store/13r11ycprwslr6851qr13pl6ms73906m-fast-syntax-highlighting-5fab542516579bdea5cc8b94137d9d85a0c3fda5-src"
source "/nix/store/13r11ycprwslr6851qr13pl6ms73906m-fast-syntax-highlighting-5fab542516579bdea5cc8b94137d9d85a0c3fda5-src/fast-syntax-highlighting.plugin.zsh"

I also tried this syntax but the order is not preserved. Maybe when toposort is implemented in #50 we can use it here:

programs.zsh.plugins = with pkgs; {
  "zsh-256color".src = fetchFromGitHub {
    owner = "chrissicool";
    repo = "zsh-256color";
    rev = "ae40a49ccfc7520d2d7b575aaea160ff876fe3dc";
    sha256 = "0c2yzbd4y0fyn9yycrxh32am27r0df0x3r526gf1pmyqiv49rg5z";
  };

  "fast-syntax-highlighting".src = fetchFromGitHub {
    owner = "zdharma";
    repo = "fast-syntax-highlighting";
    rev = "5fab542516579bdea5cc8b94137d9d85a0c3fda5";
    sha256 = "1ff1z2snbl9rx3mrcjbamlvc21fh9l32zi2hh9vcgcwbjwn5kikg";
  };
};

In an attempt to reduce my zsh startup time I switched from oh-my-zsh to antigen to zr but I could not bring it below ~0.95 sec. Using the plugins option I get a consistent 0.05 sec with the same plugins loaded. I'm not sure what the cause is (may be related to #54) but I like the simple approach.

Would this be a desirable feature for home-manager?

The activation script should start with an empty PATH

We should not accidentally rely on anything in the user's environment. This may be thought of a continuation of #11.

This would be a breaking change for any user having a custom activation section that expects the full path.

Q: conditional configuration per host type

First, thanks so much for home-manager — even in its “early development” state, it's really quite useful, and exactly what I had hoped to find when I first started using NixOS.

Do you have any recommendations for making a home.nix that can conditionally configure systems based on whether they are headless vs. GUI or laptop vs. desktop or Linux vs. Mac? This may be a general question about the Nix language itself, but I feel the need for it more acutely in home-manager. (I think maybe the OS type is a variable one can access in Nix, but I can't find one for the hostname or similar.)

Right now my workaround is something like this: the conditionalized home.nix has an extra parameter set with Boolean flags, like:

# home.nix
{headless, laptop, ...}:   # Flags
{pkgs, lib, ...}:
# settings go here

and then I write separate files per host that import this with the right arguments, like:

# home-HOST-A.nix
import ./home.nix {headless=true; laptop=false;}

and

# home-HOST-B.nix
import ./home.nix {headless=false; laptop=false;}

etc. and then symlink the correct home-HOST file as ~/.nixpkgs/home.nix. This works okay, but I'm just uncomfortable with the tiny proliferating host files.

Sorry for opening this question as an issue, but I thought home-manager users might have ideas here that I haven't found on the larger Nix boards yet. Thanks.

Permission denied

error: creating symlink from ‘/etc/nixos/result.tmp-27440-1730106898’ to ‘/nix/store/ci9j6ms78lyklicjq8b6i5n3z4xh85ll-home-manager-generation’: Permission denied
user groups - users wheel disk audio networkmanager

it's blocking issue since

$ sudo home-manager build
No configuration file found. Please create one at /root/.config/nixpkgs/home.nix

Temporary failure to build basic configuration?

Today, I've installed home-manager following the README. At the switch step, it fails with:

these derivations will be built:
  /nix/store/jzdvny020lx4j09ic1jl1hfcf0yvfh2i-nixos-manual-combined.drv
  /nix/store/007i2mkm6ns8qjhxm4hswr772pc85ivs-manual-olinkdb.drv
  /nix/store/9zqri7vxqkqmi2gzdanh7033b3y7j288-nixos-manpages.drv
  /nix/store/4idwybmyhbkraddsr09a25ijk9xmrkkj-home-environment-manpages.drv
  /nix/store/i7g2r5a45bp931mwv1srbzlx5y8dijwf-home-manager-files.drv
  /nix/store/fqjzsjz2xm1r078wh2irspaiw68v4kw5-home-manager-path.drv
  /nix/store/xmrkvr6bgzkqwfhc350jmxjd25gxyajc-activation-script.drv
  /nix/store/9k1fpwjffshpvnkwasv2nci8g6f5a1gk-home-manager-generation.drv
these paths will be fetched (1.20 MiB download, 17.84 MiB unpacked):
  /nix/store/a8ys1mm9i87n4xi8sx8lxjpppxfv8x9c-docbook-xsl-ns-1.79.1
  /nix/store/bl48w7h24n6379fa200yv60n4pwynd9c-stdenv
fetching path ‘/nix/store/bl48w7h24n6379fa200yv60n4pwynd9c-stdenv’...
fetching path ‘/nix/store/a8ys1mm9i87n4xi8sx8lxjpppxfv8x9c-docbook-xsl-ns-1.79.1’...
building path(s) ‘/nix/store/ad2dckd55maw12zj40bqacy2fki8k577-nixos-manual-combined’

*** Downloading ‘https://cache.nixos.org/nar/0f8s4h5mgqqx2ng09xqwis3gxz15vn5wsnly70yvdcdn9r0wiaa4.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/a8ys1mm9i87n4xi8sx8lxjpppxfv8x9c-docbook-xsl-ns-1.79.1’...

*** Downloading ‘https://cache.nixos.org/nar/0vk9ab95pf1f293ylaknn38b97b3hhz8y71p4cxd0ya2nzsxzqy1.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/bl48w7h24n6379fa200yv60n4pwynd9c-stdenv’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
manual-combined.xml:2558: element para: Relax-NG validity error : Did not expect element para there
manual-combined.xml:1504: element chapter: Relax-NG validity error : Element part has extra content: chapter
manual-combined.xml:4: element info: Relax-NG validity error : Element book has extra content: info
manual-combined.xml fails to validate
builder for ‘/nix/store/jzdvny020lx4j09ic1jl1hfcf0yvfh2i-nixos-manual-combined.drv’ failed with exit code 3
killing process 28096
cannot build derivation ‘/nix/store/9zqri7vxqkqmi2gzdanh7033b3y7j288-nixos-manpages.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/4idwybmyhbkraddsr09a25ijk9xmrkkj-home-environment-manpages.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/fqjzsjz2xm1r078wh2irspaiw68v4kw5-home-manager-path.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/xmrkvr6bgzkqwfhc350jmxjd25gxyajc-activation-script.drv’: 1 dependencies couldn't be built
killing process 28095
cannot build derivation ‘/nix/store/9k1fpwjffshpvnkwasv2nci8g6f5a1gk-home-manager-generation.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/9k1fpwjffshpvnkwasv2nci8g6f5a1gk-home-manager-generation.drv’ failed

My .config/nixpkgs/home.nix is

{ pkgs, ... }:

{
  # home.packages = with pkgs; [
  # ];

  # Maintain home-manager up-to-date
  programs.home-manager.enable = true;
}

I'm using https://nixos.org/channels/nixos-unstable-small in my user profile.

vim: handling multiple boolean options with `listOf`

Hi,

I'm new to Nix (I've installed it yesterday) and I don't know much about coding conventions and best practices, so maybe this is stupid question.

Do you think that we can handle simple boolean options values using listOf - I mean adding setOptions to configure simple "on/off" options:

{
  programs.vim = { 
    enable = true;
    setOptions = ["expandtab" "relativenumber" "nonumber" "list"];
  };
}  

I think that advantages of this approach are that we can quickly add massive amount of options (selectively coping them from :set all) and prevent simple typo bugs etc.

On the other hand there will be inconsistency between this approach and other options handling like for example no docs/descriptions. This approach introduces possibility of other kinds of bugs - for example duplication (e.g. setOptions = ["expandtab", "expandtab"]), inconsistencies (e.g. setOptions = ["expandtab", "noexpandtab"];) and probably others ;-)

Here really simple and quick prototype.

Home file link/clean should be reordered

The current order may leave dangling pointers in the home directory if the linking phase fails. This issue is resolved by cleaning up the old generation's files before linking in the new generation. See #123 (comment) for in-depth description.

"Existing file is in the way" error should return non-zero status

I was deceived that my home-manager switch was working because it returned a zero exit status, even though it gave the "existing file" error message:

⋮
Starting home manager activation
Activating checkLinkTargets
Existing file '/home/league/.synergy.conf' is in the way
Please move the above files and try again

Compilation finished at Sat May 13 19:00:03
exit [0]

Should it return non-zero so the failure is more obvious in certain contexts?

syntax error on home-manager switch

It seems it started to happen after this commit: e9ca430

error: syntax error, unexpected IND_STRING_OPEN, expecting ID or OR_KW or DOLLAR_CURLY or '"', at /nix/store/g7m7q0204dbz6np3wrnjdw92lld99knj-home-manager.nix:9:47

I think the problem is in the '' quotes in this line https://github.com/rycee/home-manager/blob/e9ca4305a6bf8727f347c57b65883d2e1e1a5070/home-manager/home-manager.nix#L9

I would try to fix it, but now since $ home-manager switch is not working for me, I'm not sure how to switch to a different version of the home-manager.

Handle theme packages

For example when configuring GTK. I should be able to give the configuration a theme package and not bother with theme names and such:

{
  gtk2.theme = pkgs.foo;
  gtk3.theme = pkgs.bar;
}

i3: generate an alternate file

my i3 config is kinda big, I have a script to generate it. While I can see the appeal of having HM generates parts of it, I would rather keep most of my current config and include a little part generated by HM. It also makes incremental switching easier (extraConfig is nice for small files but once it gets bigger, as you lose syntax coloring/completion it makes it harder to use).
I see 2 possibilities:
1/ the i3 modules could concat several files via importConfigs which IMO would be very helpful
2/ or setup the module to generate an other file than XDG_CONFIG_HOME config

Here is what my current build_config.sh does:

if [ $(i3 --version | grep -c gaps) -gt 0 ]
then 
	list="$folder/config.gaps "
fi

list="${list:-} $folder/config.header $folder/config.xp $folder/config.audio  $folder/config.colors $folder/config.mediakeys $folder/filters.config $folder/config.main "
cat $list > "$folder/config"

Option 1 has my preference, it could replace advantageously my script as it could check for i3gaps and include the config conditionnally etc.

home-manager is not able to use X anymore?

Somedays ago i made a clean install of NixOS and now it seems like i can't manage my xsession with home-manager anymore.
When trying to login (Slim) i got the "Failed to execute login command" message.
Using the configuration.nix works.

NixOS Version: Unstable (17.09pre109180.0d4431cfe9)

home-manager tried to remove ~ when deleting an obsolete file

I renamed one of the config file (home.file.".minidlna".text = "..."), but it looks like home-manager tried to nuke my home directory instead :). I'm not sure if there's a risk or not, but seeing rmdir: failed to remove: /home/utdemir was pretty scary.

See:

$ home-manager switch
Starting home manager activation
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
replacing old ‘home-manager-path’
installing ‘home-manager-path’
building path(s) ‘/nix/store/9wyqccwgy02j6p5hzdi5iqqdxdj75i2w-user-environment’
created 438 symlinks in user environment
Activating linkGeneration
Creating profile generation 47
Cleaning up orphan links from /home/utdemir
Checking /home/utdemir/.minidlna  gone (deleting)
rmdir: failed to remove '/home/utdemir'
Activating reloadSystemD

Slow zsh startup

On current master, atop nixos 17.09: zsh -i -c exit => 1.42s user 0.10s system 99% cpu 1.530 total

I have programs.zsh.enable = true; in my system config and in home.nix, and have nix-zsh-completions and zsh-navigation-tools installed globally. I have no custom zsh config in effect.

`home.file.<name>.source` cannot begin with a dot

To reproduce:

# ~/.nixpkgs/home.nix
home.file.test.source = ./.test;
❯ home-manager build
error: while evaluating the attribute ‘installPhase’ of the derivation ‘home-manager-generation’ at /home/dermetfan/.nixpkgs/home-manager/modules/home-environment.nix:333:11:
while evaluating the attribute ‘installPhase’ of the derivation ‘home-manager-files’ at /home/dermetfan/.nixpkgs/home-manager/modules/home-environment.nix:319:11:
while evaluating anonymous function at /nix/store/7k3jyxd0y4c6hnl4ixs1yz1d1pvplgf1-nixos-17.03pre101636.183eeb3/nixos/lib/attrsets.nix:224:10, called from undefined position:
while evaluating anonymous function at /home/dermetfan/.nixpkgs/home-manager/modules/home-environment.nix:326:37, called from /nix/store/7k3jyxd0y4c6hnl4ixs1yz1d1pvplgf1-nixos-17.03pre101636.183eeb3/nixos/lib/attrsets.nix:224:16:
illegal name: ‘.test’

The evaluation error occurs when ${value.source} is accessed.

My workaround for now is home.file.".<name>" = ./dotfiles/<name>;.

~/.nixpkgs should be ~/.config/nixpkgs

Right?

I've symlinked them for now. This is hardly a showstopper. (I'm not sure what fallback/compatibility behavior you want, which is why I'm submitting just an issue and not a PR.)

Doubly-linked home files break systemd unit names

For the home-manager-generated unit definitions that consist of two symlinks, systemd uses the name of the linked file (the store file name) as the unit name instead of the
name of the symlink.

To reproduce:

cat << 'EOF' > /tmp/showBug
{ pkgs, ... }:
{
  systemd.user.services.myservice = {
    Service.ExecStart = ''${pkgs.coreutils}/bin/true'';
    Install.WantedBy = [ "default.target" ];
  };
}
EOF
home-manager -f /tmp/showBug switch

systemctl --user daemon-reload

systemctl --user --all | grep myservice # => h7r8jgwzwvscv731852md3wxnwxv65aw-myservice.service

Sorry for not catching this earlier, I focused mainly on the single-link proposal that I deemed most promising.

Possible solutions:

  • Add an option to copy files (very ugly)
  • Find a way to fix the systemd behavior
  • Use my original single-link proposal, maybe with the home file name included in the store name
    to address your shell globbing issues. I'll code it up quickly if you like.

How to handle collisions between home-manager-path and systemPackages?

Hello,

Suppose that I have non-root access to a NixOS system which has a package already installed via environment.systemPackages and I would like to reuse my dotfiles' .config/nixpkgs/home.nix which has the same package overlapping.

home-manager switch fails in that case, e.g. trying to install htop:

building path(s) ‘/nix/store/y6mvlngfpn0nfarwszq9icvp6iq3jllh-user-environment’
Wide character in die at /nix/store/64jc9gd2rkbgdb4yjx3nrgc91bpjj5ky-buildenv.pl line 79.
collision between ‘/nix/store/m93ryazgf6z88hncfg8f3vgk0b8inip3-home-manager-path/bin/htop’ and ‘/nix/store/k84sbzv05s8kc1zy1ri2002dgkxgyrqc-htop-2.0.2/bin/htop’; use ‘nix-env --set-flag priority NUMBER PKGNAME’ to change the priority of one of the conflicting packages
builder for ‘/nix/store/x5f7j9s6x55h84661qkr8i1pba06cnq8-user-environment.drv’ failed with exit code 2
error: build of ‘/nix/store/x5f7j9s6x55h84661qkr8i1pba06cnq8-user-environment.drv’ failed

Is there a way to define priority or so?

Add NixOS module to configure users with home manager

It would be quite nice to be able to set up the user environment directly from the system configuration. Especially when creating containers.

In principle this should be relatively simple to do by hooking in the Home Manager activation script in the NixOS activation script. It may be trickier in practice, though…

Add more documentation about xsession

I want to use home manager for X related stuff and I'm not sure how, despite the note in the README about disabling the NixOS-wide window manager properties. I added the following to my home.nix file:

  xsession.enable = true;
  xsession.windowManager = "${pkgs.i3}/bin/i3";

And in my configuration.nix, I just enabled the X server. On boot, I was then greeted by my desktop manager, which only had "xterm" as session type to offer. Shouldn't there be "xsession" or something? I had a valid ~/.xsession present, so that much worked

NixOS module doesn't work on the first deployment

This isn't really a home-manager issue, but it's something that home-manager users would have an interest in.

/nix/var/nix/profiles/per-user/foo doesn't exist on a nixops deployment until the user foo has logged in at least once.

So that means that currently it's not possible to use the nixos module in a nixops deployment unless the declaratively specified user has logged in at least once.

For example:

$ ./nixops deploy -d temmie.local --show-trace
added deployment ‘3179b275-8ed2-11e7-8571-38c9863138b9’
added deployment ‘184c6cee-4bde-11e7-8fb6-38c9863138b9’
added deployment ‘c64dea7d-ec30-11e6-b8ec-00163ee05055’
added deployment ‘1c4eb6f0-78d7-11e7-bc19-38c9863138b9’
added deployment ‘6d19d86e-b44e-11e7-8534-38c9863138b9’
added deployment ‘73f0dd4f-7645-11e7-9e05-38c9863138b9’
added deployment ‘c762b1e8-728d-11e7-a2a7-38c9863138b9’
added deployment ‘1d95f44a-83a7-11e6-a717-00163ee05055’
building all machine configurations...
temmie> copying closure...
temmie.local> closures copied successfully
temmie> updating GRUB 2 menu...
temmie> activating the configuration...
temmie> setting up /etc...
temmie> Activating home-manager configuration for mango
temmie> find: ‘/nix/var/nix/profiles/per-user/mango’: No such file or directory
temmie> setting up tmpfiles
temmie> the following new units were started: get-vbox-nixops-client-key.service
temmie> error: Traceback (most recent call last):
  File "/nix/store/mb6hkffmcfzs64aagk6qxild4yz8vhbn-nixops-2017-05-22/lib/python2.7/site-packages/nixops/deployment.py", line 705, in worker
    raise Exception("unable to activate new configuration")
Exception: unable to activate new configuration

error: activation of 1 of 1 machines failed (namely on ‘temmie’)

...

$ ./nixops ssh -d temmie.local temmieadded deployment ‘3179b275-8ed2-11e7-8571-38c9863138b9’
added deployment ‘184c6cee-4bde-11e7-8fb6-38c9863138b9’
added deployment ‘c64dea7d-ec30-11e6-b8ec-00163ee05055’
added deployment ‘1c4eb6f0-78d7-11e7-bc19-38c9863138b9’
added deployment ‘6d19d86e-b44e-11e7-8534-38c9863138b9’
added deployment ‘73f0dd4f-7645-11e7-9e05-38c9863138b9’
added deployment ‘c762b1e8-728d-11e7-a2a7-38c9863138b9’
added deployment ‘1d95f44a-83a7-11e6-a717-00163ee05055’
Last login: Fri Oct 27 00:30:05 2017 from 192.168.56.1

[root@temmie:~]# su mango
mango@temmie> ls /nix/var/nix/profiles/per-user/                                                 /root
mango  root

...

$ ./nixops deploy -d temmie.local --show-trace
added deployment ‘3179b275-8ed2-11e7-8571-38c9863138b9’
added deployment ‘184c6cee-4bde-11e7-8fb6-38c9863138b9’
added deployment ‘c64dea7d-ec30-11e6-b8ec-00163ee05055’
added deployment ‘1c4eb6f0-78d7-11e7-bc19-38c9863138b9’
added deployment ‘6d19d86e-b44e-11e7-8534-38c9863138b9’
added deployment ‘73f0dd4f-7645-11e7-9e05-38c9863138b9’
added deployment ‘c762b1e8-728d-11e7-a2a7-38c9863138b9’
added deployment ‘1d95f44a-83a7-11e6-a717-00163ee05055’
building all machine configurations...
temmie> copying closure...
temmie.local> closures copied successfully
temmie> updating GRUB 2 menu...
temmie> activating the configuration...
temmie> setting up /etc...
temmie> Activating home-manager configuration for mango
temmie> Starting home manager activation
temmie> Activating checkLinkTargets
temmie> Activating writeBoundary
temmie> Activating installPackages
temmie> Activating linkGeneration
temmie> Creating profile generation 1
temmie> setting up tmpfiles
temmie> the following new units were started: get-vbox-nixops-client-key.service
temmie> activation finished successfully
temmie.local> deployment finished successfully

How are nixos/nixpkgs upgrade handled?

I see, why you focused on 17.03 in the beginning.
But how do you plan to upgrade to 17.09 and forth?
In other words, I would volunteer to contribute to an unstable branch to provide better upgrade experience.

Add "icon-theme-path" option for dunst

As I understand icons located at

 ~/.config/dotfiles   master ●✚  la /run/current-system/sw/share/icons/
total 28K
lrwxrwxrwx  1 root root   89 Jan  1  1970 Adwaita -> /nix/store/jzvcymxicsa2b0l2fmr6zjk976r52vdm-adwaita-icon-theme-3.24.0/share/icons/Adwaita/
dr-xr-xr-x 15 root root 4.0K Jan  1  1970 hicolor/
dr-xr-xr-x  9 root root 4.0K Jan  1  1970 HighContrast/
lrwxrwxrwx  1 root root  101 Jan  1  1970 Numix-Circle -> /nix/store/782wvc5fvyy72jg04rkf8p43lk9wbhn6-numix-icon-theme-circle-17-09-13/share/icons/Numix-Circle/
lrwxrwxrwx  1 root root  107 Jan  1  1970 Numix-Circle-Light -> /nix/store/782wvc5fvyy72jg04rkf8p43lk9wbhn6-numix-icon-theme-circle-17-09-13/share/icons/Numix-Circle-Light/
lrwxrwxrwx  1 root root   85 Jan  1  1970 Vanilla-DMZ -> /nix/store/2nj0yjgyajj3b3dzic6a1167hrm729sd-vanilla-dmz-0.4.4/share/icons/Vanilla-DMZ/
lrwxrwxrwx  1 root root   88 Jan  1  1970 Vanilla-DMZ-AA -> /nix/store/2nj0yjgyajj3b3dzic6a1167hrm729sd-vanilla-dmz-0.4.4/share/icons/Vanilla-DMZ-AA/
 ~/.config/dotfiles   master ●✚  la /run/current-system/sw/share/icons/Adwaita/16x16
total 68K
dr-xr-xr-x 2 root root  20K Jan  1  1970 actions/
dr-xr-xr-x 2 root root 4.0K Jan  1  1970 apps/
dr-xr-xr-x 2 root root 4.0K Jan  1  1970 categories/
dr-xr-xr-x 2 root root 4.0K Jan  1  1970 devices/
dr-xr-xr-x 2 root root 4.0K Jan  1  1970 emblems/
dr-xr-xr-x 2 root root 4.0K Jan  1  1970 emotes/
dr-xr-xr-x 2 root root 4.0K Jan  1  1970 mimetypes/
dr-xr-xr-x 2 root root 4.0K Jan  1  1970 places/
dr-xr-xr-x 2 root root  20K Jan  1  1970 status/

What if option icon-theme-path = "/run/current-system/sw/share/icons/Adwaita/16x16/" would list all folders in "icon-theme-path" to ~/.config/dunst/dunstrc like this

icon_folders = /run/current-system/sw/share/icons/Adwaita/16x16/actions/:/run/current-system/sw/share/icons/Adwaita/16x16/apps/:....

[Feature Request] Symlink source trees into homedir

I'd like to be able to do something like the following:

home.file.".tmux/plugins/tmux-resurrect".source = fetchFromGitHub {
    owner = "tmux-plugins";
    repo = "tmux-resurrect";
    rev = "b8cc90a7f4db209d6c25d4156f8f236eec3b1dca";
    sha256 = "0bhgwg5za4mga11fd7wnr8zikcnrdaahaficfylfmggb46mxnbhs";
  };

But the invocation of install chokes on directories. What's the best way to add support for linking repo checkouts into the home directory tree? I naively tried changing install to ln -sf, but then the activate script didn't copy them into the homedir.

i3: add missing options

@uvNikita Hi, I'm moving my i3 configuration (that was something like 600+ lines) to the home-manager module.
Instead of opening multiple issues, I'll add to this one the things I'm missing
For now I miss the option:
hide_edge_borders none|vertical|horizontal|both|smart
and
mouse_warping output|none.

I could use the extraConfig option, but since there are that many (like window.titlebar) adding the few missing might be feasible. Let me know.

Also, I'm missing the bindcode (similar to bindsym but expects a keycode instead of a key combination).

Last, it seems to miss also the for_window option

PS: how do I disable the i3bar (to use polybar instead)? -- answering to myself: set it to empty list

I'm sorry to bother you, but except for those I find this nix config easier to maintain than the i3 one
Thanks!

edit: changed the config file length estimation, I was a bit off XD
edit: add question on bar

home-manager and plasma5

I'm trying to run home-manager together with plasma5, but can't figure out what I should specify in xsession.windowManager option. I've tried ${pkgs.kwin}/bin/kwin_x11, but it didn't work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.