Modularize stuff better

This commit is contained in:
Pim Kunis 2024-10-27 12:23:20 +01:00
parent 5b92ddde89
commit d427be6e4a
20 changed files with 417 additions and 321 deletions

View file

@ -419,7 +419,7 @@
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-stable": [ "nixpkgs-stable": [
"nixpkgs" "nixpkgs-unstable"
], ],
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },

125
flake.nix
View file

@ -40,10 +40,9 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# nixpkgs-cosmic.follows = "nixos-cosmic/nixpkgs-stable";
nixos-cosmic = { nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic"; url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs-stable.follows = "nixpkgs"; inputs.nixpkgs-stable.follows = "nixpkgs-unstable";
}; };
}; };
@ -67,110 +66,30 @@
treefmtEval = forAllSystems ( treefmtEval = forAllSystems (
system: inputs.treefmt-nix.lib.evalModule (pkgsForSystem system) ./treefmt.nix system: inputs.treefmt-nix.lib.evalModule (pkgsForSystem system) ./treefmt.nix
); );
mkNixosSystem = {
extraModule,
nixpkgs' ? nixpkgs,
useDefaultConfiguration ? true,
}:
nixpkgs'.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs system;
flake = self;
};
modules =
[
extraModule
]
++ nixpkgs'.lib.optional useDefaultConfiguration ./nixos;
};
in { in {
formatter = forAllSystems (system: (treefmtEval.${system}.config.build.wrapper)); formatter = forAllSystems (system: (treefmtEval.${system}.config.build.wrapper));
nixosConfigurations = { nixosConfigurations = nixpkgs.lib.mapAttrs (
sue-cosmic = mkNixosSystem { name: {
useDefaultConfiguration = false; nixosModule,
extraModule = {...}: { homeManagerModule,
imports = [ }:
inputs.nixos-hardware.nixosModules.dell-xps-13-9310 nixpkgs.lib.nixosSystem rec {
inputs.nixos-cosmic.nixosModules.default system = "x86_64-linux";
./modules/nixos/lanzaboote.nix
specialArgs = {
inherit inputs system;
flake = self;
};
modules = [
nixosModule
./nixos
{
home-manager.users.pim.imports = [homeManagerModule];
}
]; ];
}
config = { ) (import ./machines);
nixpkgs.config.allowUnfree = true;
nix.settings = {
substituters = ["https://cosmic.cachix.org/"];
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
};
users = {
users.pim = {
isNormalUser = true;
extraGroups = ["wheel" "docker" "input" "wireshark" "dialout"];
};
};
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
pim.lanzaboote.enable = true;
networking.hostName = "xps-9315";
swapDevices = [{device = "/dev/disk/by-uuid/96a43c35-0174-4e92-81f0-168a5f601f0b";}];
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/31638735-5cc4-4013-8037-17e30edcbb0a";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/560E-F8A2";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
};
boot.initrd.luks.devices."luks-8ffd3129-4908-4209-98c4-4eb68a35c494".device = "/dev/disk/by-uuid/8ffd3129-4908-4209-98c4-4eb68a35c494";
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage"];
};
};
};
sue = mkNixosSystem {
extraModule = {...}: {
imports = [inputs.nixos-hardware.nixosModules.dell-xps-13-9310];
config = {
pim.lanzaboote.enable = true;
networking.hostName = "xps-9315";
swapDevices = [{device = "/dev/disk/by-uuid/96a43c35-0174-4e92-81f0-168a5f601f0b";}];
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/31638735-5cc4-4013-8037-17e30edcbb0a";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/560E-F8A2";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
};
nix.settings = {
substituters = ["https://cosmic.cachix.org/"];
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
};
boot.initrd.luks.devices."luks-8ffd3129-4908-4209-98c4-4eb68a35c494".device = "/dev/disk/by-uuid/8ffd3129-4908-4209-98c4-4eb68a35c494";
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage"];
};
};
};
};
}; };
} }

View file

@ -11,7 +11,8 @@
./firefox ./firefox
./tidal.nix ./tidal.nix
./gnome.nix ./gnome.nix
./gnome.nix ./syncthing.nix
./vscode.nix
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
inputs.nix-index-database.hmModules.nix-index inputs.nix-index-database.hmModules.nix-index
]; ];

View file

@ -1,6 +1,7 @@
{ {
pkgs, pkgs,
lib, lib,
config,
... ...
}: let }: let
firefoxAddons = import ./addons.nix pkgs lib; firefoxAddons = import ./addons.nix pkgs lib;
@ -17,8 +18,11 @@
"browser.newtabpage.activity-stream.showSponsored" = false; "browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false; "browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
}; };
cfg = config.pim.firefox;
in { in {
config = { options.pim.firefox.enable = lib.mkEnableOption "firefox";
config = lib.mkIf cfg.enable {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
profiles = { profiles = {

View file

@ -4,85 +4,91 @@
flake, flake,
config, config,
... ...
}: { }: let
home.packages = with pkgs; [gnome.gnome-tweaks]; cfg = config.pim.gnome;
in {
options.pim.gnome.enable = lib.mkEnableOption "gnome";
dconf.settings = with lib.hm.gvariant; { config = lib.mkIf cfg.enable {
"org/gnome/desktop/sound".allow-volume-above-100-percent = true; home.packages = with pkgs; [gnome.gnome-tweaks];
"org/gnome/desktop/wm.preferences".num-workspaces = 4;
"org/gnome/mutter".edge-tiling = true;
"org/gnome/shell" = { dconf.settings = with lib.hm.gvariant; {
disable-extension-version-validation = true; "org/gnome/desktop/sound".allow-volume-above-100-percent = true;
"org/gnome/desktop/wm.preferences".num-workspaces = 4;
"org/gnome/mutter".edge-tiling = true;
enabled-extensions = [ "org/gnome/shell" = {
"workspaces-by-open-apps@favo02.github.com" disable-extension-version-validation = true;
"pop-shell@system76.com"
"windowIsReady_Remover@nunofarruca@gmail.com" enabled-extensions = [
"randomwallpaper@iflow.space" "workspaces-by-open-apps@favo02.github.com"
"Vitals@CoreCoding.com" "pop-shell@system76.com"
"tailscale-status@maxgallup.github.com" "windowIsReady_Remover@nunofarruca@gmail.com"
]; "randomwallpaper@iflow.space"
"Vitals@CoreCoding.com"
"tailscale-status@maxgallup.github.com"
];
};
"org/gnome/desktop/input-sources" = {
sources = [(mkTuple ["xkb" "us"])];
xkb-options = ["terminate:ctrl_alt_bksp" "caps:escape"];
};
"org/gnome/shell/extensions/pop-shell" = {
active-hint = true;
fullscreen-launcher = false;
mouse-cursor-focus-location = mkUint32 4;
mouse-cursor-follows-active-window = true;
show-skip-taskbar = false;
show-title = true;
smart-gaps = false;
snap-to-grid = false;
stacking-with-mouse = true;
tile-by-default = true;
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Super>t";
command = lib.getExe config.programs.alacritty.package;
name = "Terminal";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Super>e";
command = "${lib.getExe config.programs.librewolf.package} --browser";
name = "Browser";
};
"org/gnome/desktop/wm/keybindings" = {
close = ["<Shift><Super>q"];
minimize = mkEmptyArray type.string;
move-to-workspace-1 = ["<Shift><Super>1"];
move-to-workspace-2 = ["<Shift><Super>2"];
move-to-workspace-3 = ["<Shift><Super>3"];
move-to-workspace-4 = ["<Shift><Super>4"];
switch-applications = mkEmptyArray type.string;
switch-applications-backward = mkEmptyArray type.string;
switch-to-workspace-1 = ["<Super>1"];
switch-to-workspace-2 = ["<Super>2"];
switch-to-workspace-3 = ["<Super>3"];
switch-to-workspace-4 = ["<Super>4"];
toggle-fullscreen = ["<Super>f"];
};
"org/gnome/shell/extensions/space-iflow-randomwallpaper" = {
auto-fetch = true;
change-type = 2;
hide-panel-icon = true;
history-length = 1;
hours = 0;
minutes = 30;
sources = ["42"];
fetch-on-startup = true;
};
"org/gnome/shell/extensions/space-iflow-randomwallpaper/sources/general/42".type = 4;
"org/gnome/shell/extensions/space-iflow-randomwallpaper/sources/localFolder/42".folder = "${flake}/wallpapers";
}; };
"org/gnome/desktop/input-sources" = {
sources = [(mkTuple ["xkb" "us"])];
xkb-options = ["terminate:ctrl_alt_bksp" "caps:escape"];
};
"org/gnome/shell/extensions/pop-shell" = {
active-hint = true;
fullscreen-launcher = false;
mouse-cursor-focus-location = mkUint32 4;
mouse-cursor-follows-active-window = true;
show-skip-taskbar = false;
show-title = true;
smart-gaps = false;
snap-to-grid = false;
stacking-with-mouse = true;
tile-by-default = true;
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Super>t";
command = lib.getExe config.programs.alacritty.package;
name = "Terminal";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Super>e";
command = "${lib.getExe config.programs.librewolf.package} --browser";
name = "Browser";
};
"org/gnome/desktop/wm/keybindings" = {
close = ["<Shift><Super>q"];
minimize = mkEmptyArray type.string;
move-to-workspace-1 = ["<Shift><Super>1"];
move-to-workspace-2 = ["<Shift><Super>2"];
move-to-workspace-3 = ["<Shift><Super>3"];
move-to-workspace-4 = ["<Shift><Super>4"];
switch-applications = mkEmptyArray type.string;
switch-applications-backward = mkEmptyArray type.string;
switch-to-workspace-1 = ["<Super>1"];
switch-to-workspace-2 = ["<Super>2"];
switch-to-workspace-3 = ["<Super>3"];
switch-to-workspace-4 = ["<Super>4"];
toggle-fullscreen = ["<Super>f"];
};
"org/gnome/shell/extensions/space-iflow-randomwallpaper" = {
auto-fetch = true;
change-type = 2;
hide-panel-icon = true;
history-length = 1;
hours = 0;
minutes = 30;
sources = ["42"];
fetch-on-startup = true;
};
"org/gnome/shell/extensions/space-iflow-randomwallpaper/sources/general/42".type = 4;
"org/gnome/shell/extensions/space-iflow-randomwallpaper/sources/localFolder/42".folder = "${flake}/wallpapers";
}; };
} }

View file

@ -1,5 +1,14 @@
{pkgs, ...}: { {
config = { pkgs,
config,
lib,
...
}: let
cfg = config.pim.neovim;
in {
options.pim.neovim.enable = lib.mkEnableOption "neovim";
config = lib.mkIf cfg.enable {
programs.neovim = { programs.neovim = {
enable = true; enable = true;
viAlias = true; viAlias = true;

View file

@ -1,8 +1,18 @@
{config, ...}: { {
services.syncthing.enable = true; config,
lib,
...
}: let
cfg = config.pim.syncthing;
in {
options.pim.syncthing.enable = lib.mkEnableOption "syncthing";
sops.secrets = { config = lib.mkIf cfg.enable {
"syncthing/key".path = "${config.xdg.configHome}/syncthing/key.pem"; services.syncthing.enable = true;
"syncthing/cert".path = "${config.xdg.configHome}/syncthing/cert.pem";
sops.secrets = {
"syncthing/key".path = "${config.xdg.configHome}/syncthing/key.pem";
"syncthing/cert".path = "${config.xdg.configHome}/syncthing/cert.pem";
};
}; };
} }

View file

@ -1,5 +1,16 @@
{pkgs, ...}: { {
home.packages = with pkgs; [ config,
supercollider-with-sc3-plugins lib,
]; pkgs,
...
}: let
cfg = config.pim.tidal;
in {
options.pim.tidal.enable = lib.mkEnableOption "tidal";
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
supercollider-with-sc3-plugins
];
};
} }

View file

@ -1,25 +1,32 @@
{ {
pkgs, pkgs,
lib, lib,
config,
... ...
}: { }: let
programs.vscode = { cfg = config.pim.vscode;
enable = true; in {
package = pkgs.vscodium; options.pim.vscode.enable = lib.mkEnableOption "vscode";
extensions = with pkgs.vscode-extensions; [
vscodevim.vim
marp-team.marp-vscode
jnoortheen.nix-ide
mkhl.direnv
];
userSettings = { config = lib.mkIf cfg.enable {
"nix.enableLanguageServer" = true; programs.vscode = {
"nix.serverPath" = lib.getExe pkgs.nil; enable = true;
"terminal.integrated.defaultProfile.linux" = "fish"; package = pkgs.vscodium;
"explorer.confirmDragAndDrop" = false; extensions = with pkgs.vscode-extensions; [
"explorer.confirmPasteNative" = false; vscodevim.vim
"explorer.confirmDelete" = false; marp-team.marp-vscode
jnoortheen.nix-ide
mkhl.direnv
];
userSettings = {
"nix.enableLanguageServer" = true;
"nix.serverPath" = lib.getExe pkgs.nil;
"terminal.integrated.defaultProfile.linux" = "fish";
"explorer.confirmDragAndDrop" = false;
"explorer.confirmPasteNative" = false;
"explorer.confirmDelete" = false;
};
}; };
}; };
} }

3
machines/default.nix Normal file
View file

@ -0,0 +1,3 @@
{
sue = import ./sue;
}

View file

@ -0,0 +1,50 @@
{inputs, ...}: {
imports = [inputs.nixos-hardware.nixosModules.dell-xps-13-9310];
config = {
pim = {
lanzaboote.enable = true;
tidal.enable = true;
gnome.enable = true;
stylix.enable = true;
wireguard.enable = true;
tailscale.enable = true;
compliance.enable = true;
sops.enable = true;
};
networking.hostName = "xps-9315";
swapDevices = [{device = "/dev/disk/by-uuid/96a43c35-0174-4e92-81f0-168a5f601f0b";}];
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/31638735-5cc4-4013-8037-17e30edcbb0a";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/560E-F8A2";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
};
nix.settings = {
substituters = ["https://cosmic.cachix.org/"];
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
};
boot.initrd.luks.devices."luks-8ffd3129-4908-4209-98c4-4eb68a35c494".device = "/dev/disk/by-uuid/8ffd3129-4908-4209-98c4-4eb68a35c494";
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage"];
# specialisation.cosmic.configuration = {
# imports = [
# inputs.nixos-cosmic.nixosModules.default
# ];
# services.desktopManager = {
# cosmic.enable = true;
# cosmic-greeter.enable = true;
# };
# };
};
}

4
machines/sue/default.nix Normal file
View file

@ -0,0 +1,4 @@
{
nixosModule = import ./configuration.nix;
homeManagerModule = import ./home.nix;
}

12
machines/sue/home.nix Normal file
View file

@ -0,0 +1,12 @@
{...}: {
config = {
pim = {
tidal.enable = true;
gnome.enable = true;
vscode.enable = true;
syncthing.enable = true;
neovim.enable = true;
firefox.enable = true;
};
};
}

View file

@ -1,5 +1,14 @@
{ ... }: { {
services.clamav = { config,
daemon.enable = true; lib,
...
}: let
cfg = config.pim.compliance;
in {
options.pim.compliance.enable = lib.mkEnableOption "compliance";
config = lib.mkIf cfg.enable {
services.clamav = {
daemon.enable = true;
};
}; };
} }

View file

@ -1,38 +1,49 @@
{pkgs, ...}: { {
services.xserver.desktopManager.gnome.enable = true; pkgs,
config,
lib,
...
}: let
cfg = config.pim.gnome;
in {
options.pim.gnome.enable = lib.mkEnableOption "gnome";
environment = { config = lib.mkIf cfg.enable {
systemPackages = services.xserver.desktopManager.gnome.enable = true;
[
pkgs.gnome.gnome-shell-extensions
]
++ (with pkgs.gnomeExtensions; [
pop-shell
window-is-ready-remover
random-wallpaper
workspaces-indicator-by-open-apps
]);
gnome.excludePackages = environment = {
(with pkgs; [ systemPackages =
epiphany [
gnome-connections pkgs.gnome.gnome-shell-extensions
gnome-console ]
gnome-tour ++ (with pkgs.gnomeExtensions; [
]) pop-shell
++ (with pkgs.gnome; [ window-is-ready-remover
geary random-wallpaper
gnome-calendar workspaces-indicator-by-open-apps
gnome-clocks ]);
gnome-contacts
gnome-font-viewer gnome.excludePackages =
gnome-logs (with pkgs; [
gnome-maps epiphany
gnome-music gnome-connections
seahorse gnome-console
totem gnome-tour
yelp ])
gnome-weather ++ (with pkgs.gnome; [
]); geary
gnome-calendar
gnome-clocks
gnome-contacts
gnome-font-viewer
gnome-logs
gnome-maps
gnome-music
seahorse
totem
yelp
gnome-weather
]);
};
}; };
} }

View file

@ -2,14 +2,21 @@
inputs, inputs,
pkgs, pkgs,
flake, flake,
config,
lib,
... ...
}: { }: let
cfg = config.pim.sops;
in {
imports = [inputs.sops-nix.nixosModules.sops]; imports = [inputs.sops-nix.nixosModules.sops];
options.pim.sops.enable = lib.mkEnableOption "sops";
environment.systemPackages = with pkgs; [sops]; config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [sops];
sops = { sops = {
age.keyFile = "/home/pim/.config/sops/age/keys.txt"; age.keyFile = "/home/pim/.config/sops/age/keys.txt";
defaultSopsFile = "${flake}/secrets/secrets.yaml"; defaultSopsFile = "${flake}/secrets/secrets.yaml";
};
}; };
} }

View file

@ -1,35 +1,42 @@
{ {
pkgs, pkgs,
inputs, inputs,
config,
lib,
... ...
}: { }: let
cfg = config.pim.stylix;
in {
imports = [inputs.stylix.nixosModules.stylix]; imports = [inputs.stylix.nixosModules.stylix];
options.pim.stylix.enable = lib.mkEnableOption "stylix";
stylix = { config = lib.mkIf cfg.enable {
enable = true; stylix = {
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml"; enable = true;
image = "${inputs.nixos-artwork}/wallpapers/nix-wallpaper-binary-blue.png"; base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
image = "${inputs.nixos-artwork}/wallpapers/nix-wallpaper-binary-blue.png";
cursor = { cursor = {
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic"; name = "Bibata-Modern-Classic";
size = 28; size = 28;
};
fonts = {
monospace = {
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
name = "JetBrainsMono Nerd Font Mono";
}; };
sansSerif = { fonts = {
package = pkgs.dejavu_fonts; monospace = {
name = "DejaVu Sans"; package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
}; name = "JetBrainsMono Nerd Font Mono";
};
serif = { sansSerif = {
package = pkgs.dejavu_fonts; package = pkgs.dejavu_fonts;
name = "DejaVu Serif"; name = "DejaVu Sans";
};
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
}; };
}; };
}; };

View file

@ -1,10 +1,20 @@
{pkgs, ...}: { {
environment.systemPackages = [pkgs.gnomeExtensions.tailscale-status]; pkgs,
config,
lib,
...
}: let
cfg = config.pim.tailscale;
in {
options.pim.tailscale.enable = lib.mkEnableOption "tailscale";
config = lib.mkIf cfg.enable {
environment.systemPackages = [pkgs.gnomeExtensions.tailscale-status];
services.tailscale = { services.tailscale = {
enable = true; enable = true;
useRoutingFeatures = "client"; useRoutingFeatures = "client";
};
networking.networkmanager.unmanaged = ["tailscale0"];
}; };
networking.networkmanager.unmanaged = ["tailscale0"];
} }

View file

@ -1,3 +1,13 @@
{...}: { {
users.users.pim.extraGroups = ["audio"]; lib,
config,
...
}: let
cfg = config.pim.tidal;
in {
options.pim.tidal.enable = lib.mkEnableOption "tidal";
config = lib.mkIf cfg.enable {
users.users.pim.extraGroups = ["audio"];
};
} }

View file

@ -2,48 +2,54 @@
lib, lib,
config, config,
... ...
}: { }: let
networking = { cfg = config.pim.wireguard;
useDHCP = lib.mkDefault true; in {
networkmanager.unmanaged = ["tailscale0"]; options.pim.wireguard.enable = lib.mkEnableOption "wireguard";
wg-quick.interfaces = { config = lib.mkIf cfg.enable {
home = { networking = {
privateKeyFile = config.sops.secrets."wireguard/home/privateKey".path; useDHCP = lib.mkDefault true;
address = ["10.225.191.4/24"]; networkmanager.unmanaged = ["tailscale0"];
dns = ["192.168.30.131"];
autostart = false;
mtu = 1412;
peers = [
{
presharedKeyFile = config.sops.secrets."wireguard/home/presharedKey".path;
endpoint = "wg.kun.is:51820";
publicKey = "fa3mQ7ximJbH7cu2ZbWidto5xBGxEEfWvCCiUDk00Hg=";
allowedIPs = ["0.0.0.0/0"];
}
];
};
home-no-pihole = { wg-quick.interfaces = {
privateKeyFile = config.sops.secrets."wireguard/home/privateKey".path; home = {
address = ["10.225.191.4/24"]; privateKeyFile = config.sops.secrets."wireguard/home/privateKey".path;
dns = ["192.168.10.1"]; address = ["10.225.191.4/24"];
autostart = false; dns = ["192.168.30.131"];
mtu = 1412; autostart = false;
peers = [ mtu = 1412;
{ peers = [
presharedKeyFile = config.sops.secrets."wireguard/home/presharedKey".path; {
endpoint = "wg.kun.is:51820"; presharedKeyFile = config.sops.secrets."wireguard/home/presharedKey".path;
publicKey = "fa3mQ7ximJbH7cu2ZbWidto5xBGxEEfWvCCiUDk00Hg="; endpoint = "wg.kun.is:51820";
allowedIPs = ["0.0.0.0/0"]; publicKey = "fa3mQ7ximJbH7cu2ZbWidto5xBGxEEfWvCCiUDk00Hg=";
} allowedIPs = ["0.0.0.0/0"];
]; }
];
};
home-no-pihole = {
privateKeyFile = config.sops.secrets."wireguard/home/privateKey".path;
address = ["10.225.191.4/24"];
dns = ["192.168.10.1"];
autostart = false;
mtu = 1412;
peers = [
{
presharedKeyFile = config.sops.secrets."wireguard/home/presharedKey".path;
endpoint = "wg.kun.is:51820";
publicKey = "fa3mQ7ximJbH7cu2ZbWidto5xBGxEEfWvCCiUDk00Hg=";
allowedIPs = ["0.0.0.0/0"];
}
];
};
}; };
}; };
};
sops.secrets = { sops.secrets = {
"wireguard/home/presharedKey" = {}; "wireguard/home/presharedKey" = {};
"wireguard/home/privateKey" = {}; "wireguard/home/privateKey" = {};
};
}; };
} }