diff --git a/home/applications/sway/default.nix b/home/applications/sway/default.nix index bc0e5dc..72ac112 100644 --- a/home/applications/sway/default.nix +++ b/home/applications/sway/default.nix @@ -36,15 +36,13 @@ config = { ### Visuals output."*".bg = "${inputs.self.legacyPackages.${pkgs.stdenv.hostPlatform.system}.background} fill"; - bars = [ - { - statusCommand = "${lib.getExe pkgs.i3status-rust} $HOME/.config/i3status-rust/config-default.toml"; - position = "top"; - extraConfig = '' - icon_theme ${config.gtk.iconTheme.name} - ''; - } - ]; + bars = lib.singleton { + statusCommand = "${lib.getExe pkgs.i3status-rust} $HOME/.config/i3status-rust/config-default.toml"; + position = "top"; + extraConfig = '' + icon_theme ${config.gtk.iconTheme.name} + ''; + }; ### Inputs input = { diff --git a/hosts/blacksteel/hardware-configuration.nix b/hosts/blacksteel/hardware-configuration.nix index 3aa5270..67079a9 100644 --- a/hosts/blacksteel/hardware-configuration.nix +++ b/hosts/blacksteel/hardware-configuration.nix @@ -1,4 +1,5 @@ { + lib, inputs, config, ... @@ -43,7 +44,5 @@ fsType = "vfat"; }; }; - swapDevices = [ - { device = "/dev/disk/by-uuid/8a2e90a9-5cc2-40fc-82fe-69ef3cd88e29"; } - ]; + swapDevices = lib.singleton { device = "/dev/disk/by-uuid/8a2e90a9-5cc2-40fc-82fe-69ef3cd88e29"; }; } diff --git a/hosts/blacksteel/services/matrix.nix b/hosts/blacksteel/services/matrix.nix index c573905..7c266e7 100644 --- a/hosts/blacksteel/services/matrix.nix +++ b/hosts/blacksteel/services/matrix.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ lib, config, ... }: { services.matrix-synapse = { enable = true; @@ -13,15 +13,13 @@ { path = "/run/matrix-synapse/synapse.sock"; type = "http"; - resources = [ - { - names = [ - "client" - "federation" - ]; - compress = true; - } - ]; + resources = lib.singleton { + names = [ + "client" + "federation" + ]; + compress = true; + }; } ]; @@ -32,25 +30,23 @@ }; # https://element-hq.github.io/synapse/latest/openid.html#keycloak - oidc_providers = [ - { - idp_id = "keycloak"; - idp_name = "id.ny4.dev"; - issuer = "https://id.ny4.dev/realms/ny4"; - client_id = "synapse"; - client_secret_path = config.sops.secrets."synapse/oidc".path; - scopes = [ - "openid" - "profile" - ]; - user_mapping_provider.config = { - localpart_template = "{{ user.preferred_username }}"; - display_name_template = "{{ user.name }}"; - }; - backchannel_logout_enabled = true; - allow_existing_users = true; - } - ]; + oidc_providers = lib.singleton { + idp_id = "keycloak"; + idp_name = "id.ny4.dev"; + issuer = "https://id.ny4.dev/realms/ny4"; + client_id = "synapse"; + client_secret_path = config.sops.secrets."synapse/oidc".path; + scopes = [ + "openid" + "profile" + ]; + user_mapping_provider.config = { + localpart_template = "{{ user.preferred_username }}"; + display_name_template = "{{ user.name }}"; + }; + backchannel_logout_enabled = true; + allow_existing_users = true; + }; }; }; diff --git a/hosts/tyo0/default.nix b/hosts/tyo0/default.nix index 9e4d961..f35737d 100644 --- a/hosts/tyo0/default.nix +++ b/hosts/tyo0/default.nix @@ -25,12 +25,10 @@ boot.loader.grub.device = lib.mkForce "/dev/nvme0n1"; system.stateVersion = "24.05"; - swapDevices = [ - { - device = "/var/lib/swapfile"; - size = 4 * 1024; # 4 GiB - } - ]; + swapDevices = lib.singleton { + device = "/var/lib/swapfile"; + size = 4 * 1024; # 4 GiB + }; # WORKAROUND: systemd.services."print-host-key".enable = false; diff --git a/hosts/tyo0/services/sing-box.nix b/hosts/tyo0/services/sing-box.nix index 826d5ce..8b8b247 100644 --- a/hosts/tyo0/services/sing-box.nix +++ b/hosts/tyo0/services/sing-box.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ lib, config, ... }: { networking.firewall.allowedTCPPorts = [ 27253 @@ -30,12 +30,10 @@ } ]; - outbounds = [ - { - type = "direct"; - tag = "direct"; - } - ]; + outbounds = lib.singleton { + type = "direct"; + tag = "direct"; + }; route = { final = "direct"; diff --git a/nixos/profiles/sing-box/default.nix b/nixos/profiles/sing-box/default.nix index 5352145..334e663 100644 --- a/nixos/profiles/sing-box/default.nix +++ b/nixos/profiles/sing-box/default.nix @@ -12,16 +12,14 @@ level = "info"; }; - inbounds = [ - { - type = "http"; - tag = "inbound"; - listen = "127.0.0.1"; - listen_port = 1080; - sniff = true; - sniff_override_destination = true; - } - ]; + inbounds = lib.singleton { + type = "http"; + tag = "inbound"; + listen = "127.0.0.1"; + listen_port = 1080; + sniff = true; + sniff_override_destination = true; + }; outbounds = [ {