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

@@ -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,44 +0,0 @@
{ config, pkgs, ... }:
let
netdata = pkgs.netdata;
netdataConf = ./netdata.conf;
netdataDir = "/var/lib/netdata";
in
{
users.extraGroups.netdata.gid = 220008;
users.users.netdata.group = "netdata";
users.extraUsers.netdata = {
description = "Netdata server user";
isSystemUser = true;
name = "netdata";
uid = 200008;
};
systemd.services.netdata = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
preStart = ''
mkdir -p ${netdataDir}/config
mkdir -p ${netdataDir}/logs
cp -r ${netdata}/share/netdata/web ${netdataDir}/web
chmod -R 700 ${netdataDir}
chown -R netdata:netdata ${netdataDir}
'';
serviceConfig = {
Type = "forking";
ExecStart = "${netdata}/bin/netdata -c ${netdataConf} -u netdata";
Restart = "on-failure";
};
};
services.nginx.httpConfig = ''
server {
server_name netdata.thume.net;
location / {
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:19999;
}
}
'';
}

View File

@@ -1,21 +0,0 @@
[global]
run as user = netdata
config directory = /var/lib/netdata/config
web files directory = /var/lib/netdata/web
cache directory = /var/lib/netdata
log directory = /var/lib/netdata/logs
# the default database size - 1 hour
history = 3600
# some defaults to run netdata with least priority
process scheduling policy = idle
OOM score = 1000
[web]
# web files owner = root
web files group = netdata
# by default do not expose the netdata port
bind to = localhost

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;
}