mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-03-02 10:41:04 +01:00
wireguard, gc, not flakes
This commit is contained in:
parent
aaddb8cda1
commit
0432bb06fc
4 changed files with 33 additions and 3 deletions
1
nixos/.gitignore
vendored
Normal file
1
nixos/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
sensitive.nix
|
||||
|
|
@ -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.
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue