Remove unused code

This commit is contained in:
Jakob Lechner 2025-04-09 22:44:36 +02:00
parent af5a07ca19
commit 48e71f75f8
104 changed files with 151 additions and 229 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
lib.mkIf config.jalr.gui.enable {
programs.adb.enable = true;

View file

@ -4,7 +4,7 @@
options.jalr.aws = {
enable = lib.mkEnableOption "Enable AWS CLI";
accounts = with lib; mkOption {
type = with types; attrsOf (submodule ({ config, name, ... }: {
type = with types; attrsOf (submodule (_: {
options = {
sso_account_id = mkOption {
type = int;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
lib.mkIf (config.jalr.bootloader == "grub2") {
boot.loader.grub = {

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
lib.mkIf (config.jalr.gui.enable && config.jalr.gui.desktop == "gnome") {
services.xserver = {

View file

@ -1,5 +1,3 @@
{ lib, ... }:
{
services.journald.extraConfig = ''
MaxRetentionSec=90day

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
portRange = {

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }:
{ config, ... }:
{
i18n = {
defaultLocale = "en_GB.UTF-8";

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.jalr.luksUsbUnlock;
in
@ -59,7 +59,7 @@ in
kernelModules = [ "uas" "usbcore" "usb_storage" "vfat" "nls_cp437" "nls_iso8859_1" ];
systemd.services =
let
makeService = name: { keyPath, usbDevice, waitForDevice }:
makeService = name: { usbDevice, waitForDevice, ... }:
let
usbDevPath = makeUsbDevPath usbDevice;
usbMountPath = makeMountPath usbDevice;
@ -106,7 +106,7 @@ in
cfg.devices;
luks.devices = builtins.mapAttrs
(name: { keyPath, usbDevice, ... }:
(_: { keyPath, usbDevice, ... }:
let
usbMountPath = makeMountPath usbDevice;
in

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.jalr.mailserver;
in

View file

@ -1,7 +1,5 @@
{ config, lib, pkgs, ... }:
let
cfg = config.jalr.matrix;
in
{
options.jalr.matrix = with lib; with lib.types; {
enable = mkEnableOption "simple matrix server";

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.jalr.matrix;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.jalr.matrix;

View file

@ -79,7 +79,7 @@ lib.mkIf cfg.enable {
matrix-synapse.settings.app_service_config_files = lib.attrsets.mapAttrsToList
(
name: value:
name: _:
"/run/matrix-synapse/app_service_config/${name}.yaml"
)
cfg.synapse.app_service_config;
@ -108,8 +108,7 @@ lib.mkIf cfg.enable {
systemd.services.matrix-synapse = {
restartTriggers = lib.attrsets.mapAttrsToList
(
name: value:
"${value}"
_: value: "${value}"
)
cfg.synapse.app_service_config;
serviceConfig = {

View file

@ -5,6 +5,7 @@
{
imports = [
./network-manager.nix
./ports.nix
];
networking.firewall.logRefusedConnections = lib.mkDefault false;

View file

@ -0,0 +1,20 @@
{lib, ...}:
{
options.networking.ports = with lib; with lib.types; mkOption {
type = attrsOf (types.submodule {
options = {
tcp = mkOption {
type = oneOf [ port (listOf port) (attrsOf port) (listOf (attrsOf lib.types.port)) ];
description = "TCP ports";
default = [ ];
};
udp = mkOption {
type = oneOf [ port (listOf port) (attrsOf port) (listOf (attrsOf lib.types.port)) ];
description = "UDP ports";
default = [ ];
};
};
});
};
}

View file

@ -42,7 +42,7 @@
nixpkgs.overlays = [
inputs.self.overlays.default
(final: prev: {
(_: prev: {
master = import inputs.nixpkgsMaster {
inherit system;
inherit (prev) config;

View file

@ -1,5 +1,3 @@
{ config, lib, ... }:
{
services.udev.extraRules = ''
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="04f9", ATTR{idProduct}=="2061", OWNER="root", GROUP="users", MODE="660"

View file

@ -1,4 +1,4 @@
{ config, inputs, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.jalr.qbittorrent;
in

View file

@ -1,4 +1,3 @@
{ pkgs, inputs, ... }:
let
commandsWithoutPassword = [
"/run/current-system/sw/bin/systemctl restart tor.service"

View file

@ -1,5 +1,3 @@
{ config, lib, pkgs, ... }:
{
services.udev.extraRules = ''
# uDMX