1

General codestyle changes

This commit is contained in:
2024-06-03 20:37:24 +02:00
parent 26ea3f3f00
commit 1df9bf4011
9 changed files with 214 additions and 272 deletions

View File

@ -35,10 +35,6 @@
# adwaita-for-steam.url = "github:tkashkin/Adwaita-for-Steam"; # adwaita-for-steam.url = "github:tkashkin/Adwaita-for-Steam";
# adwaita-for-steam.flake = false; # adwaita-for-steam.flake = false;
# hyprland.url = "github:hyprwm/Hyprland"; # NOTE: only for Home-Manager, NixOS includes hyprland
# hyprpaper.url = "github:hyprwm/hyprpaper"; # NOTE: replaced with hyprpaper package
# hyprpicker.url = "github:hyprwm/hyprpicker"; # NOTE: replaced with hyprpicker package
}; };
# Outputs is a function that takes the inputs as arguments. # Outputs is a function that takes the inputs as arguments.
@ -57,7 +53,7 @@
# I don't know how to extend the nixpkgs.lib directly so just propagate mylib to the config modules as argument # I don't know how to extend the nixpkgs.lib directly so just propagate mylib to the config modules as argument
mylib = import ./lib { mylib = import ./lib {
inherit inputs pkgs; inherit inputs pkgs;
lib = nixpkgs.lib; inherit (nixpkgs) lib; # Equal to "lib = nixpkgs.lib;"
}; };
# Set overlays + unfree globally # Set overlays + unfree globally
@ -86,7 +82,7 @@
}; };
# The rec expression turns a basic set into a set where self-referencing is possible. # The rec expression turns a basic set into a set where self-referencing is possible.
# It is a shorthand for recursive and allows to use the values defined in this set from its own scope. # It is a shorthand for recursive and allows to use the values defined in this set from its own scope.
in rec { in {
# Local shell for NixFlake directory # Local shell for NixFlake directory
devShells."${system}".default = import ./shell.nix {inherit pkgs;}; devShells."${system}".default = import ./shell.nix {inherit pkgs;};
@ -103,8 +99,6 @@
username = "christoph"; username = "christoph";
extraModules = [ extraModules = [
# hyprland.nixosModules.default # NOTE: NixOS includes system module
# inputs.nix-flatpak.nixosModules.nix-flatpak
]; ];
}; };
@ -116,8 +110,6 @@
username = "christoph"; username = "christoph";
extraModules = [ extraModules = [
# hyprland.nixosModules.default # NOTE: NixOS includes system module
# inputs.nix-flatpak.nixosModules.nix-flatpak
]; ];
}; };
}; };

View File

@ -3,7 +3,6 @@
# The nixosConfig allows to access the toplevel system configuration from within home manager # The nixosConfig allows to access the toplevel system configuration from within home manager
# https://github.com/nix-community/home-manager/blob/586ac1fd58d2de10b926ce3d544b3179891e58cb/nixos/default.nix#L19 # https://github.com/nix-community/home-manager/blob/586ac1fd58d2de10b926ce3d544b3179891e58cb/nixos/default.nix#L19
{ {
inputs,
hostname, hostname,
username, username,
lib, lib,
@ -100,6 +99,7 @@ rec {
bindings = { bindings = {
"$mainMod, T" = ["exec, kitty"]; "$mainMod, T" = ["exec, kitty"];
"$mainMod, E" = ["exec, kitty"]; "$mainMod, E" = ["exec, kitty"];
"$mainMod, N" = ["exec, neovide"];
# "$mainMod, T" = ["exec, alacritty -o font.size=12 -e tmux"]; # "$mainMod, T" = ["exec, alacritty -o font.size=12 -e tmux"];
# "$mainMod, E" = ["exec, alacritty -o font.size=12 -e tmux"]; # "$mainMod, E" = ["exec, alacritty -o font.size=12 -e tmux"];
@ -112,34 +112,44 @@ rec {
}; };
}; };
autostart = [ autostart = {
# NOTE: The sleep 15s is a hack for tray icons, immediate = [
# they need to be launched after waybar "kitty"
"hyprctl dispatch exec \"sleep 15s && kdeconnect-indicator\"" ];
"hyprctl dispatch exec \"sleep 15s && nextcloud --background\""
"hyprctl dispatch exec \"sleep 15s && keepassxc\"" delayed = [
# "alacritty -o font.size=12 -e tmux" # "kdeconnect-indicator"
"kitty" "nextcloud --background"
# "md.obsidian.Obsidian" "keepassxc"
# "firefox" ];
]; };
workspacerules = { workspacerules = {
"2" = [ "2" = [
"jetbrains-clion"
"code-url-handler"
"neovide" "neovide"
"jetbrains-clion"
"jetbrains-idea"
"jetbrains-pycharm"
"jetbrains-rustrover"
"code-url-handler"
]; ];
"3" = [ "3" = [
"obsidian" "obsidian"
]; ];
"4" = [ "4" = [
"firefox" "firefox"
"chromium-browser"
"Google-chrome"
]; ];
"10" = [ "7" = [
"discord" "signal"
];
"8" = [
"Spotify" "Spotify"
]; ];
"9" = [
"discord"
];
}; };
floating = [ floating = [
@ -159,6 +169,9 @@ rec {
"Spotify" "Spotify"
"obsidian" "obsidian"
"jetbrains-clion" "jetbrains-clion"
"jetbrains-idea"
"jetbrains-pycharm"
"jetbrains-rustrover"
"code-url-handler" "code-url-handler"
"neovide" "neovide"
]; ];
@ -186,11 +199,11 @@ rec {
neovide = true; neovide = true;
}; };
lazyvim = { # lazyvim = {
# enable = true; # enable = true;
alias = true; # alias = true;
neovide = true; # neovide = true;
}; # };
nextcloud = { nextcloud = {
enable = true; enable = true;
@ -261,11 +274,12 @@ rec {
enable = true; enable = true;
associations.added = nixosConfig.xdg.mime.addedAssociations; associations.added = nixosConfig.xdg.mime.addedAssociations;
associations.removed = nixosConfig.xdg.mime.removedAssociations; associations.removed = nixosConfig.xdg.mime.removedAssociations;
defaultApplications = nixosConfig.xdg.mime.defaultApplications; inherit (nixosConfig.xdg.mime) defaultApplications; # Equal to "defaultApplications = nixosConfig.xdg.mime.defaultApplications"
}; };
home = { home = {
username = username; # Inherited from flake.nix inherit username; # Inherited from flake.nix
homeDirectory = "/home/${home.username}"; homeDirectory = "/home/${home.username}";
enableNixpkgsReleaseCheck = true; enableNixpkgsReleaseCheck = true;
@ -323,20 +337,16 @@ rec {
nvd # nix rebuild diff nvd # nix rebuild diff
file file
# spotdl # TODO: Borked # spotdl # TODO: Borked
# geteltorito # extreact boot image from iso
# gitbatch # overview over multiple repos
# Hardware/Software info # Hardware/Software info
pciutils # lspci pciutils # lspci
glxinfo # opengl info glxinfo # opengl info
wayland-utils # wayland-info wayland-utils # wayland-info
aha # ansi html adapter? TODO: Why did I install this? aha # ansi html adapter? TODO: Why did I install this?
# radeontop
clinfo # OpenCL info clinfo # OpenCL info
vulkan-tools # vulkaninfo vulkan-tools # vulkaninfo
libva-utils # vainfo libva-utils # vainfo
vdpauinfo vdpauinfo
# rocminfo # radeon comptute platform info
hwloc hwloc
lm_sensors lm_sensors
acpica-tools # Dump ACPI tables etc. acpica-tools # Dump ACPI tables etc.
@ -349,17 +359,13 @@ rec {
ueberzugpp # Display images in terminal (alacritty) ueberzugpp # Display images in terminal (alacritty)
# Document utils # Document utils
# TODO: Latex module with individual packages or HomeManager
texlive.combined.scheme-full
poppler_utils # pdfunite poppler_utils # pdfunite
graphviz # generate graphs from code graphviz # generate graphs from code
# xdot # .dot file viewer
# kgraphviewer # dot graph viewer
# d2 # generate diagrams from code
plantuml plantuml
gnuplot # generate function plots gnuplot # generate function plots
pdf2svg pdf2svg
# TODO: Latex module with individual packages
texlive.combined.scheme-full
# tikzit
pandoc # document converting madness pandoc # document converting madness
# Networking # Networking
@ -411,30 +417,15 @@ rec {
hunspell # I cna't type hunspell # I cna't type
hunspellDicts.en_US hunspellDicts.en_US
hunspellDicts.de_DE hunspellDicts.de_DE
obsidian # knowledge-base # Use flatpak for now, as I can't use window splitting with this version for some reason obsidian # knowledge-base
# logseq # knowledge-base # logseq # knowledge-base
# zotero # Citation/source research assistant
# jabref # manage bibilography # NOTE: Uses jdk18 which is EOL, so can't build, use flatpak instead
# kbibtex # bibtex editor
# vale # Why not lint everything (including english)?
# TODO: Development module, I need multiple modules to be able to add python packages to a single python install... # TODO: Module, I need to add python packages from multiple modules to the same interpreter
(python312.withPackages (p: python312
with p; [
# p.rich
# p.numpy
# p.scipy
# p.matplotlib
# p.pillow # for ranger
# p.pygments # for emacs
# flake8 # Linter
# black
]))
jetbrains.clion jetbrains.clion
jetbrains.rust-rover jetbrains.rust-rover
jetbrains.pycharm-professional jetbrains.pycharm-professional
jetbrains.idea-ultimate jetbrains.idea-ultimate
# jetbrains-toolbox # TODO: Difficult to make work
# Media # Media
wacomtablet wacomtablet

View File

@ -1,16 +1,5 @@
{
inputs,
hostname,
username,
lib,
mylib,
config,
nixosConfig,
pkgs,
...
}:
# Here goes the stuff that will only be enabled on the desktop # Here goes the stuff that will only be enabled on the desktop
rec { {...}: {
imports = [ imports = [
../../modules ../../modules
]; ];
@ -46,9 +35,11 @@ rec {
"DP-1" = [10]; "DP-1" = [10];
}; };
autostart = [ autostart = {
"hyprctl dispatch exec \"sleep 15s && fcitx5\"" delayed = [
]; "fcitx5"
];
};
floating = [ floating = [
{ {
@ -102,8 +93,8 @@ rec {
waybar.monitor = "HDMI-A-1"; waybar.monitor = "HDMI-A-1";
}; };
home.packages = with pkgs; [ # home.packages = with pkgs; [
# quartus-prime-lite # Intel FPGA design software # quartus-prime-lite # Intel FPGA design software
]; # ];
}; };
} }

View File

@ -1,16 +1,5 @@
{
inputs,
hostname,
username,
lib,
mylib,
config,
nixosConfig,
pkgs,
...
}:
# Here goes the stuff that will only be enabled on the laptop # Here goes the stuff that will only be enabled on the laptop
rec { {...}: {
imports = [ imports = [
../../modules ../../modules
]; ];
@ -42,7 +31,6 @@ rec {
waybar.monitor = "eDP-1"; waybar.monitor = "eDP-1";
}; };
home.packages = with pkgs; [ # home.packages = with pkgs; [];
];
}; };
} }

View File

@ -1,12 +1,4 @@
{ {inputs, ...}: {
inputs,
config,
nixosConfig,
lib,
pkgs,
mylib,
...
}: {
imports = [ imports = [
./audio ./audio
./chromium ./chromium

123
shell.nix
View File

@ -13,16 +13,16 @@ pkgs.devshell.mkShell {
# help = "Launch clion in this folder"; # help = "Launch clion in this folder";
# command = "clion ./ &>/dev/null &"; # command = "clion ./ &>/dev/null &";
# } # }
{ # {
name = "util-watch-flatpak"; # name = "util-watch-flatpak";
help = "Show running flatpak operations"; # help = "Show running flatpak operations";
command = "watch -n 0.5 -d procs flatpak"; # command = "watch -n 0.5 -d procs flatpak";
} # }
{ # {
name = "util-watch-doom"; # name = "util-watch-doom";
help = "Show running doom operations"; # help = "Show running doom operations";
command = "watch -n 0.5 -d procs doom"; # command = "watch -n 0.5 -d procs doom";
} # }
{ {
name = "util-pkgs-sys"; name = "util-pkgs-sys";
help = "List currently installed system packages"; help = "List currently installed system packages";
@ -33,11 +33,11 @@ pkgs.devshell.mkShell {
help = "List currently installed user packages"; help = "List currently installed user packages";
command = "bat ~/.local/share/current-user-packages"; command = "bat ~/.local/share/current-user-packages";
} }
{ # {
name = "util-diff-system"; # name = "util-diff-system";
help = "Compare current system to ./result"; # help = "Compare current system to ./result";
command = "nvd diff /run/current-system result"; # command = "nvd diff /run/current-system result";
} # }
{ {
name = "util-data-dirs"; name = "util-data-dirs";
help = "List XDG_DATA_DIRS in a readable format"; help = "List XDG_DATA_DIRS in a readable format";
@ -65,7 +65,8 @@ pkgs.devshell.mkShell {
{ {
name = "store-gc"; name = "store-gc";
help = "Run NixOS garbage collector"; help = "Run NixOS garbage collector";
command = "nix-store --gc && sudo nix-collect-garbage -d && flatpak uninstall --unused"; # command = "nix-store --gc && sudo nix-collect-garbage -d && flatpak uninstall --unused";
command = "nh clean all";
} }
{ {
name = "store-optimise"; name = "store-optimise";
@ -79,51 +80,51 @@ pkgs.devshell.mkShell {
} }
# Rebuild # Rebuild
{ # {
name = "rebuild-switch-nixinator"; # name = "rebuild-switch-nixinator";
help = "Rebuild and activate the nixinator config"; # help = "Rebuild and activate the nixinator config";
command = "sudo nixos-rebuild switch --flake .#nixinator"; # command = "sudo nixos-rebuild switch --flake .#nixinator";
} # }
{ # {
name = "rebuild-build-nixinator"; # name = "rebuild-build-nixinator";
help = "Rebuild the nixinator config (to diff systems)"; # help = "Rebuild the nixinator config (to diff systems)";
command = "sudo nixos-rebuild build --flake .#nixinator"; # command = "sudo nixos-rebuild build --flake .#nixinator";
} # }
{ # {
name = "rebuild-boot-nixinator"; # name = "rebuild-boot-nixinator";
help = "Rebuild and activate config on next boot"; # help = "Rebuild and activate config on next boot";
command = "sudo nixos-rebuild boot --flake .#nixinator"; # command = "sudo nixos-rebuild boot --flake .#nixinator";
} # }
{ # {
name = "rebuild-switch-nixtop"; # name = "rebuild-switch-nixtop";
help = "Rebuild and activate the nixtop config"; # help = "Rebuild and activate the nixtop config";
command = "sudo nixos-rebuild switch --flake .#nixtop"; # command = "sudo nixos-rebuild switch --flake .#nixtop";
} # }
{ # {
name = "rebuild-build-nixtop"; # name = "rebuild-build-nixtop";
help = "Rebuild and diff the nixtop config (to diff systems)"; # help = "Rebuild and diff the nixtop config (to diff systems)";
command = "sudo nixos-rebuild build --flake .#nixtop"; # command = "sudo nixos-rebuild build --flake .#nixtop";
} # }
{ # {
name = "rebuild-boot-nixtop"; # name = "rebuild-boot-nixtop";
help = "Rebuild and activate config on next boot"; # help = "Rebuild and activate config on next boot";
command = "sudo nixos-rebuild boot --flake .#nixtop"; # command = "sudo nixos-rebuild boot --flake .#nixtop";
} # }
{ # {
name = "rebuild-switch-servenix"; # name = "rebuild-switch-servenix";
help = "Rebuild and activate the servenix config"; # help = "Rebuild and activate the servenix config";
command = "sudo nixos-rebuild switch --flake .#servenix"; # command = "sudo nixos-rebuild switch --flake .#servenix";
} # }
{ # {
name = "rebuild-build-servenix"; # name = "rebuild-build-servenix";
help = "Rebuild and diff the servenix config (to diff systems)"; # help = "Rebuild and diff the servenix config (to diff systems)";
command = "sudo nixos-rebuild build --flake .#servenix"; # command = "sudo nixos-rebuild build --flake .#servenix";
} # }
{ # {
name = "rebuild-boot-servenix"; # name = "rebuild-boot-servenix";
help = "Rebuild and activate config on next boot"; # help = "Rebuild and activate config on next boot";
command = "sudo nixos-rebuild boot --flake .#servenix"; # command = "sudo nixos-rebuild boot --flake .#servenix";
} # }
# Help text (this is pretty stupid) # Help text (this is pretty stupid)
{ {

View File

@ -25,8 +25,8 @@ with mylib.networking; {
polkit.enable = true; polkit.enable = true;
systemd-networkd = { systemd-networkd = {
inherit hostname;
enable = true; enable = true;
hostname = hostname;
networks = { networks = {
# Default wildcard ethernet network for all hosts # Default wildcard ethernet network for all hosts
@ -69,7 +69,7 @@ with mylib.networking; {
# keep-derivations = true # keep-derivations = true
# Auto garbage-collect and optimize store # Auto garbage-collect and optimize store
gc.automatic = true; # gc.automatic = true; # NOTE: Disabled for "nh clean"
gc.options = "--delete-older-than 5d"; gc.options = "--delete-older-than 5d";
settings.auto-optimise-store = true; settings.auto-optimise-store = true;
optimise.automatic = true; optimise.automatic = true;
@ -90,10 +90,12 @@ with mylib.networking; {
# plymouth.enable = true; # plymouth.enable = true;
loader = { loader = {
timeout = 120; timeout = 120;
systemd-boot.enable = true; systemd-boot = {
systemd-boot.configurationLimit = 5; enable = true;
systemd-boot.editor = false; configurationLimit = 5;
systemd-boot.consoleMode = "max"; editor = false;
consoleMode = "max";
};
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot/efi"; efi.efiSysMountPoint = "/boot/efi";
}; };
@ -132,62 +134,33 @@ with mylib.networking; {
]; ];
}; };
documentation.enable = true; documentation = {
documentation.man.enable = true; enable = true;
documentation.dev.enable = true; man.enable = true;
dev.enable = true;
};
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n = {
defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8"; LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8"; LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8"; LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8"; LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8"; LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8"; LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8"; LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8"; LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8"; LC_TIME = "de_DE.UTF-8";
}; };
# https://github.com/NixOS/nixpkgs/issues/179486 # https://github.com/NixOS/nixpkgs/issues/179486
i18n.supportedLocales = ["en_US.UTF-8/UTF-8" "de_DE.UTF-8/UTF-8"]; supportedLocales = ["en_US.UTF-8/UTF-8" "de_DE.UTF-8/UTF-8"];
# Enable the X11 windowing system.
services.xserver = {
enable = true;
# Startx replaces the displaymanager so default (lightdm) isn't used, start to shell
# Sadly using this with gnome-session doesn't really work
displayManager.startx.enable = true;
# Plasma
# TODO: Had problems with wayland last time, hopefully I get it to work now
# displayManager.sddm.enable = true;
# desktopManager.plasma5.enable = true;
# desktopManager.plasma5.runUsingSystemd = true;
# Gnome (Wayland)
# NOTE: Not a fan of the overly simplistic nature, also made problems with the audio devices...
# displayManager.gdm.enable = true;
# I had problems with gdm defaulting to X11, after I added this it stopped although I don't know if this was the sole reason
# displayManager.defaultSession = "gnome";
# displayManager.gdm.wayland = true; # This is actually the default
# desktopManager.gnome.enable = true;
wacom.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
services.libinput.enable = true;
programs.hyprland = {
enable = true;
# enableNvidiaPatches = false; # NOTE: Enabled only in nixinator config
}; };
# XDG # XDG
@ -258,20 +231,6 @@ with mylib.networking; {
addedAssociations = defaultApplications; addedAssociations = defaultApplications;
}; };
# Enable sound with pipewire.
sound.enable = false; # Alsa, seems to conflict with PipeWire
hardware.pulseaudio.enable = false; # Get off my lawn
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = false; # TODO: Was needed for low latency but probably not anymore (?) as Bitwig supports Pipewire now
wireplumber.enable = true; # Probably the default
# media-session.enable = false; # Removed upstream
};
fonts = { fonts = {
enableDefaultPackages = true; # Some default fonts for unicode coverage enableDefaultPackages = true; # Some default fonts for unicode coverage
fontDir.enable = true; # Puts fonts to /run/current-system/sw/share/X11/fonts fontDir.enable = true; # Puts fonts to /run/current-system/sw/share/X11/fonts
@ -391,21 +350,66 @@ with mylib.networking; {
fuse.userAllowOther = true; # Allow users to mount e.g. samba shares (cifs) fuse.userAllowOther = true; # Allow users to mount e.g. samba shares (cifs)
hyprland = {
enable = true;
# enableNvidiaPatches = false; # NOTE: Enabled only in nixinator config
};
nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep 3";
flake = "/home/christoph/NixFlake";
};
# ausweisapp.openFirewall = true; # Directly set port in firewall # ausweisapp.openFirewall = true; # Directly set port in firewall
}; };
sound.enable = false; # Alsa, seems to conflict with PipeWire
hardware.pulseaudio.enable = false; # Get off my lawn
# List services that you want to enable: # List services that you want to enable:
services = { services = {
# Enable sound with pipewire.
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = false;
wireplumber.enable = true; # Probably the default
# media-session.enable = false; # Removed upstream
};
# Enable the X11 windowing system.
xserver = {
enable = true;
# Startx replaces the displaymanager so default (lightdm) isn't used, start to shell
# Sadly using this with gnome-session doesn't really work
displayManager.startx.enable = true;
wacom.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
libinput.enable = true;
# Enable CUPS to print documents. # Enable CUPS to print documents.
printing.enable = true; printing = {
printing.drivers = with pkgs; [ enable = false;
# gutenprint drivers = with pkgs; [
# gutenprintBin gutenprint
# foomatic-db-ppds-withNonfreeDb gutenprintBin
# dell-b1160w # TODO: Broken foomatic-db-ppds-withNonfreeDb
]; dell-b1160w # TODO: Broken
avahi.enable = true; # Network printers ];
avahi.nssmdns4 = true; };
avahi = {
enable = false; # Network printers
nssmdns4 = true;
};
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
openssh.enable = true; openssh.enable = true;
@ -441,7 +445,6 @@ with mylib.networking; {
]; ];
}; };
# TODO: Find a way to organize this better as it's split from the Gnome module, Gnome system module?
gnome.gnome-keyring.enable = true; # TODO: Is probably also needed for Plasma (some apps require it) gnome.gnome-keyring.enable = true; # TODO: Is probably also needed for Plasma (some apps require it)
# gnome.sushi.enable = true; # gnome.sushi.enable = true;
# gnome.gnome-settings-daemon.enable = true; # gnome.gnome-settings-daemon.enable = true;

View File

@ -1,11 +1,8 @@
{ {
inputs,
config,
lib,
mylib, mylib,
pkgs, pkgs,
... ...
}: rec { }: {
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -42,37 +39,33 @@
}; };
wireguard-tunnels = { wireguard-tunnels = {
wg0-de-115 = ( wg0-de-115 =
mylib.networking.mkWireguardService mylib.networking.mkWireguardService
"wg0-de-115" "wg0-de-115"
"proton-de-115.key" "proton-de-115.key"
"9+CorlxrTsQR7qjIOVKsEkk8Z7UUS5WT3R1ccF7a0ic=" "9+CorlxrTsQR7qjIOVKsEkk8Z7UUS5WT3R1ccF7a0ic="
"194.126.177.14" "194.126.177.14";
);
wg0-lu-16 = ( wg0-lu-16 =
mylib.networking.mkWireguardService mylib.networking.mkWireguardService
"wg0-lu-16" "wg0-lu-16"
"proton-lu-16.key" "proton-lu-16.key"
"asu9KtQoZ3iKwELsDTgjPEiFNcD1XtgGgy3O4CZFg2w=" "asu9KtQoZ3iKwELsDTgjPEiFNcD1XtgGgy3O4CZFg2w="
"92.223.89.133" "92.223.89.133";
);
wg0-kh-8 = ( wg0-kh-8 =
mylib.networking.mkWireguardService mylib.networking.mkWireguardService
"wg0-kh-8" "wg0-kh-8"
"proton-kh-8.key" "proton-kh-8.key"
"D4M0O60wCBf1nYWOmXRfK7IpgG7VBBwQLeWVFLIqFG4=" "D4M0O60wCBf1nYWOmXRfK7IpgG7VBBwQLeWVFLIqFG4="
"188.215.235.82" "188.215.235.82";
);
wg0-ch-70 = ( wg0-ch-70 =
mylib.networking.mkWireguardService mylib.networking.mkWireguardService
"wg0-ch-70" "wg0-ch-70"
"proton-ch-70.key" "proton-ch-70.key"
"17I34jHOMcmI7LKBqxosTfLgwGjO5OKApLcRSPlyymM=" "17I34jHOMcmI7LKBqxosTfLgwGjO5OKApLcRSPlyymM="
"185.159.157.13" "185.159.157.13";
);
}; };
}; };
}; };

View File

@ -1,11 +1,4 @@
{ {mylib, ...}: {
inputs,
config,
lib,
mylib,
pkgs,
...
}: rec {
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -15,21 +8,19 @@
modules = { modules = {
systemd-networkd = { systemd-networkd = {
wireguard-tunnels = { wireguard-tunnels = {
wg0-de-74 = ( wg0-de-74 =
mylib.networking.mkWireguardService mylib.networking.mkWireguardService
"wg0-de-74" "wg0-de-74"
"proton-de-74.key" "proton-de-74.key"
"fvHmPj3wAKolN80+/KJ3a/DFjMToCsr3iPGwX8+og1g=" "fvHmPj3wAKolN80+/KJ3a/DFjMToCsr3iPGwX8+og1g="
"194.126.177.7" "194.126.177.7";
);
wg0-lu-6 = ( wg0-lu-6 =
mylib.networking.mkWireguardService mylib.networking.mkWireguardService
"wg0-lu-6" "wg0-lu-6"
"proton-lu-6.key" "proton-lu-6.key"
"EAZS8FTE2sXm8NFD8ViqcO5PMzvnyIHD1ScxX8UxIzE=" "EAZS8FTE2sXm8NFD8ViqcO5PMzvnyIHD1ScxX8UxIzE="
"92.223.89.141" "92.223.89.141";
);
}; };
}; };
}; };