Add alejandra

This commit is contained in:
Dave Gallant
2022-05-28 10:30:29 -04:00
parent 80e7729ab4
commit d2aaa3920f
31 changed files with 334 additions and 323 deletions

View File

@@ -4,7 +4,7 @@ SHELL := bash
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
HOSTAME ?= $(shell hostname)
HOSTNAME ?= $(shell hostname)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
@@ -19,3 +19,6 @@ switch:
update:
nix flake update
fmt:
alejandra .

View File

@@ -1,5 +1,3 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
nix.extraOptions = "experimental-features = nix-command flakes";
}

View File

@@ -1,7 +1,4 @@
{ ... }:
{
{...}: {
services.xserver = {
enable = true;
displayManager = {

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
# Set system-wide fonts.
fonts.fonts = with pkgs; [
dejavu_fonts
@@ -18,9 +16,9 @@
# Set default fonts.
fonts.fontconfig.defaultFonts = {
sansSerif = [ "Noto Sans" ];
serif = [ "Noto Serif" ];
monospace = [ "Noto Sans Mono" ];
emoji = [ "Noto Color Emoji" ];
sansSerif = ["Noto Sans"];
serif = ["Noto Serif"];
monospace = ["Noto Sans Mono"];
emoji = ["Noto Color Emoji"];
};
}

View File

@@ -1,8 +1,6 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
boot.kernelPackages = pkgs.linuxPackages;
boot.supportedFilesystems = [ "ntfs" ];
boot.supportedFilesystems = ["ntfs"];
system.stateVersion = "unstable";
system.autoUpgrade.enable = true;
@@ -19,7 +17,7 @@
users.users.dave = {
isNormalUser = true;
extraGroups = [ "docker" "wheel" "libvirtd" ];
extraGroups = ["docker" "wheel" "libvirtd"];
shell = pkgs.zsh;
};
@@ -36,7 +34,7 @@
# Enable 32bit for steam
hardware.pulseaudio.enable = true;
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [libva];
hardware.pulseaudio.support32Bit = true;
virtualisation.docker.enable = true;
@@ -47,5 +45,4 @@
enable = true;
enableSSHSupport = true;
};
}

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
services.tailscale.enable = true;
networking = {
@@ -8,7 +6,7 @@
allowPing = false;
enable = true;
checkReversePath = "loose";
trustedInterfaces = [ "tailscale0" ];
trustedInterfaces = ["tailscale0"];
};
};
}

View File

@@ -1,12 +1,15 @@
{ config, lib, pkgs, ... }:
let inherit (pkgs) stdenv;
in
{
config,
lib,
pkgs,
...
}: let
inherit (pkgs) stdenv;
in {
# System-wide packages to install.
environment.systemPackages = with pkgs;
let
common = [
environment.systemPackages = with pkgs; let
common =
[
# essentials
curl
gcc
@@ -119,10 +122,13 @@ in
terraformer
tflint
tfsec
/* tfswitch */
/*
tfswitch
*/
infracost
# nix
alejandra
cachix
nix-diff
nixfmt
@@ -157,8 +163,8 @@ in
# news
srv
] ++ lib.optionals stdenv.isLinux ([
]
++ lib.optionals stdenv.isLinux [
_1password-gui
albert
authy
@@ -202,8 +208,8 @@ in
wireshark-qt
yaru-theme
zoom-us
]);
in
];
in
common;
programs.gnupg.agent.enable = true;

View File

@@ -1,5 +1,3 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
services.printing.enable = true;
}

View File

@@ -1,13 +1,13 @@
let
nix-pre-commit-hooks = import (builtins.fetchTarball
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;
nixpkgs-fmt.enable = true;
alejandra.enable = true;
};
};
}

121
flake.nix
View File

@@ -19,76 +19,90 @@
};
};
outputs = { self, darwin, home-manager, nixpkgs, nixos-hardware, ... }@inputs: {
outputs = {
self,
darwin,
home-manager,
nixpkgs,
nixos-hardware,
...
} @ inputs: {
nixosConfigurations = let
defaultModules = [
home-manager.nixosModules.home-manager
./common/desktop.nix
./common/fonts.nix
./common/linux.nix
./common/networking.nix
./common/packages.nix
./common/printing.nix
nixosConfigurations =
let
defaultModules = [
home-manager.nixosModules.home-manager
./common/desktop.nix
./common/fonts.nix
./common/linux.nix
./common/netdata/default.nix
./common/networking.nix
./common/packages.nix
./common/printing.nix
./services/netdata/default.nix
./services/keyleds/default.nix
({ config, lib, lib', ... }: {
config = {
_module.args = {
lib' = lib // import ./lib { inherit config lib; };
};
nix = {
settings = {
auto-optimise-store = true;
sandbox = false;
substituters = [ "https://davegallant.cachix.org" ];
trusted-users = [ "root" "dave" ];
trusted-public-keys = [
"davegallant.cachix.org-1:SsUMqL4+tF2R3/G6X903E9laLlY1rES2QKFfePegF08="
];
};
registry = { nixpkgs.flake = nixpkgs; };
};
nixpkgs.overlays = [
(import ./modules/overlays)
inputs.neovim-nightly-overlay.overlay
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.dave.imports = [ ./home/default.nix ];
};
({
config,
lib,
lib',
...
}: {
config = {
_module.args = {
lib' = lib // import ./lib {inherit config lib;};
};
})
];
in
{
hephaestus = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
nix = {
settings = {
auto-optimise-store = true;
sandbox = false;
substituters = ["https://davegallant.cachix.org"];
trusted-users = ["root" "dave"];
trusted-public-keys = [
"davegallant.cachix.org-1:SsUMqL4+tF2R3/G6X903E9laLlY1rES2QKFfePegF08="
];
};
registry = {nixpkgs.flake = nixpkgs;};
};
nixpkgs.overlays = [
(import ./modules/overlays)
inputs.neovim-nightly-overlay.overlay
];
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;
};
]
++ defaultModules;
};
};
darwinConfigurations = {
demeter = darwin.lib.darwinSystem {
system = "x86_64-darwin";
modules = [
home-manager.darwinModules.home-manager
./common/darwin.nix
./common/packages.nix
./machines/demeter/configuration.nix
./modules/darwin/default.nix
({ config, ... }: {
({config, ...}: {
config = {
nixpkgs.overlays = [
inputs.neovim-nightly-overlay.overlay
@@ -97,7 +111,7 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.dave.imports = [ ./home/default.nix ];
users.dave.imports = [./home/default.nix];
};
};
})
@@ -106,4 +120,3 @@
};
};
}

View File

@@ -1,9 +1,11 @@
{ lib, pkgs, ... }:
let
{
lib,
pkgs,
...
}: let
hound-nvim = pkgs.vimUtils.buildVimPlugin {
name = "hound-nvim";
nativeBuildInputs = with pkgs; [ lua53Packages.luacheck stylua ];
nativeBuildInputs = with pkgs; [lua53Packages.luacheck stylua];
src = pkgs.fetchFromGitHub {
owner = "davegallant";
repo = "hound.nvim";
@@ -12,9 +14,7 @@ let
};
};
inherit (pkgs) stdenv;
in
{
in {
services = {
gpg-agent = {
enable = stdenv.isLinux;
@@ -27,7 +27,6 @@ in
fonts.fontconfig.enable = true;
programs = {
home-manager.enable = true;
direnv.enable = true;
@@ -50,18 +49,16 @@ in
dc = "diff --cached";
dcn = "diff --cached --name-only";
ds = "! git diff origin | sed -r 's/value: (.*)/value: \"************\"/'";
l =
"log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
l = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
ms = "merge --squash";
p = "push origin";
pf = "push -f";
pl = "! git pull origin $(git rev-parse --abbrev-ref HEAD)";
st = "status";
wip =
"for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads";
wip = "for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads";
};
includes = [{ path = "~/.gitconfig-work"; }];
includes = [{path = "~/.gitconfig-work";}];
delta = {
enable = true;
@@ -79,10 +76,9 @@ in
};
extraConfig = {
push = { default = "current"; };
pull = { rebase = true; };
push = {default = "current";};
pull = {rebase = true;};
};
};
starship = {
@@ -91,9 +87,9 @@ in
settings = {
add_newline = false;
gcloud = { disabled = true; };
gcloud = {disabled = true;};
scan_timeout = 10;
character = { error_symbol = "[](bold red)"; };
character = {error_symbol = "[](bold red)";};
};
};
@@ -162,7 +158,6 @@ in
"tmux"
];
};
};
alacritty = {
@@ -175,20 +170,19 @@ in
mouse.hide_when_typing = true;
font =
if stdenv.isLinux then
{
normal.family = "Fira Code";
size = 12;
}
else
{
normal.family = "FiraCode Nerd Font";
size = 18;
};
if stdenv.isLinux
then {
normal.family = "Fira Code";
size = 12;
}
else {
normal.family = "FiraCode Nerd Font";
size = 18;
};
shell = {
program = "zsh";
args = [ "-l" "-c" "tmux" "u" ];
args = ["-l" "-c" "tmux" "u"];
};
colors = {
@@ -330,7 +324,9 @@ in
extraConfig = "lua require('init')";
plugins = with pkgs.vimPlugins; [
/* copilot-vim */
/*
copilot-vim
*/
cmp-nvim-lsp
cmp-path
cmp-treesitter
@@ -355,9 +351,7 @@ in
vim-sneak
vim-surround
];
};
};
home.file.".config/nvim/lua".source = ./nvim/lua;
@@ -374,5 +368,4 @@ in
70 80
80 90
'';
}

View File

@@ -1,11 +1,9 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
nixpkgs.config.allowUnfree = true;
environment = { variables = { LANG = "en_US.UTF-8"; }; };
environment = {variables = {LANG = "en_US.UTF-8";};};
networking = { hostName = "demeter"; };
networking = {hostName = "demeter";};
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;

View File

@@ -1,7 +1,9 @@
{ config, pkgs, ... }:
{
imports = [ ./hardware.nix ];
config,
pkgs,
...
}: {
imports = [./hardware.nix];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
@@ -14,12 +16,24 @@
hostName = "hephaestus";
interfaces.enp34s0 = {
useDHCP = true;
/* ipv4.addresses = [ */
/* { */
/* address = "192.168.1.69"; */
/* prefixLength = 24; */
/* } */
/* ]; */
/*
ipv4.addresses = [
*/
/*
{
*/
/*
address = "192.168.1.69";
*/
/*
prefixLength = 24;
*/
/*
}
*/
/*
];
*/
};
defaultGateway = {
address = "192.168.1.2";
@@ -36,9 +50,9 @@
};
services.sshd.enable = true;
services.tailscale = { enable = true; };
services.tailscale = {enable = true;};
services.xserver = {
videoDrivers = [ "nvidia" ];
videoDrivers = ["nvidia"];
deviceSection = ''
Option "Coolbits" "4"
'';
@@ -48,6 +62,4 @@
services.udev.extraRules = ''
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0666"
'';
}

View File

@@ -1,13 +1,16 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback.out ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [config.boot.kernelPackages.v4l2loopback.out];
powerManagement.cpuFreqGovernor = "balanced";
@@ -35,13 +38,11 @@
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/aca92a73-2941-40ca-88c4-0dd8607d232a"; }];
swapDevices = [{device = "/dev/disk/by-uuid/aca92a73-2941-40ca-88c4-0dd8607d232a";}];
fileSystems."/mnt/storage" = {
device = "/dev/disk/by-uuid/0f592fca-1d4e-43f7-9bf4-f1c3e19e841f";
fsType = "ext4";
};
hardware.video.hidpi.enable = lib.mkDefault true;
}

View File

@@ -1,9 +1,11 @@
{ config, lib, pkgs, ... }:
let
checkBrew = "command -v brew > /dev/null";
in
{
config,
lib,
pkgs,
...
}: let
checkBrew = "command -v brew > /dev/null";
in {
environment = {
extraInit = ''
${checkBrew} || >&2 echo "brew is not installed (install it via https://brew.sh)"
@@ -48,6 +50,5 @@ in
"homebrew/core"
"homebrew/services"
];
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: {
{pkgs, ...}: {
imports = [
./brew.nix
./preferences.nix

View File

@@ -1,5 +1,8 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
system.defaults = {
loginwindow = {
GuestEnabled = false;
@@ -51,5 +54,4 @@
AppleShowScrollBars = "Automatic";
};
};
}

View File

@@ -1,5 +1,8 @@
{ stdenv, lib, fetchFromGitHub }:
{
stdenv,
lib,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "aws-connect";
version = "1.0.19";

View File

@@ -1,6 +1,8 @@
{ lib, fetchFromGitHub, python3 }:
let
{
lib,
fetchFromGitHub,
python3,
}: let
py = python3.override {
packageOverrides = self: super: {
prettycolors = super.buildPythonPackage rec {
@@ -13,41 +15,41 @@ let
rev = "8b58260f00b0aab789e940f5ee190fa9c3c10925";
sha256 = "sha256-ICFwaRkQ30/sml4GuzXF8TyJAg+ZXnLmKGil18KisUw=";
};
propagatedBuildInputs = [ py.pkgs.colorama ];
propagatedBuildInputs = [py.pkgs.colorama];
};
};
};
in
with py.pkgs;
buildPythonApplication rec {
pname = "aws-role-play";
version = "419e0de612554bfce467da4896e1abcadb78c406";
format = "pyproject";
with py.pkgs;
buildPythonApplication rec {
pname = "aws-role-play";
version = "419e0de612554bfce467da4896e1abcadb78c406";
format = "pyproject";
src = fetchFromGitHub {
owner = "rewindio";
repo = "aws-role-play";
rev = version;
hash = "sha256-o+u/ixL48J2WMWFRkOlWGvXMVwn+BrofzlspOVwmnCo=";
};
src = fetchFromGitHub {
owner = "rewindio";
repo = "aws-role-play";
rev = version;
hash = "sha256-o+u/ixL48J2WMWFRkOlWGvXMVwn+BrofzlspOVwmnCo=";
};
# No tests included
doCheck = false;
# No tests included
doCheck = false;
nativeBuildInputs = [ poetry ];
nativeBuildInputs = [poetry];
propagatedBuildInputs = with py.pkgs; [
boto3
click
colorama
prettycolors
];
propagatedBuildInputs = with py.pkgs; [
boto3
click
colorama
prettycolors
];
passthru.python3 = python3;
passthru.python3 = python3;
meta = with lib; {
homepage = "https://www.rewind.com/";
description = "A CLI tool that makes assuming IAM roles and exporting temporary credentials easier";
license = licenses.mit;
};
}
meta = with lib; {
homepage = "https://www.rewind.com/";
description = "A CLI tool that makes assuming IAM roles and exporting temporary credentials easier";
license = licenses.mit;
};
}

View File

@@ -1,13 +1,10 @@
final: prev: {
aws-connect = prev.callPackage ./aws-connect { };
aws-role-play = prev.callPackage ./aws-role-play { };
keyleds = prev.callPackage ./keyleds { };
lpass = prev.callPackage ./lastpass { };
rfd = prev.callPackage ./rfd { };
srv = prev.callPackage ./srv { };
tmux-sessionizer = prev.callPackage ./tmux-sessionizer { };
vpngate = prev.callPackage ./vpngate { };
yar = prev.callPackage ./yar { };
aws-connect = prev.callPackage ./aws-connect {};
aws-role-play = prev.callPackage ./aws-role-play {};
keyleds = prev.callPackage ./keyleds {};
rfd = prev.callPackage ./rfd {};
srv = prev.callPackage ./srv {};
tmux-sessionizer = prev.callPackage ./tmux-sessionizer {};
vpngate = prev.callPackage ./vpngate {};
yar = prev.callPackage ./yar {};
}

View File

@@ -1,9 +1,9 @@
{ pkgs
, stdenv
, fetchFromGitHub
,
{
pkgs,
stdenv,
fetchFromGitHub,
...
}:
stdenv.mkDerivation rec {
name = "keyleds";
version = "1.1.1";
@@ -16,6 +16,18 @@ stdenv.mkDerivation rec {
sha256 = "sha256-KCWmaRmJTmZgTt7HW9o6Jt1u4x6+G2j6T9EqVt21U18=";
};
nativeBuildInputs = with pkgs; [ cmake pkgconfig ];
buildInputs = with pkgs; [ xlibsWrapper xorg.libXi libuv systemd luajit libyaml ];
postInstall = ''
cat <<EOF >> $out/bin/set-leds.sh
#!/usr/bin/env bash
for d in \$($out/bin/keyledsctl list); do
$out/bin/keyledsctl set-leds -d \$d all=black|| true;
done
EOF
chmod +x $out/bin/set-leds.sh
'';
nativeBuildInputs = with pkgs; [cmake pkgconfig];
buildInputs = with pkgs; [xlibsWrapper xorg.libXi libuv systemd luajit libyaml];
}

View File

@@ -1,46 +0,0 @@
{ stdenv
, lib
, fetchFromGitHub
, asciidoc
, cmake
, docbook_xsl
, pkgconfig
, bash-completion
, curl
, openssl
, libxml2
, libxslt
}:
stdenv.mkDerivation rec {
pname = "lpass";
version = "1.3.4-unreleased";
src = fetchFromGitHub {
owner = "lastpass";
repo = "lastpass-cli";
rev = "8767b5e53192ad4e72d1352db4aa9218e928cbe1";
sha256 = "sha256:1d4m5h9byq5cccdg98m8d8457rbvp28q821d8rpglykgrfgnknwp";
};
nativeBuildInputs = [ asciidoc cmake docbook_xsl pkgconfig ];
buildInputs = [ bash-completion curl openssl libxml2 libxslt ];
enableParallelBuilding = true;
installTargets = [ "install" "install-doc" ];
postInstall = ''
install -Dm644 -T ../contrib/lpass_zsh_completion $out/share/zsh/site-functions/_lpass
install -Dm644 -T ../contrib/completions-lpass.fish $out/share/fish/vendor_completions.d/lpass.fish
'';
meta = with lib; {
description =
"Stores, retrieves, generates, and synchronizes passwords securely";
homepage = "https://github.com/lastpass/lastpass-cli";
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}

View File

@@ -1,39 +1,41 @@
{ lib, fetchFromGitHub, python3 }:
let py = python3.override { };
{
lib,
fetchFromGitHub,
python3,
}: let
py = python3.override {};
in
with py.pkgs;
buildPythonApplication rec {
pname = "rfd";
version = "v0.8.1";
format = "pyproject";
with py.pkgs;
buildPythonApplication rec {
pname = "rfd";
version = "v0.8.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "davegallant";
repo = "rfd";
rev = version;
hash = "sha256-9gOxrKVEqbg2vLO5opoetVSxgwpm/3SV60mK8Le6F48=";
};
src = fetchFromGitHub {
owner = "davegallant";
repo = "rfd";
rev = version;
hash = "sha256-9gOxrKVEqbg2vLO5opoetVSxgwpm/3SV60mK8Le6F48=";
};
# No tests included
doCheck = false;
# No tests included
doCheck = false;
nativeBuildInputs = [ poetry ];
nativeBuildInputs = [poetry];
propagatedBuildInputs = with py.pkgs; [
beautifulsoup4
click
colorama
requests
soupsieve
];
propagatedBuildInputs = with py.pkgs; [
beautifulsoup4
click
colorama
requests
soupsieve
];
passthru.python3 = python3;
passthru.python3 = python3;
meta = with lib; {
homepage = "https://www.redflagdeals.com/";
description = "View RedFlagDeals from the command line";
license = licenses.gpl3;
};
}
meta = with lib; {
homepage = "https://www.redflagdeals.com/";
description = "View RedFlagDeals from the command line";
license = licenses.gpl3;
};
}

View File

@@ -1,5 +1,8 @@
{ lib, fetchFromGitHub, buildGoModule }:
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "srv";
version = "v0.1.2";
@@ -16,7 +19,7 @@ buildGoModule rec {
meta = with lib; {
description = "a simple rss viewer";
license = licenses.gpl3;
maintainers = with maintainers; [ davegallant ];
maintainers = with maintainers; [davegallant];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -1,12 +1,15 @@
{ stdenv, lib, fetchurl }:
{
stdenv,
lib,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "tmux-sessionizer";
version = "0.0.0";
executable = ./tmux-sessionizer;
phases = [ "unpackPhase" ]; # Remove all other phases
phases = ["unpackPhase"]; # Remove all other phases
unpackPhase = ''
mkdir -p $out/bin
@@ -19,4 +22,3 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
};
}

View File

@@ -1,7 +1,9 @@
{ lib, fetchFromGitHub, buildGoModule }:
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "vpngate";
version = "v0.1.1";
@@ -18,7 +20,7 @@ buildGoModule rec {
homepage = "https://www.vpngate.net";
description = "a client for vpngate.net";
license = licenses.gpl3;
maintainers = with maintainers; [ davegallant ];
maintainers = with maintainers; [davegallant];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -1,5 +1,8 @@
{ lib, fetchFromGitHub, buildGoModule }:
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "yar";
version = "master";
@@ -16,7 +19,7 @@ buildGoModule rec {
meta = with lib; {
description = "Yar is a tool for plunderin' organizations, users and/or repositories.";
license = licenses.gpl3;
maintainers = with maintainers; [ davegallant ];
maintainers = with maintainers; [davegallant];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -0,0 +1,15 @@
{
config,
pkgs,
...
}: let
in {
systemd.services.keyleds = {
description = "Logitech Keyboard animation for Linux G410, G513, G610, G810, G910, GPro";
wantedBy = ["multi-user.target"];
serviceConfig = {
ExecStart = "${pkgs.keyleds}/bin/set-leds.sh";
};
};
}

View File

@@ -1,10 +1,12 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
netdata = pkgs.netdata;
netdataConf = ./netdata.conf;
netdataDir = "/var/lib/netdata";
in
{
in {
users.extraGroups.netdata.gid = 220008;
users.users.netdata.group = "netdata";
users.extraUsers.netdata = {
@@ -14,8 +16,8 @@ in
uid = 200008;
};
systemd.services.netdata = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
wantedBy = ["multi-user.target"];
after = ["network.target"];
preStart = ''
mkdir -p ${netdataDir}/config
mkdir -p ${netdataDir}/logs
@@ -40,5 +42,4 @@ in
}
}
'';
}

View File

@@ -1,4 +1,4 @@
(import <nixpkgs> { }).mkShell {
(import <nixpkgs> {}).mkShell {
shellHook = ''
${(import ./default.nix).pre-commit-check.shellHook}
'';