Add nixpkgs-fmt pre-commit hook

This commit is contained in:
Dave Gallant
2021-05-30 23:00:39 -04:00
parent 8498968acc
commit 9092b371fe
9 changed files with 81 additions and 60 deletions

View File

@@ -1,12 +1,13 @@
let
nix-pre-commit-hooks = import (builtins.fetchTarball
"https://github.com/cachix/pre-commit-hooks.nix/tarball/master");
in {
in
{
pre-commit-check = nix-pre-commit-hooks.run {
src = ./.;
hooks = {
shellcheck.enable = true;
nixfmt.enable = true;
nixpkgs-fmt.enable = true;
};
};
}

View File

@@ -13,7 +13,8 @@
};
outputs = { self, darwin, home-manager, nixpkgs, nixos-hardware }: {
nixosConfigurations = let
nixosConfigurations =
let
defaultModules = [
home-manager.nixosModules.home-manager
./main/desktop.nix
@@ -52,7 +53,8 @@
};
})
];
in {
in
{
hephaestus = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [

View File

@@ -11,9 +11,8 @@ let
};
};
inherit (pkgs) stdenv;
in {
home = { sessionVariables = { EDITOR = "vim"; }; };
in
{
services = {
gpg-agent = {
@@ -115,6 +114,7 @@ in {
export PATH=$PATH:~/.local/bin
export PATH=$PATH:~/go/bin
export PAGER=less
export EDITOR=vim
eval "$(direnv hook zsh)"
eval "$(_RFD_COMPLETE=source_zsh rfd)"

View File

@@ -15,6 +15,7 @@
address = "192.168.0.1";
interface = "enp34s0";
};
firewall = { allowedTCPPorts = [ 8001 ]; };
};
# Enable the OpenSSH server.

View File

@@ -3,7 +3,8 @@ let
netdata = pkgs.netdata;
netdataConf = ./netdata.conf;
netdataDir = "/var/lib/netdata";
in {
in
{
users.extraGroups.netdata.gid = 220008;
users.extraUsers.netdata = {
description = "Netdata server user";

View File

@@ -1,7 +1,8 @@
{ config, lib, pkgs, ... }:
let inherit (pkgs) stdenv;
in {
in
{
# System-wide packages to install.
environment.systemPackages = with pkgs;
let
@@ -58,7 +59,7 @@ in {
netdata
procs
# databases
# data tools
postgresql
# password managers
@@ -100,7 +101,7 @@ in {
nmap
openssl
openvpn
sshfs
sshfs # mac requires https://osxfuse.github.io/
vpngate
whois
wireshark
@@ -179,6 +180,7 @@ in {
# Unsupported on darwin but likely should be:
bandwhich
brave
datasette
deluge
discord
firefox
@@ -192,7 +194,8 @@ in {
yuzu
zoom-us
]);
in common;
in
common;
# Install GnuPG agent.
programs.gnupg.agent.enable = true;

View File

@@ -22,7 +22,8 @@ let
};
};
};
in with py.pkgs;
in
with py.pkgs;
buildPythonApplication rec {
pname = "changedetection.io";
version = "0.30";

View File

@@ -1,5 +1,16 @@
{ stdenv, lib, fetchFromGitHub, asciidoc, cmake, docbook_xsl, pkgconfig
, bash-completion, curl, openssl, libxml2, libxslt }:
{ stdenv
, lib
, fetchFromGitHub
, asciidoc
, cmake
, docbook_xsl
, pkgconfig
, bash-completion
, curl
, openssl
, libxml2
, libxslt
}:
stdenv.mkDerivation rec {
pname = "lpass";

View File

@@ -2,7 +2,8 @@
let py = python3.override { };
in with py.pkgs;
in
with py.pkgs;
buildPythonApplication rec {
pname = "rfd";
version = "v0.7.1";