fix anon user config and add raphi to wireguard

This commit is contained in:
Kopatz
2023-12-12 23:17:57 +01:00
parent afc25be633
commit 4bb82ad340
4 changed files with 53 additions and 35 deletions

View File

@@ -38,8 +38,7 @@
inherit system; inherit system;
modules = [ modules = [
### User specific ### ### User specific ###
./users/anon.nix ./users/anon
./users/option.nix
### System sepecific ### ### System sepecific ###
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./systems/server/configuration.nix ./systems/server/configuration.nix

View File

@@ -25,70 +25,69 @@ in
allowedIPs = [ allowedIPs = [
"192.168.2.2/32" "192.168.2.2/32"
]; ];
persistentKeepalive = 25;
publicKey = "dUBPIEnAiHIZCMjqV0ya8qotN3UnMhlEVyGNQcR3gVI="; publicKey = "dUBPIEnAiHIZCMjqV0ya8qotN3UnMhlEVyGNQcR3gVI=";
} }
{ {
allowedIPs = [ allowedIPs = [
"192.168.2.3/32" "192.168.2.3/32"
]; ];
persistentKeepalive = 25;
publicKey = "Eg5ZS3zN05mJ/gct6wJlwVAHTlXpkhxFfUd7yscANV0="; publicKey = "Eg5ZS3zN05mJ/gct6wJlwVAHTlXpkhxFfUd7yscANV0=";
} }
{ {
allowedIPs = [ allowedIPs = [
"192.168.2.4/32" "192.168.2.4/32"
]; ];
persistentKeepalive = 25;
publicKey = "8Eigfs+k2k2WPaMn+SqDmlSHdMv+I+xcBr/2qhtpGzI="; publicKey = "8Eigfs+k2k2WPaMn+SqDmlSHdMv+I+xcBr/2qhtpGzI=";
} }
# handy
{ {
allowedIPs = [ allowedIPs = [
"192.168.2.20/32" "192.168.2.20/32"
]; ];
persistentKeepalive = 25;
publicKey = "25u1RSfjsx3wb1DMeTm0pvUfUkG7zTjGaN+m0w6ZjCw="; publicKey = "25u1RSfjsx3wb1DMeTm0pvUfUkG7zTjGaN+m0w6ZjCw=";
} }
{ {
allowedIPs = [ allowedIPs = [
"192.168.2.21/32" "192.168.2.21/32"
]; ];
persistentKeepalive = 25;
publicKey = "S+8F+yxSQvjjoU44LRYqRv1YulqmOKumUtYo/YIh7X8="; publicKey = "S+8F+yxSQvjjoU44LRYqRv1YulqmOKumUtYo/YIh7X8=";
} }
# laptop
{ {
allowedIPs = [ allowedIPs = [
"192.168.2.22/32" "192.168.2.22/32"
]; ];
persistentKeepalive = 25;
publicKey = "/dIW7K49vB9HOghFeXvcY7wu2utQltuv6RfgCbxZwlk="; publicKey = "/dIW7K49vB9HOghFeXvcY7wu2utQltuv6RfgCbxZwlk=";
} }
{ {
allowedIPs = [ allowedIPs = [
"192.168.2.23/32" "192.168.2.23/32"
]; ];
persistentKeepalive = 25;
publicKey = "89rjQXNcyCRUCihqfqcOnctWmhiNR8snpRFF6dyHAmk="; publicKey = "89rjQXNcyCRUCihqfqcOnctWmhiNR8snpRFF6dyHAmk=";
} }
{ {
allowedIPs = [ allowedIPs = [
"192.168.2.24/32" "192.168.2.24/32"
]; ];
persistentKeepalive = 25;
publicKey = "adaWtboVz3UhpNBKFirs7slbU2+Y3GaV5yS2EoafwVU="; publicKey = "adaWtboVz3UhpNBKFirs7slbU2+Y3GaV5yS2EoafwVU=";
} }
# raphi
{
allowedIPs = [
"192.168.2.25/32"
];
publicKey = "AGBWzMeSTxmB3jwNdROYHbyiqhhAVyofMV5Ku5JIE1A=";
}
{ {
allowedIPs = [ allowedIPs = [
"192.168.2.5/32" "192.168.2.5/32"
]; ];
persistentKeepalive = 25;
publicKey = "g5uTlA1IciXgtSbECjhVis0dajRAc53Oa7Hz6dUI+0Q="; publicKey = "g5uTlA1IciXgtSbECjhVis0dajRAc53Oa7Hz6dUI+0Q=";
} }
{ {
allowedIPs = [ allowedIPs = [
"192.168.2.6/32" "192.168.2.6/32"
]; ];
persistentKeepalive = 25;
publicKey = "5ClF2HcqndpXS7nVgDn2unWFUYcKo5fbudV6xX2OIVE="; publicKey = "5ClF2HcqndpXS7nVgDn2unWFUYcKo5fbudV6xX2OIVE=";
} }
]; ];

View File

@@ -1,32 +1,21 @@
{ pkgs, inputs, vars, ... }: { inputs
let , pkgs
user = "anon"; , lib
in , config
, ...
}:
{ {
imports = [ imports = [ ../default.nix ];
(import ../home-manager/nvim.nix ({ user="${user}"; pkgs = pkgs; })) mainUser.name = "anon";
(import ../home-manager/direnv.nix ({ user="${user}"; pkgs = pkgs; }))
(import ../home-manager/zsh.nix ({ user="${user}"; pkgs = pkgs; }))
];
mainUser.name = user;
home-manager = { home-manager = {
useGlobalPkgs = true; users.${config.mainUser.name} = import ./home.nix;
extraSpecialArgs = {
inherit inputs;
headless = false;
};
useUserPackages = true;
users.${user} = {
programs.git.enable = true;
home.stateVersion = "23.05";
};
}; };
programs.zsh.enable = true; programs.zsh.enable = true;
users.users.${user} = { users.users.${config.mainUser.name} = {
isNormalUser = true; isNormalUser = true;
description = user; description = config.mainUser.name;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ "networkmanager" "wheel" "docker" "wireshark"]; extraGroups = [ "networkmanager" "wheel" "docker" "wireshark"];
packages = with pkgs; [ packages = with pkgs; [

31
users/anon/home.nix Normal file
View File

@@ -0,0 +1,31 @@
{ config, pkgs, inputs, ...}:
{
home = {
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
stateVersion = "23.05";
};
programs.kitty = {
enable = true;
settings = {
foreground = "#${config.colorScheme.colors.base05}";
background = "#${config.colorScheme.colors.base00}";
# ...
};
};
imports = [
../../home-manager/nvim.nix
../../home-manager/zsh.nix
../../home-manager/direnv.nix
inputs.nix-colors.homeManagerModule
];
colorScheme = inputs.nix-colors.colorSchemes.tokyo-night-dark;
}