fix formatting
This commit is contained in:
parent
3417784008
commit
cf401b300c
@ -336,7 +336,7 @@ in
|
||||
cycle-windows-backward = [ "" ];
|
||||
activate-window-menu = [ "" ];
|
||||
cycle-panels = [ "" ];
|
||||
cycle-panels-backward = [ ""];
|
||||
cycle-panels-backward = [ "" ];
|
||||
switch-panels = [ "" ];
|
||||
switch-panels-backward = [ "" ];
|
||||
switch-applications = [ "<Super>Tab" ];
|
||||
|
@ -25,9 +25,11 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
xdg.configFile."kermit.conf".text = (lib.generators.toKeyValue {
|
||||
mkKeyValue = lib.generators.mkKeyValueDefault {} " ";
|
||||
} cfg.settings) + cfg.extraConfig;
|
||||
xdg.configFile."kermit.conf".text = (lib.generators.toKeyValue
|
||||
{
|
||||
mkKeyValue = lib.generators.mkKeyValueDefault { } " ";
|
||||
}
|
||||
cfg.settings) + cfg.extraConfig;
|
||||
|
||||
home.packages = [ pkgs.kermit-terminal ];
|
||||
};
|
||||
|
@ -77,9 +77,11 @@ in
|
||||
dhall.dhall-lang
|
||||
dhall.vscode-dhall-lsp-server
|
||||
elmtooling.elm-ls-vscode
|
||||
(rust-lang.rust-analyzer.override { rust-analyzer = pkgs.writeShellScriptBin "rust-analyzer" ''
|
||||
(rust-lang.rust-analyzer.override {
|
||||
rust-analyzer = pkgs.writeShellScriptBin "rust-analyzer" ''
|
||||
exec rust-analyzer "$@"
|
||||
''; })
|
||||
'';
|
||||
})
|
||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "vscode-autohide";
|
||||
|
@ -38,7 +38,8 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
config = let qr = "${toString cfg.quantum}/${toString cfg.rate}";
|
||||
config =
|
||||
let qr = "${toString cfg.quantum}/${toString cfg.rate}";
|
||||
in mkIf cfg.enable {
|
||||
hardware.pulseaudio.enable = lib.mkDefault false;
|
||||
sound.enable = lib.mkDefault false;
|
||||
@ -175,7 +176,8 @@ in {
|
||||
];
|
||||
|
||||
environment.etc."wireplumber/main.lua.d/51-alsa-config.lua" =
|
||||
mkIf cfg.lowLatency { text = ''
|
||||
mkIf cfg.lowLatency {
|
||||
text = ''
|
||||
alsa_monitor.properties = {
|
||||
["audio.rate"] = ${
|
||||
toString (cfg.rate * (if cfg.usbSoundcard then 2 else 1))
|
||||
@ -184,7 +186,8 @@ in {
|
||||
["api.alsa.headroom"] = 512,
|
||||
["api.alsa.period-size"] = ${toString cfg.periodSize}
|
||||
}
|
||||
''; };
|
||||
'';
|
||||
};
|
||||
|
||||
environment.etc."wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||
bluez_monitor.properties = {
|
||||
|
@ -25,7 +25,8 @@ let
|
||||
rangesOutput = pkgs.runCommandNoCC "exclusionary-wildcard-ranges" { } ''
|
||||
${pkgs.python3}/bin/python3 ${generateRangesScript} > $out
|
||||
'';
|
||||
in lib.splitString ":" (builtins.readFile "${rangesOutput}");
|
||||
in
|
||||
lib.splitString ":" (builtins.readFile "${rangesOutput}");
|
||||
|
||||
subnet = vlanIP: vlanSize:
|
||||
let
|
||||
@ -38,7 +39,8 @@ let
|
||||
subnetOutput = pkgs.runCommandNoCC "subnet-without-host-bits" { } ''
|
||||
${pkgs.python3}/bin/python3 ${generateSubnetScript} > $out
|
||||
'';
|
||||
in builtins.readFile "${subnetOutput}";
|
||||
in
|
||||
builtins.readFile "${subnetOutput}";
|
||||
|
||||
serverOpts.options = {
|
||||
ip = mkOption {
|
||||
@ -86,7 +88,8 @@ let
|
||||
description = "The IP to use on the wg VLAN";
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.ezwg = {
|
||||
enable = mkEnableOption "Enable simple Wireguard connection";
|
||||
instances = mkOption {
|
||||
@ -99,37 +102,49 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.checkReversePath = false;
|
||||
|
||||
systemd.paths = mapAttrs' (instName: inst: {
|
||||
systemd.paths = mapAttrs'
|
||||
(instName: inst: {
|
||||
name = "wireguard-${instName}";
|
||||
value = if inst.autoStart then { } else { wantedBy = mkForce [ ]; };
|
||||
}) cfg.instances;
|
||||
})
|
||||
cfg.instances;
|
||||
|
||||
systemd.services = lib.listToAttrs (flatten (mapAttrsToList (instName: inst:
|
||||
systemd.services = lib.listToAttrs (flatten (mapAttrsToList
|
||||
(instName: inst:
|
||||
[{
|
||||
name = "wireguard-${instName}";
|
||||
value = if inst.autoStart then { } else { wantedBy = mkForce [ ]; };
|
||||
}] ++ map (server: {
|
||||
}] ++ map
|
||||
(server: {
|
||||
name =
|
||||
"wireguard-${instName}-peer${peerNameReplacement server.publicKey}";
|
||||
value = if inst.autoStart then { } else { wantedBy = mkForce [ ]; };
|
||||
}) inst.servers) cfg.instances));
|
||||
})
|
||||
inst.servers)
|
||||
cfg.instances));
|
||||
|
||||
networking.wireguard.interfaces = mapAttrs (instName: inst:
|
||||
networking.wireguard.interfaces = mapAttrs
|
||||
(instName: inst:
|
||||
let
|
||||
allowedIPs = if inst.proxy then
|
||||
allowedIPs =
|
||||
if inst.proxy then
|
||||
ranges (map (s: s.ip) inst.servers)
|
||||
else
|
||||
[ (subnet inst.vlanIP inst.vlanSize) ];
|
||||
in {
|
||||
in
|
||||
{
|
||||
ips = [ "${inst.vlanIP}/${toString inst.vlanSize}" ];
|
||||
privateKeyFile = inst.privateKeyFile;
|
||||
peers = map (server: {
|
||||
peers = map
|
||||
(server: {
|
||||
inherit allowedIPs;
|
||||
publicKey = server.publicKey;
|
||||
endpoint = "${server.ip}:${toString server.port}";
|
||||
persistentKeepalive = 25;
|
||||
}) inst.servers;
|
||||
}) cfg.instances;
|
||||
})
|
||||
inst.servers;
|
||||
})
|
||||
cfg.instances;
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ let
|
||||
platforms = super.meta.platforms ++ [ "x86_64-linux" ];
|
||||
};
|
||||
});
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.fuckingprint.enable = mkEnableOption "Make my fucking printer work";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
Loading…
Reference in New Issue
Block a user