Merge branch '24.05'
This commit is contained in:
commit
5c76eef615
39
flake.lock
generated
39
flake.lock
generated
@ -157,16 +157,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717476296,
|
||||
"narHash": "sha256-ScHe38Tr+TxGURC17kby4mIIxOG3aJvZWXzPM79UnEk=",
|
||||
"lastModified": 1716736833,
|
||||
"narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "095ef64aa3b2ab4a4f1bf07f29997e21e3a5576a",
|
||||
"rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.11",
|
||||
"ref": "release-24.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@ -232,43 +232,27 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1717159533,
|
||||
"narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=",
|
||||
"lastModified": 1717281328,
|
||||
"narHash": "sha256-evZPzpf59oNcDUXxh2GHcxHkTEG4fjae2ytWP85jXRo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
|
||||
"rev": "b3b2b28c1daa04fe2ae47c21bb76fd226eac4ca1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1717196966,
|
||||
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1717540489,
|
||||
"narHash": "sha256-rLOvm9eMjybsGfmAYbSs/6SiwBou2ZvWYIL+dRq1x14=",
|
||||
"lastModified": 1717521378,
|
||||
"narHash": "sha256-3UMMPUmY+sqGXuz+cZg5Ul7x8awrgrXmVg9L/Tv91QM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "e8d7e0cdeba6377051f88a2399140566101153f9",
|
||||
"rev": "9a42df165c2851b40e9288564e09b0aa54dda5f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -319,7 +303,6 @@
|
||||
"nixgl": "nixgl",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nur": "nur",
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
}
|
||||
|
10
flake.nix
10
flake.nix
@ -2,14 +2,13 @@
|
||||
description = "motiejus/config";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
flake-compat.url = "github:nix-community/flake-compat";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
agenix = {
|
||||
@ -76,7 +75,6 @@
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
agenix,
|
||||
deploy-rs,
|
||||
flake-utils,
|
||||
@ -115,10 +113,6 @@
|
||||
# TODO: copied from 24.05
|
||||
turbo = super.callPackage ./pkgs/turbo.nix {};
|
||||
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
inherit (super) system;
|
||||
};
|
||||
|
||||
crossArm64 = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
hostPlatform.config = "aarch64-linux";
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["usb_storage" "sd_mod" "xhci_pci" "thunderbolt" "nvme" "usbhid"];
|
||||
kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
|
||||
loader.systemd-boot.enable = true;
|
||||
supportedFilesystems = ["zfs"];
|
||||
zfs = {
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
myData,
|
||||
...
|
||||
|
@ -174,7 +174,6 @@
|
||||
tailscale.enable = true;
|
||||
node_exporter.enable = true;
|
||||
gitea.enable = true;
|
||||
snmp_exporter.enable = true;
|
||||
sshguard.enable = true;
|
||||
hass.enable = true;
|
||||
|
||||
@ -516,41 +515,6 @@
|
||||
job_name = "vno1-vinc.vincentas.jakst";
|
||||
static_configs = [{targets = ["${myData.hosts."vno1-vinc.vincentas.jakst".jakstIP}:9100"];}];
|
||||
}
|
||||
{
|
||||
job_name = "snmp_exporter";
|
||||
static_configs = [{targets = ["127.0.0.1:9116"];}];
|
||||
}
|
||||
{
|
||||
job_name = "snmp-mikrotik";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"192.168.189.2" # kids
|
||||
"192.168.189.3" # livingroom
|
||||
"192.168.189.4" # commbox
|
||||
];
|
||||
}
|
||||
];
|
||||
metrics_path = "./snmp";
|
||||
params = {
|
||||
auth = ["public_v2"];
|
||||
module = ["mikrotik"];
|
||||
};
|
||||
relabel_configs = [
|
||||
{
|
||||
source_labels = ["__address__"];
|
||||
target_label = "__param_target";
|
||||
}
|
||||
{
|
||||
source_labels = ["__param_target"];
|
||||
target_label = "instance";
|
||||
}
|
||||
{
|
||||
target_label = "__address__";
|
||||
replacement = "127.0.0.1:9116";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -48,7 +48,7 @@ in {
|
||||
"kernel.kptr_restrict" = "0";
|
||||
};
|
||||
|
||||
kernelPackages = lib.mkDefault pkgs.zfs.latestCompatibleLinuxPackages;
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages;
|
||||
|
||||
supportedFilesystems = ["btrfs"];
|
||||
};
|
||||
|
@ -53,25 +53,27 @@ in {
|
||||
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "us,lt";
|
||||
xkbOptions = "grp:alt_shift_toggle";
|
||||
xkb = {
|
||||
layout = "us,lt";
|
||||
options = "grp:alt_shift_toggle";
|
||||
};
|
||||
|
||||
desktopManager.xfce.enable = true;
|
||||
windowManager.awesome.enable = true;
|
||||
displayManager.lightdm.enable = true;
|
||||
};
|
||||
|
||||
displayManager = {
|
||||
lightdm.enable = true;
|
||||
defaultSession = "none+awesome";
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = username;
|
||||
};
|
||||
displayManager = {
|
||||
defaultSession = "none+awesome";
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = username;
|
||||
};
|
||||
};
|
||||
|
||||
@ -238,19 +240,15 @@ in {
|
||||
]
|
||||
(lib.mkIf (pkgs.stdenv.hostPlatform.system == "x86_64-linux") [
|
||||
i7z
|
||||
(nvtop.override {
|
||||
amd = true;
|
||||
intel = true;
|
||||
msm = false;
|
||||
nvidia = false;
|
||||
})
|
||||
nvtopPackages.amd
|
||||
nvtopPackages.intel
|
||||
joplin-desktop
|
||||
intel-gpu-tools
|
||||
|
||||
winetricks
|
||||
wineWowPackages.full
|
||||
])
|
||||
[pkgs.pkgs-unstable.undocker]
|
||||
[pkgs.undocker]
|
||||
];
|
||||
|
||||
# https://discourse.nixos.org/t/nixos-rebuild-switch-upgrade-networkmanager-wait-online-service-failure/30746
|
||||
|
@ -12,7 +12,6 @@
|
||||
./nsd-acme
|
||||
./postfix
|
||||
./remote-builder
|
||||
./snmp_exporter
|
||||
./sshguard
|
||||
./syncthing
|
||||
./tailscale
|
||||
|
@ -1,8 +0,0 @@
|
||||
How to upgrade snmp.yml
|
||||
|
||||
1. Extend generator.yml from the upstream generator.yml in snmp_exporter/generator/generator.yml
|
||||
2. Generate snmp.yml:
|
||||
|
||||
snmp_exporter/generator$ make mibs
|
||||
packages/snmp-yaml $ MIBDIRS=$HOME/code/snmp_exporter/generator/mibs /nix/store/wmymig1r9jfiaffbdpv1lyaj32rydbzc-snmp_exporter-0.21.0/bin/generator generate
|
||||
|
@ -1,28 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
myData,
|
||||
...
|
||||
}: {
|
||||
options.mj.services.snmp_exporter = with lib.types; {
|
||||
enable = lib.mkEnableOption "Enable prometheus snmp_exporter";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mj.services.snmp_exporter.enable {
|
||||
mj.services.friendlyport.ports = [
|
||||
{
|
||||
subnets = [myData.subnets.tailscale.cidr];
|
||||
tcp = [config.services.prometheus.exporters.snmp.port];
|
||||
}
|
||||
];
|
||||
|
||||
services.prometheus.exporters.snmp = {
|
||||
enable = true;
|
||||
configurationPath = pkgs.concatTextFile {
|
||||
name = "snmp.yml";
|
||||
files = [./snmp.yml];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
modules:
|
||||
# Default IF-MIB interfaces table with ifIndex.
|
||||
if_mib:
|
||||
walk: [sysUpTime, interfaces, ifXTable]
|
||||
lookups:
|
||||
- source_indexes: [ifIndex]
|
||||
lookup: ifAlias
|
||||
- source_indexes: [ifIndex]
|
||||
# Uis OID to avoid conflict with PaloAlto PAN-COMMON-MIB.
|
||||
lookup: 1.3.6.1.2.1.2.2.1.2 # ifDescr
|
||||
- source_indexes: [ifIndex]
|
||||
# Use OID to avoid conflict with Netscaler NS-ROOT-MIB.
|
||||
lookup: 1.3.6.1.2.1.31.1.1.1.1 # ifName
|
||||
overrides:
|
||||
ifAlias:
|
||||
ignore: true # Lookup metric
|
||||
ifDescr:
|
||||
ignore: true # Lookup metric
|
||||
ifName:
|
||||
ignore: true # Lookup metric
|
||||
ifType:
|
||||
type: EnumAsInfo
|
||||
|
||||
# Mikrotik Router
|
||||
#
|
||||
# http://download2.mikrotik.com/Mikrotik.mib
|
||||
mikrotik:
|
||||
walk:
|
||||
- interfaces
|
||||
- ifMIB
|
||||
- laIndex
|
||||
- sysUpTime
|
||||
- sysDescr
|
||||
- host
|
||||
- mikrotik
|
||||
lookups:
|
||||
- source_indexes: [ifIndex]
|
||||
lookup: ifName
|
||||
- source_indexes: [mtxrInterfaceStatsIndex]
|
||||
lookup: ifName
|
||||
- source_indexes: [hrStorageIndex]
|
||||
lookup: hrStorageDescr
|
||||
- source_indexes: [laIndex]
|
||||
lookup: laNames
|
||||
drop_source_indexes: true
|
||||
overrides:
|
||||
ifName:
|
||||
ignore: true # Lookup metric
|
||||
ifType:
|
||||
type: EnumAsInfo
|
File diff suppressed because it is too large
Load Diff
@ -70,9 +70,9 @@ in {
|
||||
[extract_url]
|
||||
|
||||
(lib.mkIf devTools [
|
||||
pkgs-unstable.go_1_22
|
||||
pkgs-unstable.go-tools
|
||||
pkgs-unstable.zig_0_12
|
||||
go_1_22
|
||||
go-tools
|
||||
zig_0_12
|
||||
])
|
||||
|
||||
(lib.mkIf hmOnly [
|
||||
@ -149,8 +149,8 @@ in {
|
||||
plugins = lib.mkMerge [
|
||||
[pkgs.vimPlugins.fugitive]
|
||||
(lib.mkIf devTools [
|
||||
pkgs.pkgs-unstable.vimPlugins.vim-go
|
||||
pkgs.pkgs-unstable.vimPlugins.zig-vim
|
||||
pkgs.vimPlugins.vim-go
|
||||
pkgs.vimPlugins.zig-vim
|
||||
])
|
||||
];
|
||||
extraConfig = builtins.readFile ./vimrc;
|
||||
|
@ -4,15 +4,16 @@
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: let
|
||||
#crossFast = pkgs.crossArm64.pkgsCross.aarch64-multiplatform;
|
||||
crossNative = pkgs.pkgsCross.aarch64-multiplatform;
|
||||
in {
|
||||
}:
|
||||
#let
|
||||
#crossFast = pkgs.crossArm64.pkgsCross.aarch64-multiplatform;
|
||||
#in
|
||||
{
|
||||
mj.skipPerf = true;
|
||||
|
||||
boot = {
|
||||
#kernelPackages = crossNative.linuxPackagesFor (crossFast.buildLinux rec {
|
||||
kernelPackages = crossNative.linuxPackagesFor (crossNative.buildLinux rec {
|
||||
kernelPackages = pkgs.linuxPackagesFor (pkgs.buildLinux rec {
|
||||
version = "6.9.0-rc1";
|
||||
modDirVersion = "6.9.0-rc1";
|
||||
|
||||
@ -59,6 +60,6 @@ in {
|
||||
inherit config lib pkgs;
|
||||
};
|
||||
#uboot = crossFast.callPackage ../../hacks/orangepi5plus/uboot {};
|
||||
uboot = crossNative.callPackage ../../hacks/orangepi5plus/uboot {};
|
||||
uboot = pkgs.callPackage ../../hacks/orangepi5plus/uboot {};
|
||||
};
|
||||
}
|
||||
|
@ -6,22 +6,18 @@
|
||||
mj.base.users.email = null;
|
||||
mj.base.users.user.extraGroups = ["docker"];
|
||||
|
||||
environment.systemPackages =
|
||||
(with pkgs; [
|
||||
#swc
|
||||
#nodejs
|
||||
#typescript
|
||||
#concurrently
|
||||
bats
|
||||
mysql80
|
||||
kubectl
|
||||
kubectl-node-shell
|
||||
kubectx
|
||||
google-cloud-sdk
|
||||
])
|
||||
++ (with pkgs.pkgs-unstable; [
|
||||
#turbo
|
||||
]);
|
||||
environment.systemPackages = with pkgs; [
|
||||
#swc
|
||||
#nodejs
|
||||
#typescript
|
||||
#concurrently
|
||||
bats
|
||||
mysql80
|
||||
kubectl
|
||||
kubectl-node-shell
|
||||
kubectx
|
||||
google-cloud-sdk
|
||||
];
|
||||
|
||||
services.clamav = {
|
||||
updater.enable = true;
|
||||
|
Loading…
Reference in New Issue
Block a user