mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -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,11 @@
|
|||
{ config, lib, pkgs, username, ... }: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./disk-config.nix
|
||||
./hardware-configuration.nix
|
||||
|
|
@ -42,7 +49,7 @@
|
|||
# Home
|
||||
"Diagon Alley".pskRaw = "ext:psk_diagon_alley";
|
||||
# Public networks
|
||||
"Gallery Row-GuestWiFi" = {};
|
||||
"Gallery Row-GuestWiFi" = { };
|
||||
"LocalTies Guest".pskRaw = "ext:psk_local_ties";
|
||||
};
|
||||
secretsFile = "${config.sops.secrets.wifi_creds.path}";
|
||||
|
|
@ -50,26 +57,27 @@
|
|||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: super: {
|
||||
makeModulesClosure = x:
|
||||
super.makeModulesClosure (x // { allowMissing = true; });
|
||||
(_final: super: {
|
||||
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
|
||||
})
|
||||
];
|
||||
|
||||
services = {
|
||||
cage = let
|
||||
kioskProgram = pkgs.writeShellScript "kiosk.sh" ''
|
||||
WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1
|
||||
/etc/profiles/per-user/gene/bin/chromium-browser
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
program = kioskProgram;
|
||||
user = "gene";
|
||||
environment = {
|
||||
WLR_LIBINPUT_NO_DEVICES = "1"; # boot up even if no mouse/keyboard connected
|
||||
cage =
|
||||
let
|
||||
kioskProgram = pkgs.writeShellScript "kiosk.sh" ''
|
||||
WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1
|
||||
/etc/profiles/per-user/gene/bin/chromium-browser
|
||||
'';
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
program = kioskProgram;
|
||||
user = "gene";
|
||||
environment = {
|
||||
WLR_LIBINPUT_NO_DEVICES = "1"; # boot up even if no mouse/keyboard connected
|
||||
};
|
||||
};
|
||||
};
|
||||
prometheus.exporters.node = {
|
||||
enable = true;
|
||||
enabledCollectors = [
|
||||
|
|
@ -115,7 +123,10 @@
|
|||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = "Gene Liverman";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
linger = true;
|
||||
};
|
||||
|
||||
|
|
@ -125,4 +136,3 @@
|
|||
memoryPercent = 90;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,33 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
programs = {
|
||||
|
|
@ -21,4 +21,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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue