chore: improve code formatting and configuration across multiple files
The diff shows comprehensive code cleanup and formatting improvements across 18 files, including cleaner argument structures, additional package configurations, and improved formatting in the `home/terminal/software/git.nix` hook script.
This commit is contained in:
Generated
+21
@@ -308,11 +308,32 @@
|
||||
"nixos-24-05": "nixos-24-05",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"rustlock": "rustlock",
|
||||
"sops-nix": "sops-nix",
|
||||
"systems": "systems_3",
|
||||
"zen-browser": "zen-browser"
|
||||
}
|
||||
},
|
||||
"rustlock": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1782663473,
|
||||
"narHash": "sha256-wPpiuL3EVvNb3+9QgRGtopZXbebb9uUs3Slwuigvh8w=",
|
||||
"owner": "JorySeverijnse",
|
||||
"repo": "rustlock",
|
||||
"rev": "76039750623825172fbee93adae8bb48d4ad36ad",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "JorySeverijnse",
|
||||
"repo": "rustlock",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
||||
@@ -104,6 +104,11 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
rustlock = {
|
||||
url = "github:JorySeverijnse/rustlock";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-index-db = {
|
||||
url = "github:Mic92/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"Mod+B".spawn._args = ["zen"];
|
||||
"Mod+Return".spawn._args = ["alacritty"];
|
||||
"Mod+Q".close-window = {};
|
||||
"Mod+Shift+P".spawn._args = ["rofi-powermenu"];
|
||||
"Mod+Shift+P".spawn._args = ["rustlock" "--screenshots" "--clock" "--effect-blur" "7x5" "--effect-vignette" "0.5:0.5"];
|
||||
"Mod+S".switch-preset-column-width = {};
|
||||
"Mod+F".fullscreen-window = {};
|
||||
"Mod+1".set-column-width = "25%";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
@@ -172,19 +172,40 @@
|
||||
sops = {
|
||||
defaultSopsFile = ./../../secrets/secrets.yaml;
|
||||
secrets = {
|
||||
gitea_laptop = { owner = "someone"; group = "users"; mode = "0400"; };
|
||||
github_laptop = { owner = "someone"; group = "users"; mode = "0400"; };
|
||||
hetzner_server = { owner = "someone"; group = "users"; mode = "0400"; };
|
||||
gitea_laptop = {
|
||||
owner = "someone";
|
||||
group = "users";
|
||||
mode = "0400";
|
||||
};
|
||||
github_laptop = {
|
||||
owner = "someone";
|
||||
group = "users";
|
||||
mode = "0400";
|
||||
};
|
||||
hetzner_server = {
|
||||
owner = "someone";
|
||||
group = "users";
|
||||
mode = "0400";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
(_self: super: {
|
||||
cisco-secure-client = super.callPackage ../../pkgs/cisco-secure-client {};
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = [pkgs.cryptsetup pkgs.age pkgs.nixd pkgs.apparmor-parser pkgs.xdg-desktop-portal-wlr];
|
||||
security.pam.services.rustlock.text = "auth include login";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
cryptsetup
|
||||
age
|
||||
nixd
|
||||
apparmor-parser
|
||||
xdg-desktop-portal-wlr
|
||||
inputs.rustlock.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
];
|
||||
}
|
||||
|
||||
+2
-3
@@ -5,7 +5,6 @@
|
||||
}: let
|
||||
# shorten paths
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
lib = inputs.nixpkgs.lib;
|
||||
# Server uses its own pinned 24.05 nixpkgs (kept isolated from the laptop's unstable)
|
||||
nixosSystem24 = inputs.nixos-24-05.lib.nixosSystem;
|
||||
unstablePkgs = import inputs.nixpkgs-unstable {system = "x86_64-linux";};
|
||||
@@ -60,7 +59,7 @@ in {
|
||||
++ sharedModules
|
||||
++ [
|
||||
"${mod}/services/location.nix"
|
||||
({ config, ... }: {
|
||||
({...}: {
|
||||
boot.loader.limine.bootMode = "uefi";
|
||||
})
|
||||
];
|
||||
@@ -74,7 +73,7 @@ in {
|
||||
++ sharedModules
|
||||
++ [
|
||||
"${mod}/services/location.nix"
|
||||
({ config, ... }: {
|
||||
({...}: {
|
||||
boot.loader.limine.bootMode = "bios";
|
||||
boot.loader.limine.biosDevice = "/dev/nvme0n1";
|
||||
})
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
{ lib, stdenv, fetchurl, dpkg, makeWrapper, patchelf
|
||||
, coreutils, systemd, glib, zlib, xz, curl, libxml2
|
||||
}:
|
||||
|
||||
let
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
dpkg,
|
||||
makeWrapper,
|
||||
patchelf,
|
||||
coreutils,
|
||||
systemd,
|
||||
glib,
|
||||
zlib,
|
||||
xz,
|
||||
curl,
|
||||
libxml2,
|
||||
}: let
|
||||
version = "5.1.17.3394";
|
||||
# libxml2's "out" output has lib/libxml2.so.16
|
||||
libxml2_out = libxml2.out;
|
||||
@@ -10,9 +20,16 @@ let
|
||||
# System library RPATH for all bundled ELF binaries (cisco's own lib dir is
|
||||
# appended during fixupPhase via $out)
|
||||
sysRpath = lib.makeLibraryPath [
|
||||
systemd glib zlib xz stdenv.cc.cc.lib curl libxml2_out
|
||||
systemd
|
||||
glib
|
||||
zlib
|
||||
xz
|
||||
stdenv.cc.cc.lib
|
||||
curl
|
||||
libxml2_out
|
||||
];
|
||||
in stdenv.mkDerivation {
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "cisco-secure-client";
|
||||
inherit version;
|
||||
|
||||
@@ -24,7 +41,13 @@ in stdenv.mkDerivation {
|
||||
nativeBuildInputs = [dpkg makeWrapper patchelf];
|
||||
|
||||
buildInputs = [
|
||||
systemd glib zlib xz stdenv.cc.cc.lib curl libxml2_out
|
||||
systemd
|
||||
glib
|
||||
zlib
|
||||
xz
|
||||
stdenv.cc.cc.lib
|
||||
curl
|
||||
libxml2_out
|
||||
];
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
@@ -22,5 +22,11 @@
|
||||
../../modules/services/backup.nix
|
||||
];
|
||||
|
||||
# Only 4GB RAM — limit nix builds to one core at a time to avoid OOM
|
||||
nix.settings = {
|
||||
cores = 1;
|
||||
max-jobs = 1;
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swap";
|
||||
size = 2048;
|
||||
size = 8192;
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
disabled = ["empty_pattern"]
|
||||
disabled = ["empty_pattern", "repeated_keys"]
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
# Fingerprint scanner configuration
|
||||
#
|
||||
# Enable on laptops with a fingerprint reader:
|
||||
@@ -10,7 +13,6 @@
|
||||
# hardware.fingerprint.todDriver = pkgs.libfprint-2-tod1-goodix;
|
||||
#
|
||||
# Reference: https://wiki.nixos.org/wiki/Fingerprint_scanner
|
||||
|
||||
let
|
||||
cfg = config.hardware.fingerprint;
|
||||
in {
|
||||
|
||||
+9
-4
@@ -1,5 +1,9 @@
|
||||
{ config, lib, pkgs, self, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
# Cisco Secure Client (proprietary VPN client, successor to AnyConnect)
|
||||
#
|
||||
# Package: pkgs/cisco-secure-client — fetches the Linux pre-deployment .tgz
|
||||
@@ -11,12 +15,13 @@
|
||||
# });
|
||||
#
|
||||
# Reference: https://github.com/NixOS/nixpkgs/issues/265443
|
||||
|
||||
let
|
||||
cfg = config.work.cisco;
|
||||
in {
|
||||
options.work.cisco = {
|
||||
enable = lib.mkEnableOption "Cisco Secure Client" // {
|
||||
enable =
|
||||
lib.mkEnableOption "Cisco Secure Client"
|
||||
// {
|
||||
default = false;
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }: {
|
||||
{...}: {
|
||||
imports = [
|
||||
./overlay.nix
|
||||
./cisco.nix
|
||||
|
||||
+10
-4
@@ -1,5 +1,10 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
# Himmelblau: Microsoft Entra ID authentication for Linux
|
||||
#
|
||||
# Authenticates Linux users against the digistate.nl Entra ID tenant.
|
||||
@@ -14,7 +19,6 @@
|
||||
# References:
|
||||
# - https://himmelblau-idm.org/docs/
|
||||
# - https://github.com/himmelblau-idm/himmelblau
|
||||
|
||||
let
|
||||
cfg = config.work.himmelblau;
|
||||
in {
|
||||
@@ -23,7 +27,9 @@ in {
|
||||
];
|
||||
|
||||
options.work.himmelblau = {
|
||||
enable = lib.mkEnableOption "Himmelblau Entra ID authentication" // {
|
||||
enable =
|
||||
lib.mkEnableOption "Himmelblau Entra ID authentication"
|
||||
// {
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
+6
-3
@@ -1,10 +1,13 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
# Microsoft Defender for Endpoint
|
||||
#
|
||||
# References:
|
||||
# - https://github.com/epetousis/nix-mdatp
|
||||
|
||||
let
|
||||
cfg = config.work.mdatp;
|
||||
in {
|
||||
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
{...}: {
|
||||
# Overlay to add cisco-secure-client to pkgs
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
(_self: super: {
|
||||
cisco-secure-client = super.callPackage ./pkgs/cisco-secure-client {};
|
||||
})
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user