moved common packages to common; nftables on giupi

This commit is contained in:
Giulio De Pasquale 2021-07-01 12:26:21 +02:00
parent b7272fa1d2
commit 8a464250e7
3 changed files with 37 additions and 9 deletions

View File

@ -12,11 +12,13 @@
nix = { nix = {
autoOptimiseStore = true; autoOptimiseStore = true;
nixPath = [ nixPath = [
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
"nixos-config=/etc/nixos/hosts/${variables.hostname}/default.nix" "nixos-config=/etc/nixos/hosts/${variables.hostname}/default.nix"
"/nix/var/nix/profiles/per-user/root/channels" "/nix/var/nix/profiles/per-user/root/channels"
]; ];
gc = { gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
@ -29,4 +31,20 @@
allowUnfree = true; allowUnfree = true;
}; };
}; };
environment.systemPackages = with pkgs; [
file
pciutils
bind
wget
git
curl
htop
glances
tcpdump
restic
binutils
neovim
home-manager
];
} }

View File

@ -15,6 +15,7 @@ in {
../../variables.nix ../../variables.nix
../../common.nix ../../common.nix
../../users.nix ../../users.nix
./firewall.nix
]; ];
variables.hostname = hostname; variables.hostname = hostname;
@ -31,8 +32,8 @@ in {
enable = true; enable = true;
ssh = { ssh = {
enable = true; enable = true;
port = 2222; port = 22;
hostKeys = [/boot/host_ecdsa_key]; hostKeys = [/boot/ssh_host_rsa_key];
authorizedKeys = pubkeys; authorizedKeys = pubkeys;
}; };
@ -119,16 +120,9 @@ in {
environment.systemPackages = with pkgs; environment.systemPackages = with pkgs;
[ [
neovim
docker docker
htop
glances
git
home-manager
openiscsi openiscsi
wireguard wireguard
dnscrypt-proxy2
restic
]; ];
hardware = { hardware = {

16
hosts/giupi/firewall.nix Normal file
View File

@ -0,0 +1,16 @@
{config, ...} :
{
networking = {
# needed to use nftables
firewall.enable = false;
nat.enable = false;
nftables = {
enable = true;
ruleset = ''
'';
};
};
}