mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 03:13:38 +00:00
Add nixpkgs-fmt pre-commit hook
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
92
flake.nix
92
flake.nix
@@ -13,54 +13,56 @@
|
||||
};
|
||||
|
||||
outputs = { self, darwin, home-manager, nixpkgs, nixos-hardware }: {
|
||||
nixosConfigurations = let
|
||||
defaultModules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
./main/desktop.nix
|
||||
./main/fonts.nix
|
||||
./main/general.nix
|
||||
./main/kernel.nix
|
||||
./main/netdata/default.nix
|
||||
./main/networking.nix
|
||||
./main/packages.nix
|
||||
./main/printing.nix
|
||||
nixosConfigurations =
|
||||
let
|
||||
defaultModules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
./main/desktop.nix
|
||||
./main/fonts.nix
|
||||
./main/general.nix
|
||||
./main/kernel.nix
|
||||
./main/netdata/default.nix
|
||||
./main/networking.nix
|
||||
./main/packages.nix
|
||||
./main/printing.nix
|
||||
|
||||
({ config, lib, lib', ... }: {
|
||||
config = {
|
||||
_module.args = {
|
||||
lib' = lib // import ./lib { inherit config lib; };
|
||||
({ config, lib, lib', ... }: {
|
||||
config = {
|
||||
_module.args = {
|
||||
lib' = lib // import ./lib { inherit config lib; };
|
||||
};
|
||||
|
||||
nix = {
|
||||
autoOptimiseStore = true;
|
||||
binaryCaches = [ "https://davegallant.cachix.org" ];
|
||||
binaryCachePublicKeys = [
|
||||
"davegallant.cachix.org-1:SsUMqL4+tF2R3/G6X903E9laLlY1rES2QKFfePegF08="
|
||||
];
|
||||
useSandbox = false;
|
||||
registry = { nixpkgs.flake = nixpkgs; };
|
||||
trustedUsers = [ "root" "dave" ];
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [ (import ./overlays) ];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.dave.imports = [ ./home/default.nix ];
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
autoOptimiseStore = true;
|
||||
binaryCaches = [ "https://davegallant.cachix.org" ];
|
||||
binaryCachePublicKeys = [
|
||||
"davegallant.cachix.org-1:SsUMqL4+tF2R3/G6X903E9laLlY1rES2QKFfePegF08="
|
||||
];
|
||||
useSandbox = false;
|
||||
registry = { nixpkgs.flake = nixpkgs; };
|
||||
trustedUsers = [ "root" "dave" ];
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [ (import ./overlays) ];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.dave.imports = [ ./home/default.nix ];
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
in {
|
||||
hephaestus = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./machines/hephaestus/configuration.nix
|
||||
./machines/hephaestus/hardware.nix
|
||||
] ++ defaultModules;
|
||||
})
|
||||
];
|
||||
in
|
||||
{
|
||||
hephaestus = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./machines/hephaestus/configuration.nix
|
||||
./machines/hephaestus/hardware.nix
|
||||
] ++ defaultModules;
|
||||
};
|
||||
};
|
||||
};
|
||||
darwinConfigurations = {
|
||||
demeter = darwin.lib.darwinSystem {
|
||||
modules = [
|
||||
|
@@ -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)"
|
||||
@@ -244,7 +244,7 @@ in {
|
||||
extraConfig = ''
|
||||
set -g @plugin 'seebi/tmux-colors-solarized'
|
||||
set -g @colors-solarized 'dark'
|
||||
'';
|
||||
'';
|
||||
}
|
||||
];
|
||||
extraConfig = ''
|
||||
|
@@ -15,6 +15,7 @@
|
||||
address = "192.168.0.1";
|
||||
interface = "enp34s0";
|
||||
};
|
||||
firewall = { allowedTCPPorts = [ 8001 ]; };
|
||||
};
|
||||
|
||||
# Enable the OpenSSH server.
|
||||
|
@@ -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";
|
||||
|
@@ -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;
|
||||
|
@@ -22,7 +22,8 @@ let
|
||||
};
|
||||
};
|
||||
};
|
||||
in with py.pkgs;
|
||||
in
|
||||
with py.pkgs;
|
||||
buildPythonApplication rec {
|
||||
pname = "changedetection.io";
|
||||
version = "0.30";
|
||||
|
@@ -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";
|
||||
|
@@ -2,7 +2,8 @@
|
||||
|
||||
let py = python3.override { };
|
||||
|
||||
in with py.pkgs;
|
||||
in
|
||||
with py.pkgs;
|
||||
buildPythonApplication rec {
|
||||
pname = "rfd";
|
||||
version = "v0.7.1";
|
||||
|
Reference in New Issue
Block a user