wireguard, gc, not flakes

This commit is contained in:
Quentin Boyer 2021-06-22 16:37:54 +02:00
parent aaddb8cda1
commit 0432bb06fc
4 changed files with 33 additions and 3 deletions

1
nixos/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
sensitive.nix

View file

@ -48,6 +48,7 @@
nix.autoOptimiseStore = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d"; # Ajuste comme tu veux, tu peux utiliser +5 pour garder les 5 dernières, etc.
};

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }:
let
sensitiveInfo = (import ./sensitive.nix);
in
{
boot = {
initrd = {
@ -38,6 +41,21 @@
eno0.useDHCP = true;
wlp1s0.useDHCP = true;
};
wireguard.interfaces = {
octopi = {
ips = [ "10.42.42.4/32" ];
privateKeyFile = "/etc/wireguard/zelaptop.key";
peers = [
{
publicKey = sensitiveInfo.octopiPubKey;
presharedKeyFile = "/etc/wireguard/octopi-laptop.psk";
allowedIPs = [ "10.42.42.1/32" ];
endpoint = "${sensitiveInfo.homeUrl}:51820";
persistentKeepalive = 25;
}
];
};
};
};
users.users.traxys = {
@ -58,3 +76,10 @@

View file

@ -12,12 +12,15 @@
};
};
nixpkgs.config = {
package = pkgs.nixFlakes;
allowUnfree = true;
/* nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
}; */
nixpkgs.config = {
allowUnfree = true;
};
nixpkgs.overlays = [