mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add muop to wireguard
This commit is contained in:
parent
b739a26edf
commit
15053e74e0
4 changed files with 42 additions and 38 deletions
|
|
@ -37,7 +37,7 @@ in {
|
||||||
mods.server.sync.enable = true;
|
mods.server.sync.enable = true;
|
||||||
mods.tailscale.enable = true;
|
mods.tailscale.enable = true;
|
||||||
mods.openvpn.enable = false;
|
mods.openvpn.enable = false;
|
||||||
mods.wireguard.enable = true;
|
mods.wireguard.id = 2;
|
||||||
mods.i2p.enable = true;
|
mods.i2p.enable = true;
|
||||||
|
|
||||||
services.xserver.windowManager.i3.enable = true;
|
services.xserver.windowManager.i3.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ in {
|
||||||
mods.server.sync.enable = true;
|
mods.server.sync.enable = true;
|
||||||
mods.tailscale.enable = false;
|
mods.tailscale.enable = false;
|
||||||
mods.openvpn.enable = false;
|
mods.openvpn.enable = false;
|
||||||
mods.wireguard.enable = false;
|
mods.wireguard.id = 4;
|
||||||
|
|
||||||
services.xserver.windowManager.i3.enable = true;
|
services.xserver.windowManager.i3.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,12 @@ in with lib; {
|
||||||
options.mods = {
|
options.mods = {
|
||||||
i2p.enable = mkEnableOption "enables i2p network";
|
i2p.enable = mkEnableOption "enables i2p network";
|
||||||
tailscale.enable = mkEnableOption "enables tailscale";
|
tailscale.enable = mkEnableOption "enables tailscale";
|
||||||
wireguard.enable = mkEnableOption "enables wireguard client";
|
|
||||||
wireguard.id = mkOption {
|
wireguard.id = mkOption {
|
||||||
type = with types; nullOr ints.u8;
|
type = with types; nullOr ints.u8;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
openvpn.enable = mkEnableOption "enables openvpn config";
|
openvpn.enable = mkEnableOption "enables openvpn config";
|
||||||
openvpn.config = let
|
openvpn.config = let
|
||||||
username = "${config.mods.user.name}";
|
username = "${config.mods.user.name}";
|
||||||
|
|
@ -79,5 +80,8 @@ in with lib; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# gateway =
|
||||||
|
# "${pkgs.networkmanager}/bin/nmcli dev show ${interface} | ${pkgs.gnugrep}/bin/fgrep IP4.GATEWAY | ${pkgs.awk}/bin/awk {print $2}";
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,47 +1,47 @@
|
||||||
{ pkgs, lib, config, inputs, system, ... }: {
|
{ pkgs, lib, config, inputs, system, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
mods.nix.upgrade.enable = lib.mkEnableOption "enables nix auto upgrade";
|
mods.nix.upgrade.enable = lib.mkEnableOption "enables nix auto upgrade";
|
||||||
mods.nix.clean.enable = lib.mkEnableOption "enables nix auto cleaning";
|
mods.nix.clean.enable = lib.mkEnableOption "enables nix auto cleaning";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config =
|
||||||
|
let flake = "${config.environment.sessionVariables.XDG_CONFIG_HOME}/home";
|
||||||
|
in {
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = config.mods.nix.upgrade.enable;
|
||||||
|
flake = flake;
|
||||||
|
flags = [ "--commit-lock-file" "-L" ];
|
||||||
|
dates = "02:00";
|
||||||
|
randomizedDelaySec = "45min";
|
||||||
|
};
|
||||||
|
|
||||||
system.autoUpgrade = {
|
programs.nh = {
|
||||||
enable = config.mods.nix.upgrade.enable;
|
enable = true;
|
||||||
flake = inputs.self.outPath;
|
clean.enable = config.mods.nix.clean.enable;
|
||||||
flags = [ "--commit-lock-file" "-L" ];
|
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||||
dates = "02:00";
|
flake = flake;
|
||||||
randomizedDelaySec = "45min";
|
};
|
||||||
};
|
|
||||||
|
|
||||||
programs.nh = {
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
enable = true;
|
nix.settings = {
|
||||||
clean.enable = config.mods.nix.clean.enable;
|
substituters = [
|
||||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
"https://cache.nixos.org"
|
||||||
flake = inputs.self.outPath;
|
"https://nix-community.cachix.org"
|
||||||
};
|
"https://nixpkgs-unfree.cachix.org"
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
environment.systemPackages = with pkgs; [
|
||||||
nix.settings = {
|
inputs.nix-alien.packages.${system}.nix-alien
|
||||||
substituters = [
|
colmena
|
||||||
"https://cache.nixos.org"
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://nixpkgs-unfree.cachix.org"
|
|
||||||
"https://hyprland.cachix.org"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
|
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
];
|
];
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
inputs.nix-alien.packages.${system}.nix-alien
|
|
||||||
colmena
|
|
||||||
];
|
|
||||||
programs.nix-ld.enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue