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:
+16
-11
@@ -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,14 +15,15 @@
|
||||
# });
|
||||
#
|
||||
# Reference: https://github.com/NixOS/nixpkgs/issues/265443
|
||||
|
||||
let
|
||||
cfg = config.work.cisco;
|
||||
in {
|
||||
options.work.cisco = {
|
||||
enable = lib.mkEnableOption "Cisco Secure Client" // {
|
||||
default = false;
|
||||
};
|
||||
enable =
|
||||
lib.mkEnableOption "Cisco Secure Client"
|
||||
// {
|
||||
default = false;
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
description = "cisco-secure-client package to use";
|
||||
@@ -41,14 +46,14 @@ in {
|
||||
];
|
||||
|
||||
# Load the tun module required by the VPN client
|
||||
boot.kernelModules = [ "tun" ];
|
||||
boot.kernelModules = ["tun"];
|
||||
|
||||
systemd.services.cisco-vpnagentd = {
|
||||
description = "Cisco Secure Client VPN Agent Daemon";
|
||||
# vpnagentd daemonizes itself; tracked via PID file.
|
||||
after = [ "network-online.target" "NetworkManager.service" ];
|
||||
wants = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = ["network-online.target" "NetworkManager.service"];
|
||||
wants = ["network-online.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
@@ -81,7 +86,7 @@ in {
|
||||
"CAP_CHOWN"
|
||||
"CAP_FOWNER"
|
||||
];
|
||||
DeviceAllow = [ "/dev/net/tun rw" ];
|
||||
DeviceAllow = ["/dev/net/tun rw"];
|
||||
PrivateTmp = true;
|
||||
ProtectSystem = "full";
|
||||
ProtectHome = false;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }: {
|
||||
{...}: {
|
||||
imports = [
|
||||
./overlay.nix
|
||||
./cisco.nix
|
||||
|
||||
+13
-7
@@ -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,16 +27,18 @@ in {
|
||||
];
|
||||
|
||||
options.work.himmelblau = {
|
||||
enable = lib.mkEnableOption "Himmelblau Entra ID authentication" // {
|
||||
default = false;
|
||||
};
|
||||
enable =
|
||||
lib.mkEnableOption "Himmelblau Entra ID authentication"
|
||||
// {
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.himmelblau = {
|
||||
enable = true;
|
||||
settings = {
|
||||
domain = [ "digistate.nl" ];
|
||||
domain = ["digistate.nl"];
|
||||
# Uncomment and set to Entra ID group Object IDs or names to
|
||||
# restrict which users can authenticate:
|
||||
# pam_allow_groups = [ "ENTRA-GROUP-GUID-HERE" ];
|
||||
|
||||
+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 {
|
||||
|
||||
+3
-4
@@ -1,9 +1,8 @@
|
||||
{ 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