Compare commits
35 commits
master
...
release-21
Author | SHA1 | Date | |
---|---|---|---|
454abeb5a8 | |||
7329ffc6e9 | |||
7efd99ef87 | |||
5721e19975 | |||
2a8974098b | |||
bcf03fa16a | |||
4f1f57deca | |||
ff2bed9dac | |||
49695f33aa | |||
68ec2dd609 | |||
382505714d | |||
0e58ffec58 | |||
7d9ba15214 | |||
f5adb9be82 | |||
9f2b766d0f | |||
b39647e52e | |||
9c0abed522 | |||
03db229cc2 | |||
88de11327c | |||
35a24648d1 | |||
d370447e28 | |||
2bfad60b73 | |||
8d64c164fc | |||
ffd6c84c25 | |||
d40f84a340 | |||
148d85ee83 | |||
fd5fbb0a24 | |||
0ff5951285 | |||
b8edffb918 | |||
cd33531e59 | |||
8c72c4f981 | |||
bfb65f2d8d | |||
913f722560 | |||
2f997178fa | |||
ffd4d9955b |
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -84,6 +84,8 @@
|
||||||
|
|
||||||
/modules/programs/i3status-rust.nix @workflow
|
/modules/programs/i3status-rust.nix @workflow
|
||||||
|
|
||||||
|
/modules/programs/java.nix @ShamrockLee
|
||||||
|
|
||||||
/modules/programs/keychain.nix @marsam
|
/modules/programs/keychain.nix @marsam
|
||||||
|
|
||||||
/modules/programs/lazygit.nix @kalhauge
|
/modules/programs/lazygit.nix @kalhauge
|
||||||
|
|
15
.github/ISSUE_TEMPLATE.md
vendored
15
.github/ISSUE_TEMPLATE.md
vendored
|
@ -1,15 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
If you are encountering the error
|
Don't forget to check if there already exists a relevant issue before
|
||||||
|
creating a new one.
|
||||||
element xref: validity error : IDREF attribute linkend references an unknown ID "opt-home.file._name__.source"
|
|
||||||
|
|
||||||
then it means that you are using an old version of Home Manager, such
|
|
||||||
as the release-20.03 branch, with a recent version of Nixpkgs, such as
|
|
||||||
version 20.09 or master. See https://git.io/JTb6K for more.
|
|
||||||
|
|
||||||
In general, please check if there already exists a relevant issue
|
|
||||||
before creating a new one.
|
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
@ -17,7 +9,8 @@ before creating a new one.
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Please describe the issue. For support and help please use the IRC
|
Please describe the issue. For support and help please use the IRC
|
||||||
channel #home-manager @ freenode.net instead.
|
channel #home-manager at irc.oftc.net or Matrix room
|
||||||
|
https://matrix.to/#/#hm:rycee.net instead.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
### Meta
|
### Meta
|
||||||
|
|
4
.github/workflows/github_pages.yml
vendored
4
.github/workflows/github_pages.yml
vendored
|
@ -10,8 +10,8 @@ jobs:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: cachix/install-nix-action@v13
|
- uses: cachix/install-nix-action@v16
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- uses: cachix/cachix-action@v10
|
- uses: cachix/cachix-action@v10
|
||||||
|
|
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
|
@ -10,10 +10,11 @@ jobs:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: cachix/install-nix-action@v13
|
- uses: cachix/install-nix-action@v16
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
install_url: https://releases.nixos.org/nix/nix-2.3.16/install
|
||||||
|
nix_path: nixpkgs=channel:nixos-21.05
|
||||||
- uses: cachix/cachix-action@v10
|
- uses: cachix/cachix-action@v10
|
||||||
with:
|
with:
|
||||||
name: nix-community
|
name: nix-community
|
||||||
|
|
12
README.md
12
README.md
|
@ -32,7 +32,7 @@ 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
|
that it is about to be overwritten was from a previous Home Manager
|
||||||
generation or from manual configuration.
|
generation or from manual configuration.
|
||||||
|
|
||||||
Home Manager targets [NixOS][] unstable and NixOS version 20.09 (the
|
Home Manager targets [NixOS][] unstable and NixOS version 21.05 (the
|
||||||
current stable version), it may or may not work on other Linux
|
current stable version), it may or may not work on other Linux
|
||||||
distributions and NixOS versions.
|
distributions and NixOS versions.
|
||||||
|
|
||||||
|
@ -75,10 +75,10 @@ Currently the easiest way to install Home Manager is as follows:
|
||||||
$ nix-channel --update
|
$ nix-channel --update
|
||||||
```
|
```
|
||||||
|
|
||||||
and if you follow a Nixpkgs version 20.09 channel you can run
|
and if you follow a Nixpkgs version 21.05 channel you can run
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-20.09.tar.gz home-manager
|
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
|
||||||
$ nix-channel --update
|
$ nix-channel --update
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ configuration generations.
|
||||||
As an example, let us expand the initial configuration file from the
|
As an example, let us expand the initial configuration file from the
|
||||||
installation above to install the htop and fortune packages, install
|
installation above to install the htop and fortune packages, install
|
||||||
Emacs with a few extra packages enabled, install Firefox with
|
Emacs with a few extra packages enabled, install Firefox with
|
||||||
smooth scrolling enabled, and enable the user gpg-agent service.
|
smooth scrolling disabled, and enable the user gpg-agent service.
|
||||||
|
|
||||||
To satisfy the above setup we should elaborate the
|
To satisfy the above setup we should elaborate the
|
||||||
`~/.config/nixpkgs/home.nix` file as follows:
|
`~/.config/nixpkgs/home.nix` file as follows:
|
||||||
|
@ -279,7 +279,7 @@ then result in
|
||||||
$ home-manager switch
|
$ home-manager switch
|
||||||
…
|
…
|
||||||
Activating checkLinkTargets
|
Activating checkLinkTargets
|
||||||
Existing file '/home/jdoe/.gitconfig' is in the way
|
Existing file '/home/jdoe/.config/git/config' is in the way
|
||||||
Please move the above files and try again
|
Please move the above files and try again
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ Home Manager is developed against `nixpkgs-unstable` branch, which
|
||||||
often causes it to contain tweaks for changes/packages not yet
|
often causes it to contain tweaks for changes/packages not yet
|
||||||
released in stable NixOS. To avoid breaking users' configurations,
|
released in stable NixOS. To avoid breaking users' configurations,
|
||||||
Home Manager is released in branches corresponding to NixOS releases
|
Home Manager is released in branches corresponding to NixOS releases
|
||||||
(e.g. `release-20.09`). These branches get fixes, but usually not new
|
(e.g. `release-21.05`). These branches get fixes, but usually not new
|
||||||
modules. If you need a module to be backported, then feel free to open
|
modules. If you need a module to be backported, then feel free to open
|
||||||
an issue.
|
an issue.
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.
|
||||||
The solution on NixOS is to add
|
The solution on NixOS is to add
|
||||||
|
|
||||||
[source,nix]
|
[source,nix]
|
||||||
services.dbus.packages = with pkgs; [ gnome3.dconf ];
|
services.dbus.packages = with pkgs; [ gnome.dconf ];
|
||||||
|
|
||||||
to your system configuration.
|
to your system configuration.
|
||||||
|
|
||||||
|
|
|
@ -47,11 +47,11 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
|
||||||
$ nix-channel --update
|
$ nix-channel --update
|
||||||
----
|
----
|
||||||
+
|
+
|
||||||
and if you follow a Nixpkgs version 20.09 channel, you can run
|
and if you follow a Nixpkgs version 21.05 channel, you can run
|
||||||
+
|
+
|
||||||
[source,console]
|
[source,console]
|
||||||
----
|
----
|
||||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-20.09.tar.gz home-manager
|
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
|
||||||
$ nix-channel --update
|
$ nix-channel --update
|
||||||
----
|
----
|
||||||
+
|
+
|
||||||
|
@ -125,11 +125,11 @@ or an unstable channel, you can run
|
||||||
# nix-channel --update
|
# nix-channel --update
|
||||||
----
|
----
|
||||||
|
|
||||||
and if you follow a Nixpkgs version 20.09 channel, you can run
|
and if you follow a Nixpkgs version 21.05 channel, you can run
|
||||||
|
|
||||||
[source,console]
|
[source,console]
|
||||||
----
|
----
|
||||||
# nix-channel --add https://github.com/nix-community/home-manager/archive/release-20.09.tar.gz home-manager
|
# nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
|
||||||
# nix-channel --update
|
# nix-channel --update
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -203,11 +203,11 @@ or an unstable channel, you can run
|
||||||
# nix-channel --update
|
# nix-channel --update
|
||||||
----
|
----
|
||||||
|
|
||||||
and if you follow a Nixpkgs version 20.09 channel, you can run
|
and if you follow a Nixpkgs version 21.05 channel, you can run
|
||||||
|
|
||||||
[source,console]
|
[source,console]
|
||||||
----
|
----
|
||||||
# nix-channel --add https://github.com/nix-community/home-manager/archive/release-20.09.tar.gz home-manager
|
# nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
|
||||||
# nix-channel --update
|
# nix-channel --update
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
@ -12,47 +12,47 @@
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>home-manager</command> <group choice="req">
|
<command>home-manager</command> <group choice="req">
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
build
|
build
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
instantiate
|
instantiate
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
edit
|
edit
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
expire-generations <replaceable>timestamp</replaceable>
|
expire-generations <replaceable>timestamp</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
generations
|
generations
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
help
|
help
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
news
|
news
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
packages
|
packages
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
remove-generations <replaceable>ID …</replaceable>
|
remove-generations <replaceable>ID …</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
switch
|
switch
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
uninstall
|
uninstall
|
||||||
</arg>
|
</arg>
|
||||||
|
@ -61,63 +61,63 @@
|
||||||
<arg>
|
<arg>
|
||||||
-A <replaceable>attrPath</replaceable>
|
-A <replaceable>attrPath</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
-I <replaceable>path</replaceable>
|
-I <replaceable>path</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
--flake <replaceable>flake-uri</replaceable>
|
--flake <replaceable>flake-uri</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
-b <replaceable>ext</replaceable>
|
-b <replaceable>ext</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
<group choice="req">
|
<group choice="req">
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
-f
|
-f
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
--file
|
--file
|
||||||
</arg>
|
</arg>
|
||||||
</group> <replaceable>path</replaceable>
|
</group> <replaceable>path</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
<group choice="req">
|
<group choice="req">
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
-h
|
-h
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
--help
|
--help
|
||||||
</arg>
|
</arg>
|
||||||
</group>
|
</group>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
<group choice="req">
|
<group choice="req">
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
-n
|
-n
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
--dry-run
|
--dry-run
|
||||||
</arg>
|
</arg>
|
||||||
</group>
|
</group>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
--option <replaceable>name</replaceable> <replaceable>value</replaceable>
|
--option <replaceable>name</replaceable> <replaceable>value</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
--cores <replaceable>number</replaceable>
|
--cores <replaceable>number</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
<group choice="req">
|
<group choice="req">
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
|
@ -130,29 +130,33 @@
|
||||||
</group>
|
</group>
|
||||||
<replaceable>number</replaceable>
|
<replaceable>number</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
|
<arg>
|
||||||
|
--debug
|
||||||
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
--keep-failed
|
--keep-failed
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
--keep-going
|
--keep-going
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
--show-trace
|
--show-trace
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
--(no-)substitute
|
--(no-)substitute
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
<group choice="req">
|
<group choice="req">
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
-v
|
-v
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice="plain">
|
<arg choice="plain">
|
||||||
--verbose
|
--verbose
|
||||||
</arg>
|
</arg>
|
||||||
|
@ -456,6 +460,18 @@
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<option>--debug</option>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Passed on to <citerefentry>
|
||||||
|
<refentrytitle>nix-build</refentrytitle>
|
||||||
|
<manvolnum>1</manvolnum> </citerefentry>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<option>--keep-failed</option>
|
<option>--keep-failed</option>
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
[[sec-release-21.05]]
|
[[sec-release-21.05]]
|
||||||
== Release 21.05
|
== Release 21.05
|
||||||
|
|
||||||
This is the current unstable branch and the information in this
|
The 21.05 release branch became the stable branch in May, 2021.
|
||||||
section is therefore not final.
|
|
||||||
|
|
||||||
[[sec-release-21.05-highlights]]
|
[[sec-release-21.05-highlights]]
|
||||||
=== Highlights
|
=== Highlights
|
||||||
|
|
|
@ -285,8 +285,8 @@ _home-manager_completions ()
|
||||||
#--------------------------#
|
#--------------------------#
|
||||||
|
|
||||||
local Options
|
local Options
|
||||||
Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" "--verbose" "--show-trace" \
|
Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" "--verbose" \
|
||||||
"-j" "--max-jobs" )
|
"--cores" "--debug" "--keep-failed" "--keep-going" "-j" "--max-jobs" "--no-substitute" "--show-trace" "--substitute")
|
||||||
|
|
||||||
# ^ « home-manager »'s options.
|
# ^ « home-manager »'s options.
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ _arguments \
|
||||||
'-I[search path]:PATH:_files -/' \
|
'-I[search path]:PATH:_files -/' \
|
||||||
'-b[backup files]:EXT:()' \
|
'-b[backup files]:EXT:()' \
|
||||||
'--cores[cores]:NUM:()' \
|
'--cores[cores]:NUM:()' \
|
||||||
|
'--debug[debug]' \
|
||||||
'--keep-failed[keep failed]' \
|
'--keep-failed[keep failed]' \
|
||||||
'--keep-going[keep going]' \
|
'--keep-going[keep going]' \
|
||||||
'(-h --help)'{--help,-h}'[help]' \
|
'(-h --help)'{--help,-h}'[help]' \
|
||||||
|
@ -42,11 +43,14 @@ case "$state" in
|
||||||
build|switch)
|
build|switch)
|
||||||
_arguments \
|
_arguments \
|
||||||
'--cores[cores]:NUM:()' \
|
'--cores[cores]:NUM:()' \
|
||||||
|
'--debug[debug]' \
|
||||||
'--keep-failed[keep failed]' \
|
'--keep-failed[keep failed]' \
|
||||||
'--keep-going[keep going]' \
|
'--keep-going[keep going]' \
|
||||||
'--max-jobs[max jobs]:NUM:()' \
|
'--max-jobs[max jobs]:NUM:()' \
|
||||||
|
'--no-substitute[no substitute]' \
|
||||||
'--option[option]:NAME VALUE:()' \
|
'--option[option]:NAME VALUE:()' \
|
||||||
'--show-trace[show trace]'
|
'--show-trace[show trace]' \
|
||||||
|
'--substitute[substitute]'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -473,6 +473,7 @@ function doHelp() {
|
||||||
echo
|
echo
|
||||||
echo " --arg(str) NAME VALUE Override inputs passed to home-manager.nix"
|
echo " --arg(str) NAME VALUE Override inputs passed to home-manager.nix"
|
||||||
echo " --cores NUM"
|
echo " --cores NUM"
|
||||||
|
echo " --debug"
|
||||||
echo " --keep-failed"
|
echo " --keep-failed"
|
||||||
echo " --keep-going"
|
echo " --keep-going"
|
||||||
echo " -j, --max-jobs NUM"
|
echo " -j, --max-jobs NUM"
|
||||||
|
@ -572,7 +573,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
PASSTHROUGH_OPTS+=("$opt" "$1")
|
PASSTHROUGH_OPTS+=("$opt" "$1")
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--keep-failed|--keep-going|--show-trace\
|
--debug|--keep-failed|--keep-going|--show-trace\
|
||||||
|--substitute|--no-substitute)
|
|--substitute|--no-substitute)
|
||||||
PASSTHROUGH_OPTS+=("$opt")
|
PASSTHROUGH_OPTS+=("$opt")
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -236,12 +236,22 @@ in
|
||||||
|
|
||||||
home.activation.checkFilesChanged = hm.dag.entryBefore ["linkGeneration"] (
|
home.activation.checkFilesChanged = hm.dag.entryBefore ["linkGeneration"] (
|
||||||
''
|
''
|
||||||
|
function _cmp() {
|
||||||
|
if [[ -d $1 && -d $2 ]]; then
|
||||||
|
diff -rq "$1" "$2" &> /dev/null
|
||||||
|
else
|
||||||
|
cmp --quiet "$1" "$2"
|
||||||
|
fi
|
||||||
|
}
|
||||||
declare -A changedFiles
|
declare -A changedFiles
|
||||||
'' + concatMapStrings (v: ''
|
'' + concatMapStrings (v: ''
|
||||||
cmp --quiet "${sourceStorePath v}" "${homeDirectory}/${v.target}" \
|
_cmp "${sourceStorePath v}" "${homeDirectory}/${v.target}" \
|
||||||
&& changedFiles["${v.target}"]=0 \
|
&& changedFiles["${v.target}"]=0 \
|
||||||
|| changedFiles["${v.target}"]=1
|
|| changedFiles["${v.target}"]=1
|
||||||
'') (filter (v: v.onChange != "") (attrValues cfg))
|
'') (filter (v: v.onChange != "") (attrValues cfg))
|
||||||
|
+ ''
|
||||||
|
unset -f _cmp
|
||||||
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
home.activation.onFilesChange = hm.dag.entryAfter ["linkGeneration"] (
|
home.activation.onFilesChange = hm.dag.entryAfter ["linkGeneration"] (
|
||||||
|
|
|
@ -82,6 +82,9 @@ with lib;
|
||||||
generations. The script will be run
|
generations. The script will be run
|
||||||
<emphasis>after</emphasis> the new files have been linked
|
<emphasis>after</emphasis> the new files have been linked
|
||||||
into place.
|
into place.
|
||||||
|
</para><para>
|
||||||
|
Note, this code is always run when <literal>recursive</literal> is
|
||||||
|
enabled.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ let
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.nullOr types.package;
|
type = types.nullOr types.package;
|
||||||
default = null;
|
default = null;
|
||||||
example = literalExample "pkgs.gnome3.gnome_themes_standard";
|
example = literalExample "pkgs.gnome.gnome_themes_standard";
|
||||||
description = ''
|
description = ''
|
||||||
Package providing the theme. This package will be installed
|
Package providing the theme. This package will be installed
|
||||||
to your profile. If <literal>null</literal> then the theme
|
to your profile. If <literal>null</literal> then the theme
|
||||||
|
|
|
@ -2047,6 +2047,13 @@ in
|
||||||
configuration file.
|
configuration file.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2021-10-03T20:00:52+00:00";
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'programs.java'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,7 @@ let
|
||||||
(loadModule ./programs/info.nix { })
|
(loadModule ./programs/info.nix { })
|
||||||
(loadModule ./programs/irssi.nix { })
|
(loadModule ./programs/irssi.nix { })
|
||||||
(loadModule ./programs/lieer.nix { })
|
(loadModule ./programs/lieer.nix { })
|
||||||
|
(loadModule ./programs/java.nix { })
|
||||||
(loadModule ./programs/jq.nix { })
|
(loadModule ./programs/jq.nix { })
|
||||||
(loadModule ./programs/kakoune.nix { })
|
(loadModule ./programs/kakoune.nix { })
|
||||||
(loadModule ./programs/keychain.nix { })
|
(loadModule ./programs/keychain.nix { })
|
||||||
|
|
|
@ -114,10 +114,12 @@ let
|
||||||
brave = "BraveSoftware/Brave-Browser";
|
brave = "BraveSoftware/Brave-Browser";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
linuxDirs = { brave = "BraveSoftware/Brave-Browser"; };
|
||||||
|
|
||||||
configDir = if pkgs.stdenv.isDarwin then
|
configDir = if pkgs.stdenv.isDarwin then
|
||||||
"Library/Application Support/${getAttr browser darwinDirs}"
|
"Library/Application Support/" + (darwinDirs."${browser}" or browser)
|
||||||
else
|
else
|
||||||
"${config.xdg.configHome}/${browser}";
|
"${config.xdg.configHome}/" + (linuxDirs."${browser}" or browser);
|
||||||
|
|
||||||
extensionJson = ext:
|
extensionJson = ext:
|
||||||
assert ext.crxPath != null -> ext.version != null;
|
assert ext.crxPath != null -> ext.version != null;
|
||||||
|
|
|
@ -9,6 +9,14 @@ let
|
||||||
tomlFormat = pkgs.formats.toml { };
|
tomlFormat = pkgs.formats.toml { };
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
imports = [
|
||||||
|
(mkRenamedOptionModule [
|
||||||
|
"programs"
|
||||||
|
"direnv"
|
||||||
|
"enableNixDirenvIntegration"
|
||||||
|
] [ "programs" "direnv" "nix-direnv" "enable" ])
|
||||||
|
];
|
||||||
|
|
||||||
meta.maintainers = [ maintainers.rycee ];
|
meta.maintainers = [ maintainers.rycee ];
|
||||||
|
|
||||||
options.programs.direnv = {
|
options.programs.direnv = {
|
||||||
|
@ -63,10 +71,14 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
enableNixDirenvIntegration = mkEnableOption ''
|
nix-direnv = {
|
||||||
<link
|
enable = mkEnableOption ''
|
||||||
xlink:href="https://github.com/nix-community/nix-direnv">nix-direnv</link>,
|
<link
|
||||||
a fast, persistent use_nix implementation for direnv'';
|
xlink:href="https://github.com/nix-community/nix-direnv">nix-direnv</link>,
|
||||||
|
a fast, persistent use_nix implementation for direnv'';
|
||||||
|
enableFlakes = mkEnableOption "Flake support in nix-direnv";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -77,9 +89,11 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."direnv/direnvrc" = let
|
xdg.configFile."direnv/direnvrc" = let
|
||||||
|
package =
|
||||||
|
pkgs.nix-direnv.override { inherit (cfg.nix-direnv) enableFlakes; };
|
||||||
text = concatStringsSep "\n" (optional (cfg.stdlib != "") cfg.stdlib
|
text = concatStringsSep "\n" (optional (cfg.stdlib != "") cfg.stdlib
|
||||||
++ optional cfg.enableNixDirenvIntegration
|
++ optional cfg.nix-direnv.enable
|
||||||
"source ${pkgs.nix-direnv}/share/nix-direnv/direnvrc");
|
"source ${package}/share/nix-direnv/direnvrc");
|
||||||
in mkIf (text != "") { inherit text; };
|
in mkIf (text != "") { inherit text; };
|
||||||
|
|
||||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration (
|
programs.bash.initExtra = mkIf cfg.enableBashIntegration (
|
||||||
|
|
|
@ -315,7 +315,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.gnome3.gnome-terminal ];
|
home.packages = [ pkgs.gnome.gnome-terminal ];
|
||||||
|
|
||||||
dconf.settings = let dconfPath = "org/gnome/terminal/legacy";
|
dconf.settings = let dconfPath = "org/gnome/terminal/legacy";
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -10,10 +10,14 @@ let
|
||||||
let v' = if isBool v then (if v then "1" else "0") else toString v;
|
let v' = if isBool v then (if v then "1" else "0") else toString v;
|
||||||
in "${n}=${v'}";
|
in "${n}=${v'}";
|
||||||
|
|
||||||
formatMeters = side: meters: {
|
formatMeters = side: meters:
|
||||||
"${side}_meters" = mapAttrsToList (x: _: x) meters;
|
let
|
||||||
"${side}_meter_modes" = mapAttrsToList (_: y: y) meters;
|
warn' = warn "htop: meters should be passed as a list";
|
||||||
};
|
meters' = if isList meters then meters else warn' [ meters ];
|
||||||
|
in {
|
||||||
|
"${side}_meters" = concatMap (mapAttrsToList (x: _: x)) meters';
|
||||||
|
"${side}_meter_modes" = concatMap (mapAttrsToList (_: y: y)) meters';
|
||||||
|
};
|
||||||
leftMeters = formatMeters "left";
|
leftMeters = formatMeters "left";
|
||||||
rightMeters = formatMeters "right";
|
rightMeters = formatMeters "right";
|
||||||
|
|
||||||
|
@ -80,6 +84,14 @@ let
|
||||||
LED = 4;
|
LED = 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Utilities for constructing meters
|
||||||
|
meter = mode: name: { ${name} = mode; };
|
||||||
|
bar = meter modes.Bar;
|
||||||
|
text = meter modes.Text;
|
||||||
|
graph = meter modes.Graph;
|
||||||
|
led = meter modes.LED;
|
||||||
|
blank = text "Blank";
|
||||||
|
|
||||||
# Mapping from names to defaults
|
# Mapping from names to defaults
|
||||||
meters = {
|
meters = {
|
||||||
Clock = 2;
|
Clock = 2;
|
||||||
|
@ -231,15 +243,17 @@ in {
|
||||||
tree_view = false;
|
tree_view = false;
|
||||||
update_process_names = false;
|
update_process_names = false;
|
||||||
vim_mode = false;
|
vim_mode = false;
|
||||||
} // (leftMeters {
|
} // (leftMeters [
|
||||||
AllCPUs = modes.Bar;
|
(bar "AllCPUs2")
|
||||||
Memory = modes.Bar;
|
(bar "Memory")
|
||||||
Swap = modes.Bar;
|
(bar "Swap")
|
||||||
}) // (rightMeters {
|
(text "Zram")
|
||||||
Tasks = modes.Text;
|
]) // (rightMeters [
|
||||||
LoadAverage = modes.Text;
|
(text "Tasks")
|
||||||
Uptime = modes.Text;
|
(text "LoadAverage")
|
||||||
});
|
(text "Uptime")
|
||||||
|
(text "Systemd")
|
||||||
|
]);
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
{
|
{
|
||||||
color_scheme = 6;
|
color_scheme = 6;
|
||||||
|
@ -262,17 +276,17 @@ in {
|
||||||
highlight_base_name = 1;
|
highlight_base_name = 1;
|
||||||
highlight_megabytes = 1;
|
highlight_megabytes = 1;
|
||||||
highlight_threads = 1;
|
highlight_threads = 1;
|
||||||
} // (with config.lib.htop; leftMeters {
|
} // (with config.lib.htop; leftMeters [
|
||||||
AllCPUs2 = modes.Bar;
|
(bar "AllCPUs2")
|
||||||
Memory = modes.Bar;
|
(bar "Memory")
|
||||||
Swap = modes.Bar;
|
(bar "Swap")
|
||||||
Zram = modes.Text;
|
(text "Zram")
|
||||||
}) // (with config.lib.htop; rightMeters {
|
]) // (with config.lib.htop; rightMeters [
|
||||||
Tasks = modes.Text;
|
(text "Tasks")
|
||||||
LoadAverage = modes.Text;
|
(text "LoadAverage")
|
||||||
Uptime = modes.Text;
|
(text "Uptime")
|
||||||
Systemd = modes.Text;
|
(text "Systemd")
|
||||||
})
|
]);
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration options to add to
|
Configuration options to add to
|
||||||
|
@ -576,7 +590,9 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
lib.htop = { inherit fields modes leftMeters rightMeters; };
|
lib.htop = {
|
||||||
|
inherit fields modes leftMeters rightMeters bar text graph led blank;
|
||||||
|
};
|
||||||
|
|
||||||
home.packages = [ pkgs.htop ];
|
home.packages = [ pkgs.htop ];
|
||||||
|
|
||||||
|
@ -607,45 +623,53 @@ in {
|
||||||
rightModes = deprecate "right_meter_modes" "meters.right"
|
rightModes = deprecate "right_meter_modes" "meters.right"
|
||||||
(ifNonNull cfg.meters (map (m: m.mode) cfg.meters.right));
|
(ifNonNull cfg.meters (map (m: m.mode) cfg.meters.right));
|
||||||
|
|
||||||
settings' = cfg.settings // (filterAttrs (_: v: !isNull v) {
|
before = optionalAttrs (cfg.settings ? header_layout) {
|
||||||
fields = deprecate "fields" "fields"
|
inherit (cfg.settings) header_layout;
|
||||||
(ifNonNull cfg.fields (map (n: fields.${n}) cfg.fields));
|
};
|
||||||
sort_key = deprecate "sort_key" "sortKey"
|
|
||||||
(ifNonNull cfg.sortKey fields.${cfg.sortKey});
|
settings' = (removeAttrs cfg.settings (attrNames before))
|
||||||
sort_direction = deprecate' "sort_direction" "sortDescending";
|
// (filterAttrs (_: v: !isNull v) {
|
||||||
hide_threads = deprecate' "hide_threads" "hideThreads";
|
fields = deprecate "fields" "fields"
|
||||||
hide_kernel_threads =
|
(ifNonNull cfg.fields (map (n: fields.${n}) cfg.fields));
|
||||||
deprecate' "hide_kernel_threads" "hideKernelThreads";
|
sort_key = deprecate "sort_key" "sortKey"
|
||||||
hide_userland_threads =
|
(ifNonNull cfg.sortKey fields.${cfg.sortKey});
|
||||||
deprecate' "hide_userland_threads" "hideUserlandThreads";
|
sort_direction = deprecate' "sort_direction" "sortDescending";
|
||||||
shadow_other_users = deprecate' "shadow_other_users" "shadowOtherUsers";
|
hide_threads = deprecate' "hide_threads" "hideThreads";
|
||||||
show_thread_names = deprecate' "show_thread_names" "showThreadNames";
|
hide_kernel_threads =
|
||||||
show_program_path = deprecate' "show_program_path" "showProgramPath";
|
deprecate' "hide_kernel_threads" "hideKernelThreads";
|
||||||
highlight_base_name =
|
hide_userland_threads =
|
||||||
deprecate' "highlight_base_name" "highlightBaseName";
|
deprecate' "hide_userland_threads" "hideUserlandThreads";
|
||||||
highlight_megabytes =
|
shadow_other_users =
|
||||||
deprecate' "highlight_megabytes" "highlightMegabytes";
|
deprecate' "shadow_other_users" "shadowOtherUsers";
|
||||||
highlight_threads = deprecate' "highlight_threads" "highlightThreads";
|
show_thread_names = deprecate' "show_thread_names" "showThreadNames";
|
||||||
tree_view = deprecate' "tree_view" "treeView";
|
show_program_path = deprecate' "show_program_path" "showProgramPath";
|
||||||
header_margin = deprecate' "header_margin" "headerMargin";
|
highlight_base_name =
|
||||||
detailed_cpu_time = deprecate' "detailed_cpu_time" "detailedCpuTime";
|
deprecate' "highlight_base_name" "highlightBaseName";
|
||||||
cpu_count_from_zero =
|
highlight_megabytes =
|
||||||
deprecate' "cpu_count_from_zero" "cpuCountFromZero";
|
deprecate' "highlight_megabytes" "highlightMegabytes";
|
||||||
show_cpu_usage = deprecate' "show_cpu_usage" "showCpuUsage";
|
highlight_threads = deprecate' "highlight_threads" "highlightThreads";
|
||||||
show_cpu_frequency = deprecate' "show_cpu_frequency" "showCpuFrequency";
|
tree_view = deprecate' "tree_view" "treeView";
|
||||||
update_process_names =
|
header_margin = deprecate' "header_margin" "headerMargin";
|
||||||
deprecate' "update_process_names" "updateProcessNames";
|
detailed_cpu_time = deprecate' "detailed_cpu_time" "detailedCpuTime";
|
||||||
account_guest_in_cpu_meter =
|
cpu_count_from_zero =
|
||||||
deprecate' "account_guest_in_cpu_meter" "accountGuestInCpuMeter";
|
deprecate' "cpu_count_from_zero" "cpuCountFromZero";
|
||||||
color_scheme = deprecate' "color_scheme" "colorScheme";
|
show_cpu_usage = deprecate' "show_cpu_usage" "showCpuUsage";
|
||||||
enable_mouse = deprecate' "enable_mouse" "enableMouse";
|
show_cpu_frequency =
|
||||||
delay = deprecate' "delay" "delay";
|
deprecate' "show_cpu_frequency" "showCpuFrequency";
|
||||||
left_meters = leftMeters;
|
update_process_names =
|
||||||
left_meter_modes = leftModes;
|
deprecate' "update_process_names" "updateProcessNames";
|
||||||
right_meters = rightMeters;
|
account_guest_in_cpu_meter =
|
||||||
right_meter_modes = rightModes;
|
deprecate' "account_guest_in_cpu_meter" "accountGuestInCpuMeter";
|
||||||
vim_mode = deprecate' "vim_mode" "vimMode";
|
color_scheme = deprecate' "color_scheme" "colorScheme";
|
||||||
});
|
enable_mouse = deprecate' "enable_mouse" "enableMouse";
|
||||||
in concatStringsSep "\n" (mapAttrsToList formatOption settings');
|
delay = deprecate' "delay" "delay";
|
||||||
|
left_meters = leftMeters;
|
||||||
|
left_meter_modes = leftModes;
|
||||||
|
right_meters = rightMeters;
|
||||||
|
right_meter_modes = rightModes;
|
||||||
|
vim_mode = deprecate' "vim_mode" "vimMode";
|
||||||
|
});
|
||||||
|
in concatStringsSep "\n" (mapAttrsToList formatOption before
|
||||||
|
++ mapAttrsToList formatOption settings');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
46
modules/programs/java.nix
Normal file
46
modules/programs/java.nix
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
# This module provides JAVA_HOME, with a different way to install java locally.
|
||||||
|
# This module is modified from the NixOS module `programs.java`
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.programs.java;
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = with maintainers; [ ShamrockLee ];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
programs.java = {
|
||||||
|
enable = mkEnableOption "" // {
|
||||||
|
description = ''
|
||||||
|
Install the Java development kit and set the <envar>JAVA_HOME</envar>
|
||||||
|
variable.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.jdk;
|
||||||
|
defaultText = "pkgs.jdk";
|
||||||
|
description = ''
|
||||||
|
Java package to install. Typical values are
|
||||||
|
<literal>pkgs.jdk</literal> or <literal>pkgs.jre</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
JAVA_HOME = fileContents (pkgs.runCommandLocal "java-home" { } ''
|
||||||
|
source "${cfg.package}/nix-support/setup-hook"
|
||||||
|
echo "$JAVA_HOME" > $out
|
||||||
|
'');
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -30,6 +30,13 @@ in {
|
||||||
programs.jq = {
|
programs.jq = {
|
||||||
enable = mkEnableOption "the jq command-line JSON processor";
|
enable = mkEnableOption "the jq command-line JSON processor";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.jq;
|
||||||
|
defaultText = literalExample "pkgs.jq";
|
||||||
|
description = "jq package to use.";
|
||||||
|
};
|
||||||
|
|
||||||
colors = mkOption {
|
colors = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
The colors used in colored JSON output.</para>
|
The colors used in colored JSON output.</para>
|
||||||
|
@ -65,7 +72,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.jq ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
home.sessionVariables = let c = cfg.colors;
|
home.sessionVariables = let c = cfg.colors;
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -261,7 +261,7 @@ in {
|
||||||
description = ''
|
description = ''
|
||||||
Path to the terminal which will be used to run console applications
|
Path to the terminal which will be used to run console applications
|
||||||
'';
|
'';
|
||||||
example = "\${pkgs.gnome3.gnome_terminal}/bin/gnome-terminal";
|
example = "\${pkgs.gnome.gnome_terminal}/bin/gnome-terminal";
|
||||||
};
|
};
|
||||||
|
|
||||||
separator = mkOption {
|
separator = mkOption {
|
||||||
|
|
|
@ -98,8 +98,6 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.taskwarrior ];
|
home.packages = [ pkgs.taskwarrior ];
|
||||||
|
|
||||||
home.file."${cfg.dataLocation}/.keep".text = "";
|
|
||||||
|
|
||||||
home.file.".taskrc".text = ''
|
home.file.".taskrc".text = ''
|
||||||
data.location=${cfg.dataLocation}
|
data.location=${cfg.dataLocation}
|
||||||
${includeTheme cfg.colorTheme}
|
${includeTheme cfg.colorTheme}
|
||||||
|
|
|
@ -6,14 +6,21 @@ let
|
||||||
|
|
||||||
cfg = config.programs.texlive;
|
cfg = config.programs.texlive;
|
||||||
|
|
||||||
texlivePkgs = cfg.extraPackages pkgs.texlive;
|
texlive = cfg.packageSet;
|
||||||
|
texlivePkgs = cfg.extraPackages texlive;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.rycee ];
|
meta.maintainers = [ maintainers.rycee ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
programs.texlive = {
|
programs.texlive = {
|
||||||
enable = mkEnableOption "Texlive";
|
enable = mkEnableOption "TeX Live";
|
||||||
|
|
||||||
|
packageSet = mkOption {
|
||||||
|
default = pkgs.texlive;
|
||||||
|
defaultText = literalExample "pkgs.texlive";
|
||||||
|
description = "TeX Live package set to use.";
|
||||||
|
};
|
||||||
|
|
||||||
extraPackages = mkOption {
|
extraPackages = mkOption {
|
||||||
default = tpkgs: { inherit (tpkgs) collection-basic; };
|
default = tpkgs: { inherit (tpkgs) collection-basic; };
|
||||||
|
@ -21,12 +28,12 @@ in {
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
tpkgs: { inherit (tpkgs) collection-fontsrecommended algorithms; }
|
tpkgs: { inherit (tpkgs) collection-fontsrecommended algorithms; }
|
||||||
'';
|
'';
|
||||||
description = "Extra packages available to Texlive.";
|
description = "Extra packages available to TeX Live.";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
description = "Resulting customized Texlive package.";
|
description = "Resulting customized TeX Live package.";
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -41,6 +48,6 @@ in {
|
||||||
|
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
programs.texlive.package = pkgs.texlive.combine texlivePkgs;
|
programs.texlive.package = texlive.combine texlivePkgs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,6 +279,12 @@ in
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
completionInit = mkOption {
|
||||||
|
default = "autoload -U compinit && compinit";
|
||||||
|
description = "Initialization commands to run when completion is enabled.";
|
||||||
|
type = types.lines;
|
||||||
|
};
|
||||||
|
|
||||||
enableAutosuggestions = mkOption {
|
enableAutosuggestions = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = "Enable zsh autosuggestions";
|
description = "Enable zsh autosuggestions";
|
||||||
|
@ -469,7 +475,7 @@ in
|
||||||
# calling it twice causes slight start up slowdown
|
# calling it twice causes slight start up slowdown
|
||||||
# as all $fpath entries will be traversed again.
|
# as all $fpath entries will be traversed again.
|
||||||
${optionalString (cfg.enableCompletion && !cfg.oh-my-zsh.enable && !cfg.prezto.enable)
|
${optionalString (cfg.enableCompletion && !cfg.oh-my-zsh.enable && !cfg.prezto.enable)
|
||||||
"autoload -U compinit && compinit"
|
cfg.completionInit
|
||||||
}
|
}
|
||||||
|
|
||||||
${optionalString cfg.enableAutosuggestions
|
${optionalString cfg.enableAutosuggestions
|
||||||
|
@ -500,7 +506,7 @@ in
|
||||||
(builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshrc")}
|
(builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshrc")}
|
||||||
|
|
||||||
${concatStrings (map (plugin: ''
|
${concatStrings (map (plugin: ''
|
||||||
if [ -f "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" ]; then
|
if [[ -f "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" ]]; then
|
||||||
source "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}"
|
source "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}"
|
||||||
fi
|
fi
|
||||||
'') cfg.plugins)}
|
'') cfg.plugins)}
|
||||||
|
|
|
@ -25,7 +25,7 @@ let
|
||||||
options = {
|
options = {
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
example = literalExample "pkgs.gnome3.adwaita-icon-theme";
|
example = literalExample "pkgs.gnome.adwaita-icon-theme";
|
||||||
description = "Package providing the theme.";
|
description = "Package providing the theme.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ in {
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
{
|
{
|
||||||
home.packages = [ (getOutput "man" pkgs.dunst) ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.dataFile."dbus-1/services/org.knopwob.dunst.service".source =
|
xdg.dataFile."dbus-1/services/org.knopwob.dunst.service".source =
|
||||||
"${pkgs.dunst}/share/dbus-1/services/org.knopwob.dunst.service";
|
"${pkgs.dunst}/share/dbus-1/services/org.knopwob.dunst.service";
|
||||||
|
|
|
@ -35,7 +35,7 @@ in {
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
{
|
{
|
||||||
ETESYNC_LISTEN_ADDRESS = "localhost";
|
ETESYNC_LISTEN_ADDRESS = "localhost";
|
||||||
ETESYNC_LISTEN_PORT = 37385;
|
ETESYNC_LISTEN_PORT = 37358;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
|
|
|
@ -36,7 +36,7 @@ in {
|
||||||
args = concatStringsSep " " ([ "--start" "--foreground" ]
|
args = concatStringsSep " " ([ "--start" "--foreground" ]
|
||||||
++ optional (cfg.components != [ ])
|
++ optional (cfg.components != [ ])
|
||||||
("--components=" + concatStringsSep "," cfg.components));
|
("--components=" + concatStringsSep "," cfg.components));
|
||||||
in "${pkgs.gnome3.gnome-keyring}/bin/gnome-keyring-daemon ${args}";
|
in "${pkgs.gnome.gnome-keyring}/bin/gnome-keyring-daemon ${args}";
|
||||||
Restart = "on-abort";
|
Restart = "on-abort";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -104,23 +104,26 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
exec = mkOption {
|
exec = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = with types; coercedTo str singleton (listOf str);
|
||||||
default = null;
|
default = [ ];
|
||||||
example =
|
example =
|
||||||
"\${pkg.sway}/bin/swaymsg workspace 1, move workspace to eDP-1";
|
"[ \${pkg.sway}/bin/swaymsg workspace 1, move workspace to eDP-1 ]";
|
||||||
description = ''
|
description = ''
|
||||||
Command executed after the profile is succesfully applied.
|
Commands executed after the profile is succesfully applied.
|
||||||
|
Note that if you provide multiple commands, they will be
|
||||||
|
executed asynchronously with no guaranteed ordering.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
profileStr = name:
|
profileStr = name:
|
||||||
{ outputs, exec, ... }:
|
{ outputs, exec, ... }: ''
|
||||||
''
|
|
||||||
profile ${name} {
|
profile ${name} {
|
||||||
${concatStringsSep "\n " (map outputStr outputs)}
|
${
|
||||||
'' + optionalString (exec != null) " exec ${exec}\n" + ''
|
concatStringsSep "\n "
|
||||||
|
(map outputStr outputs ++ map (cmd: "exec ${cmd}") exec)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -38,7 +38,7 @@ in {
|
||||||
# "AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files"
|
# "AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files"
|
||||||
home.packages = [ cfg.package pkgs.at-spi2-core ];
|
home.packages = [ cfg.package pkgs.at-spi2-core ];
|
||||||
|
|
||||||
# Will need to add `services.dbus.packages = with pkgs; [ gnome3.dconf ];`
|
# Will need to add `services.dbus.packages = with pkgs; [ gnome.dconf ];`
|
||||||
# to /etc/nixos/configuration.nix for daemon to work correctly
|
# to /etc/nixos/configuration.nix for daemon to work correctly
|
||||||
|
|
||||||
systemd.user.services.pulseeffects = {
|
systemd.user.services.pulseeffects = {
|
||||||
|
|
|
@ -23,6 +23,8 @@ let
|
||||||
toString v;
|
toString v;
|
||||||
in "${n}: ${formatValue v}";
|
in "${n}: ${formatValue v}";
|
||||||
|
|
||||||
|
xrdbMerge = "${pkgs.xorg.xrdb}/bin/xrdb -merge ${cfg.path}";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.rycee ];
|
meta.maintainers = [ maintainers.rycee ];
|
||||||
|
|
||||||
|
@ -45,7 +47,7 @@ in {
|
||||||
X server resources that should be set.
|
X server resources that should be set.
|
||||||
Booleans are formatted as "true" or "false" respectively.
|
Booleans are formatted as "true" or "false" respectively.
|
||||||
List elements are recursively formatted as a string and joined by commas.
|
List elements are recursively formatted as a string and joined by commas.
|
||||||
All other values are directly formatted using builtins.toString.
|
All other values are directly formatted using builtins.toString.
|
||||||
Note, that 2-dimensional lists are not supported and specifying one will throw an exception.
|
Note, that 2-dimensional lists are not supported and specifying one will throw an exception.
|
||||||
If this and all other xresources options are
|
If this and all other xresources options are
|
||||||
<code>null</code>, then this feature is disabled and no
|
<code>null</code>, then this feature is disabled and no
|
||||||
|
@ -73,20 +75,30 @@ in {
|
||||||
<filename>~/.Xresources</filename> link is produced.
|
<filename>~/.Xresources</filename> link is produced.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xresources.path = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "${config.home.homeDirectory}/.Xresources";
|
||||||
|
defaultText = "$HOME/.Xresources";
|
||||||
|
description =
|
||||||
|
"Path where Home Manager should link the <filename>.Xresources</filename> file.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf ((cfg.properties != null && cfg.properties != { })
|
config = mkIf ((cfg.properties != null && cfg.properties != { })
|
||||||
|| cfg.extraConfig != "") {
|
|| cfg.extraConfig != "") {
|
||||||
home.file.".Xresources" = {
|
home.file.${cfg.path} = {
|
||||||
text = concatStringsSep "\n" ([ ]
|
text = concatStringsSep "\n" ([ ]
|
||||||
++ optional (cfg.extraConfig != "") cfg.extraConfig
|
++ optional (cfg.extraConfig != "") cfg.extraConfig
|
||||||
++ optionals (cfg.properties != null)
|
++ optionals (cfg.properties != null)
|
||||||
(mapAttrsToList formatLine cfg.properties)) + "\n";
|
(mapAttrsToList formatLine cfg.properties)) + "\n";
|
||||||
onChange = ''
|
onChange = ''
|
||||||
if [[ -v DISPLAY ]] ; then
|
if [[ -v DISPLAY ]] ; then
|
||||||
$DRY_RUN_CMD ${pkgs.xorg.xrdb}/bin/xrdb -merge $HOME/.Xresources
|
$DRY_RUN_CMD ${xrdbMerge}
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xsession.initExtra = xrdbMerge;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ in {
|
||||||
args = optional (layout != null) "-layout '${layout}'"
|
args = optional (layout != null) "-layout '${layout}'"
|
||||||
++ optional (variant != null) "-variant '${variant}'"
|
++ optional (variant != null) "-variant '${variant}'"
|
||||||
++ optional (model != null) "-model '${model}'"
|
++ optional (model != null) "-model '${model}'"
|
||||||
++ map (v: "-option '${v}'") options;
|
++ [ "-option ''" ] ++ map (v: "-option '${v}'") options;
|
||||||
in "${pkgs.xorg.setxkbmap}/bin/setxkbmap ${toString args}";
|
in "${pkgs.xorg.setxkbmap}/bin/setxkbmap ${toString args}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -125,11 +125,14 @@ in {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
wants = [ "nix-daemon.socket" ];
|
wants = [ "nix-daemon.socket" ];
|
||||||
after = [ "nix-daemon.socket" ];
|
after = [ "nix-daemon.socket" ];
|
||||||
|
before = [ "systemd-user-sessions.service" ];
|
||||||
|
|
||||||
environment = serviceEnvironment;
|
environment = serviceEnvironment;
|
||||||
|
|
||||||
unitConfig = { RequiresMountsFor = usercfg.home.homeDirectory; };
|
unitConfig = { RequiresMountsFor = usercfg.home.homeDirectory; };
|
||||||
|
|
||||||
|
stopIfChanged = false;
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = usercfg.home.username;
|
User = usercfg.home.username;
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
WantedBy=graphical-session.target
|
WantedBy=graphical-session.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@setxkbmap@/bin/setxkbmap -layout 'us' -variant ''
|
ExecStart=@setxkbmap@/bin/setxkbmap -layout 'us' -variant '' -option ''
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
WantedBy=graphical-session.target
|
WantedBy=graphical-session.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@setxkbmap@/bin/setxkbmap -option 'ctrl:nocaps' -option 'altwin:no_win'
|
ExecStart=@setxkbmap@/bin/setxkbmap -option '' -option 'ctrl:nocaps' -option 'altwin:no_win'
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ with lib;
|
||||||
config = {
|
config = {
|
||||||
programs.bash.enable = true;
|
programs.bash.enable = true;
|
||||||
programs.direnv.enable = true;
|
programs.direnv.enable = true;
|
||||||
programs.direnv.enableNixDirenvIntegration = true;
|
programs.direnv.nix-direnv.enable = true;
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.bashrc
|
assertFileExists home-files/.bashrc
|
||||||
|
|
|
@ -7,7 +7,7 @@ in {
|
||||||
config = {
|
config = {
|
||||||
programs.bash.enable = true;
|
programs.bash.enable = true;
|
||||||
programs.direnv.enable = true;
|
programs.direnv.enable = true;
|
||||||
programs.direnv.enableNixDirenvIntegration = true;
|
programs.direnv.nix-direnv.enable = true;
|
||||||
programs.direnv.stdlib = expectedContent;
|
programs.direnv.stdlib = expectedContent;
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
|
|
|
@ -16,7 +16,7 @@ with lib;
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
allowSubstitutes = false;
|
allowSubstitutes = false;
|
||||||
} ''
|
} ''
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out"/{bin,lib}
|
||||||
touch "$out/bin/firefox"
|
touch "$out/bin/firefox"
|
||||||
chmod 755 "$out/bin/firefox"
|
chmod 755 "$out/bin/firefox"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -21,7 +21,7 @@ with lib;
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
allowSubstitutes = false;
|
allowSubstitutes = false;
|
||||||
} ''
|
} ''
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out"/{bin,lib}
|
||||||
touch "$out/bin/firefox"
|
touch "$out/bin/firefox"
|
||||||
chmod 755 "$out/bin/firefox"
|
chmod 755 "$out/bin/firefox"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -15,7 +15,7 @@ with lib;
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
allowSubstitutes = false;
|
allowSubstitutes = false;
|
||||||
} ''
|
} ''
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out"/{bin,lib}
|
||||||
touch "$out/bin/firefox"
|
touch "$out/bin/firefox"
|
||||||
chmod 755 "$out/bin/firefox"
|
chmod 755 "$out/bin/firefox"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -27,18 +27,14 @@ with lib;
|
||||||
highlight_megabytes = 1;
|
highlight_megabytes = 1;
|
||||||
highlight_threads = 1;
|
highlight_threads = 1;
|
||||||
} // (with config.lib.htop;
|
} // (with config.lib.htop;
|
||||||
leftMeters {
|
leftMeters [ (bar "AllCPUs2") (bar "Memory") (bar "Swap") (text "Zram") ])
|
||||||
AllCPUs2 = modes.Bar;
|
// (with config.lib.htop;
|
||||||
Memory = modes.Bar;
|
rightMeters [
|
||||||
Swap = modes.Bar;
|
(text "Tasks")
|
||||||
Zram = modes.Text;
|
(text "LoadAverage")
|
||||||
}) // (with config.lib.htop;
|
(text "Uptime")
|
||||||
rightMeters {
|
(text "Systemd")
|
||||||
Tasks = modes.Text;
|
]);
|
||||||
LoadAverage = modes.Text;
|
|
||||||
Uptime = modes.Text;
|
|
||||||
Systemd = modes.Text;
|
|
||||||
});
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.config/htop/htoprc
|
assertFileExists home-files/.config/htop/htoprc
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
|
profile backwardsCompat {
|
||||||
|
output "LVDS-1" enable
|
||||||
|
exec echo "7 eight 9"
|
||||||
|
}
|
||||||
|
|
||||||
profile desktop {
|
profile desktop {
|
||||||
output "eDP-1" disable
|
output "eDP-1" disable
|
||||||
output "Iiyama North America PLE2483H-DP" enable position 0,0
|
output "Iiyama North America PLE2483H-DP" enable position 0,0
|
||||||
output "Iiyama North America PLE2483H-DP 1158765348486" enable mode 1920x1080 position 1920,0 scale 2.100000 transform flipped-270
|
output "Iiyama North America PLE2483H-DP 1158765348486" enable mode 1920x1080 position 1920,0 scale 2.100000 transform flipped-270
|
||||||
exec echo "1 two 3"
|
exec echo "1 two 3"
|
||||||
|
exec echo "4 five 6"
|
||||||
}
|
}
|
||||||
|
|
||||||
profile nomad {
|
profile nomad {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
desktop = {
|
desktop = {
|
||||||
exec = ''echo "1 two 3"'';
|
exec = [ ''echo "1 two 3"'' ''echo "4 five 6"'' ];
|
||||||
outputs = [
|
outputs = [
|
||||||
{
|
{
|
||||||
criteria = "eDP-1";
|
criteria = "eDP-1";
|
||||||
|
@ -32,6 +32,13 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
backwardsCompat = {
|
||||||
|
outputs = [{
|
||||||
|
criteria = "LVDS-1";
|
||||||
|
status = "enable";
|
||||||
|
}];
|
||||||
|
exec = ''echo "7 eight 9"'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
profile test {
|
profile test {
|
||||||
|
|
Loading…
Reference in a new issue