mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
Add linting, formatting, and CI infrastructure
- Add deadnix, nixfmt, and statix to flake inputs - Add formatter output to flake for nix fmt support - Add deadnix, nixfmt, statix to Home Manager packages - Add GitHub Actions workflow for CI validation - Add .pre-commit-config.yaml with hooks for nixfmt, deadnix, and statix - Support x86_64-darwin in formatter
This commit is contained in:
parent
582f93d9ed
commit
5dbcce7686
76 changed files with 1522 additions and 831 deletions
|
|
@ -1,4 +1,10 @@
|
|||
{ inputs, pkgs, username, ... }: {
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../../../shared/nixos/nixroutes.nix
|
||||
./disk-config.nix
|
||||
|
|
@ -29,9 +35,9 @@
|
|||
networking = {
|
||||
# Open ports in the firewall.
|
||||
firewall.allowedTCPPorts = [
|
||||
22 # ssh
|
||||
80 # Nginx
|
||||
443 # Nginx
|
||||
22 # ssh
|
||||
80 # Nginx
|
||||
443 # Nginx
|
||||
];
|
||||
# firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
|
|
@ -56,7 +62,10 @@
|
|||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = "Gene Liverman";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
linger = true;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,10 +44,10 @@
|
|||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
nix = {
|
||||
name = "nix";
|
||||
size = "100%";
|
||||
content = {
|
||||
nix = {
|
||||
name = "nix";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/nix";
|
||||
|
|
|
|||
|
|
@ -4,34 +4,43 @@
|
|||
{ lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "xhci_pci" "virtio_scsi" "sr_mod" ];
|
||||
availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"virtio_scsi"
|
||||
"sr_mod"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
kernelModules = [ ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-partlabel/disk-primary-root";
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-partlabel/disk-primary-root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-partlabel/disk-primary-ESP";
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-partlabel/disk-primary-ESP";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-partlabel/disk-volume1-nix";
|
||||
"/nix" = {
|
||||
device = "/dev/disk/by-partlabel/disk-volume1-nix";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{ ... }: {
|
||||
{
|
||||
home.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{ config, username, ... }: {
|
||||
{ config, username, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../../shared/nixos/lets-encrypt.nix
|
||||
./monitoring.nix
|
||||
|
|
@ -23,4 +24,3 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ config, pkgs, ... }: let
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
metrics_server = "https://monitoring.home.technicalissues.us/remotewrite";
|
||||
in {
|
||||
in
|
||||
{
|
||||
services = {
|
||||
vmagent = {
|
||||
enable = true;
|
||||
|
|
@ -14,11 +16,11 @@ in {
|
|||
{
|
||||
job_name = "node";
|
||||
static_configs = [
|
||||
{ targets = ["127.0.0.1:9100"]; }
|
||||
{ targets = [ "127.0.0.1:9100" ]; }
|
||||
];
|
||||
metric_relabel_configs = [
|
||||
{
|
||||
source_labels = ["__name__"];
|
||||
source_labels = [ "__name__" ];
|
||||
regex = "go_.*";
|
||||
action = "drop";
|
||||
}
|
||||
|
|
@ -35,11 +37,11 @@ in {
|
|||
{
|
||||
job_name = "nginx";
|
||||
static_configs = [
|
||||
{ targets = ["127.0.0.1:9113"]; }
|
||||
{ targets = [ "127.0.0.1:9113" ]; }
|
||||
];
|
||||
metric_relabel_configs = [
|
||||
{
|
||||
source_labels = ["__name__"];
|
||||
source_labels = [ "__name__" ];
|
||||
regex = "go_.*";
|
||||
action = "drop";
|
||||
}
|
||||
|
|
@ -77,7 +79,7 @@ in {
|
|||
# ----------------------------
|
||||
# Exporters (using built-in NixOS modules)
|
||||
# ----------------------------
|
||||
|
||||
|
||||
# Node exporter - using the built-in module
|
||||
prometheus.exporters.node = {
|
||||
enable = true;
|
||||
|
|
@ -110,7 +112,7 @@ in {
|
|||
group = "vmagent";
|
||||
};
|
||||
|
||||
users.groups.vmagent = {};
|
||||
users.groups.vmagent = { };
|
||||
|
||||
# ----------------------------
|
||||
# SOPS secrets configuration
|
||||
|
|
@ -119,10 +121,9 @@ in {
|
|||
secrets = {
|
||||
vmagent_push_pw = {
|
||||
owner = "vmagent";
|
||||
restartUnits = ["vmagent.service"];
|
||||
restartUnits = [ "vmagent.service" ];
|
||||
sopsFile = ../../../../shared/secrets.yaml;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
|
||||
{ pkgs, ... }: let
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
domain = "genebean.me";
|
||||
in {
|
||||
in
|
||||
{
|
||||
environment.etc.nginx-littlelinks = {
|
||||
# Info generated via
|
||||
# nurl https://github.com/genebean/littlelink genebean-sometag
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue