Cleanup nixos-hypervisor host configs
This commit is contained in:
parent
dd216b9cab
commit
5ba440316a
2 changed files with 42 additions and 55 deletions
|
@ -1,34 +1,43 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{ imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
{ imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
nix.settings = {
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
trusted-users = [ "@wheel" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete older-than 3d";
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
networking.useNetworkd = true;
|
||||
|
||||
systemd.network.enable = true;
|
||||
systemd.network.networks."10-lan" = {
|
||||
matchConfig.Name = ["enp1s0" "vm-*"];
|
||||
networkConfig = {
|
||||
Bridge = "br0";
|
||||
};
|
||||
networking= {
|
||||
useNetworkd = true;
|
||||
firewall.allowedTCPPorts = [ 22 ];
|
||||
};
|
||||
|
||||
systemd.network.netdevs."br0" = {
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
netdevs."br0" = {
|
||||
netdevConfig = {
|
||||
Name = "br0";
|
||||
Kind = "bridge";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network.networks."10-lan-bridge" = {
|
||||
networks = {
|
||||
"10-lan" = {
|
||||
matchConfig.Name = ["enp1s0" "vm-*"];
|
||||
networkConfig = {
|
||||
Bridge = "br0";
|
||||
};
|
||||
};
|
||||
"10-lan-bridge" = {
|
||||
matchConfig.Name = "br0";
|
||||
networkConfig = {
|
||||
Address = ["192.168.122.31/24"];
|
||||
|
@ -38,9 +47,12 @@
|
|||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Paris";
|
||||
i18n.defaultLocale = "fr_FR.UTF-8"; console = {
|
||||
i18n.defaultLocale = "fr_FR.UTF-8";
|
||||
console = {
|
||||
useXkbConfig = true; # use xkb.options in tty.
|
||||
};
|
||||
|
||||
|
@ -88,12 +100,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
#networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether. networking.firewall.enable = false;
|
||||
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
vim-airline-themes
|
||||
vim-bufferline
|
||||
vim-markdown
|
||||
markdown-preview-nvim
|
||||
tabular
|
||||
];
|
||||
settings = {
|
||||
|
@ -73,9 +72,6 @@
|
|||
# Nixos
|
||||
update = "sudo nixos-rebuild switch";
|
||||
upgrade = "sudo nix-channel --update && sudo nixos-rebuild switch --upgrade";
|
||||
# Kitty
|
||||
#ssh = "kitten ssh";
|
||||
icat = "kitten icat";
|
||||
};
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
|
@ -92,21 +88,6 @@
|
|||
];
|
||||
theme = "bira";
|
||||
};
|
||||
initExtra = ''
|
||||
export MAMBA_EXE="/etc/profiles/per-user/tbarnouin/bin/micromamba";
|
||||
export MAMBA_ROOT_PREFIX="/home/tbarnouin/micromamba";
|
||||
__mamba_setup="$("$MAMBA_EXE" shell hook --shell zsh --prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__mamba_setup"
|
||||
else
|
||||
if [ -f "/home/tbarnouin/micromamba/etc/profile.d/micromamba.sh" ]; then
|
||||
. "/home/tbarnouin/micromamba/etc/profile.d/micromamba.sh"
|
||||
else
|
||||
export PATH="/home/tbarnouin/micromamba/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __mamba_setup
|
||||
'';
|
||||
};
|
||||
tmux = {
|
||||
enable = true;
|
||||
|
|
Loading…
Reference in a new issue