1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-24 03:59:46 +01:00
Commit graph

25 commits

Author SHA1 Message Date
Naïm Favier
9dd107a1d5
flake: add formatter (#3620)
* format: improve argument handling

For now, fail if the user tries to format a specific file/directory,
or runs the formatter from within a subdirectory.

Handling these situations is slightly tricky because `find -path` is
not very flexible.

* flake: add formatter

This allows running the formatter with `nix fmt`, added in Nix 2.8.

* format: use git ls-files

This is cleaner than `find` and allows us to restrict formatting to
particular files or subdirectories.
2023-06-27 23:32:30 +02:00
Lin Jian
bb4b25b302
bash: format using nixfmt
PR #3609
2023-01-26 23:18:39 +01:00
Naïm Camille Favier
1de492f6f8
format: update and remove exceptions (#3029)
Switches to nixfmt 0.5.0 and removes exceptions for files without open
PRs.
2022-06-16 14:13:06 +02:00
Naïm Camille Favier
64ab7d6e8d
Prepare inclusion in nixos-search (#2971)
* Add flake.lock and clean up flake.nix

Add a lockfile to work around https://github.com/NixOS/nix/issues/6541
(and because it's a good idea anyway).

Also use flake-utils, and restrict ourselves to the five platforms
supported by nixpkgs. Otherwise, the IFD for nmd fails on weird
platforms. This fixes `nix flake check`.

Remove the redundant `apps` output, see https://github.com/nix-community/home-manager/pull/2442#issuecomment-1133670487

* nixos,nix-darwin: factor out into a common module

* nixos,nix-darwin: make `home-managers.users` shallowly visible

Make sure the option is included in the NixOS/nix-darwin manual (but the
HM submodule options aren't).

Also add a static description to the HM submodule type so that we don't need to
evaluate the submodules just to build the option manual. This makes
nixos-search able to index the home-manager flake.

Also clean up some TODOs.

* flake: add nmd and nmt

This avoids having to use `pkgs.fetchFromGitLab` in an IFD, which causes
issues when indexing packages with nixos-search because `pkgs` is
instantiated with every platform.
2022-06-07 20:45:06 +02:00
Robert Helgesson
2499b91692
treewide: apply nixfmt to a few more files 2022-02-27 02:19:44 +01:00
midchildan
c7a13f76a7
launchd: initial support for LaunchAgents 2022-02-26 10:32:19 +01:00
Robert Helgesson
275f955db9
irssi: format using nixfmt 2021-10-31 10:32:58 +01:00
Robert Helgesson
34327e067f
tmux: format using nixfmt 2021-10-31 10:24:01 +01:00
Nicolas Berbiche
84d54402a5
format: update nixpkgs revision in format script (#2283) 2021-08-24 21:49:46 +02:00
Robert Helgesson
41903a14b0
Remove a few format exceptions 2021-07-18 23:34:50 +02:00
Sumner Evans
55ef8d3a10
format: remove exception for keybase and kbfs modules 2021-04-29 00:49:01 +02:00
Sumner Evans
2d421b30ad
format: removed exceptions already formatted files (#1954)
Removed format exclusion exceptions for modules that are already
formatted correctly (that is, when running nixfmt, no changes happen) or
have been moved (in the case of i3.nix).
2021-04-28 21:59:51 +02:00
Sumner Evans
b706d101eb
format: remove exception for afew module (#1955) 2021-04-28 21:58:49 +02:00
Robert Helgesson
7fcfd9b565
home-manager: format home-manager/default.nix 2021-04-07 21:09:27 +02:00
Robert Helgesson
8b3fca4ec5
dconf: format file 2020-12-21 23:22:22 +01:00
Robert Helgesson
e7d5531cfa
vscode: apply nixfmt 2020-10-12 22:51:12 +02:00
Robert Helgesson
aecd4acfb4
neovim: apply nixfmt 2020-10-12 22:50:49 +02:00
Robert Helgesson
2ed978eb79
systemd: apply nixfmt to test root file 2020-05-25 00:47:29 +02:00
Robert Helgesson
31ed6f1604
gtk: apply nixfmt 2020-05-25 00:46:58 +02:00
Robert Helgesson
ac6235e53d
emacs: apply nixfmt 2020-05-25 00:45:51 +02:00
Robert Helgesson
70f7c9f355
alot: apply nixfmt 2020-05-01 22:33:05 +02:00
Robert Helgesson
a128e35927
Update nixfmt and apply to a few more files 2020-04-06 12:51:11 +02:00
Robert Helgesson
2678fb3441
format: pin Nixpkgs version
This is to make sure that we get a consistent version of nixfmt.
2020-03-04 19:36:07 +01:00
Robert Helgesson
543118ac70
fish: apply nixfmt 2020-02-20 00:16:01 +01:00
Robert Helgesson
70af3b126a
ci: add format script and use in CI pipeline
The format script can be used to automatically format the Nix source
files and also verify that the files are formatted using the `-c`
command argument.

At the moment some files are exempt from the formatting to avoid
causing merge conflicts in active pull requests.

Finally, update the contribution guidelines to note that `nixfmt`
should be used.
2020-02-02 01:19:35 +01:00