mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-29 07:10:51 +01:00
fix: move enigma to stable to fix drivers
This commit is contained in:
parent
32b92ec71d
commit
eff4fce6e2
2 changed files with 176 additions and 95 deletions
213
lib/luj.nix
213
lib/luj.nix
|
@ -1,28 +1,37 @@
|
||||||
inputs: lib: with lib; let
|
inputs: lib:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
options.machines = mkOption {
|
options.machines = mkOption {
|
||||||
description = "My machines";
|
description = "My machines";
|
||||||
type = with types; attrsOf (submodule ({ name, ... }: {
|
type =
|
||||||
freeformType = attrs;
|
with types;
|
||||||
options = {
|
attrsOf (
|
||||||
hostname = mkOption {
|
submodule (
|
||||||
description = "The machine's hostname";
|
{ name, ... }:
|
||||||
type = str;
|
{
|
||||||
default = name;
|
freeformType = attrs;
|
||||||
readOnly = true;
|
options = {
|
||||||
};
|
hostname = mkOption {
|
||||||
sshPort = mkOption {
|
description = "The machine's hostname";
|
||||||
description = "The port for the ssh server of the machine";
|
type = str;
|
||||||
type = int;
|
default = name;
|
||||||
default = 45;
|
readOnly = true;
|
||||||
};
|
};
|
||||||
sshUser = mkOption {
|
sshPort = mkOption {
|
||||||
description = "The user for ssh connection to the machine";
|
description = "The port for the ssh server of the machine";
|
||||||
default = "julien";
|
type = int;
|
||||||
};
|
default = 45;
|
||||||
};
|
};
|
||||||
}));
|
sshUser = mkOption {
|
||||||
|
description = "The user for ssh connection to the machine";
|
||||||
|
default = "julien";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,8 +48,14 @@ inputs: lib: with lib; let
|
||||||
arch = "x86_64-linux";
|
arch = "x86_64-linux";
|
||||||
nixpkgs_version = inputs.nixpkgs;
|
nixpkgs_version = inputs.nixpkgs;
|
||||||
hm_version = inputs.home-manager;
|
hm_version = inputs.home-manager;
|
||||||
ipv4 = { public = "212.129.40.11"; vpn = "100.100.45.12"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb"; vpn = "fd7a:115c:a1e0::c"; };
|
public = "212.129.40.11";
|
||||||
|
vpn = "100.100.45.12";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb";
|
||||||
|
vpn = "fd7a:115c:a1e0::c";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
x2100 = {
|
x2100 = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
|
@ -57,8 +72,8 @@ inputs: lib: with lib; let
|
||||||
enigma = {
|
enigma = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
arch = "aarch64-linux";
|
arch = "aarch64-linux";
|
||||||
nixpkgs_version = inputs.nixpkgs_patched;
|
nixpkgs_version = inputs.nixpkgs;
|
||||||
hm_version = inputs.home-manager-unstable;
|
hm_version = inputs.home-manager;
|
||||||
ipv4.vpn = "100.100.45.21";
|
ipv4.vpn = "100.100.45.21";
|
||||||
};
|
};
|
||||||
lambda = {
|
lambda = {
|
||||||
|
@ -66,8 +81,14 @@ inputs: lib: with lib; let
|
||||||
arch = "aarch64-linux";
|
arch = "aarch64-linux";
|
||||||
nixpkgs_version = inputs.nixpkgs;
|
nixpkgs_version = inputs.nixpkgs;
|
||||||
hm_version = inputs.home-manager;
|
hm_version = inputs.home-manager;
|
||||||
ipv4 = { public = "141.145.197.219"; vpn = "100.100.45.13"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2603:c027:c001:89aa:aad9:34b3:f3c9:924f"; vpn = "fd7a:115c:a1e0::d"; };
|
public = "141.145.197.219";
|
||||||
|
vpn = "100.100.45.13";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2603:c027:c001:89aa:aad9:34b3:f3c9:924f";
|
||||||
|
vpn = "fd7a:115c:a1e0::d";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
tower = {
|
tower = {
|
||||||
|
@ -75,9 +96,15 @@ inputs: lib: with lib; let
|
||||||
arch = "x86_64-linux";
|
arch = "x86_64-linux";
|
||||||
nixpkgs_version = inputs.nixpkgs;
|
nixpkgs_version = inputs.nixpkgs;
|
||||||
hm_version = inputs.home-manager;
|
hm_version = inputs.home-manager;
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.0.103"; vpn = "100.100.45.9"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:8ec7:b5d2:f663:a67a"; vpn = "fd7a:115c:a1e0::9"; };
|
public = "82.67.34.230";
|
||||||
|
local = "192.168.0.103";
|
||||||
|
vpn = "100.100.45.9";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:8ec7:b5d2:f663:a67a";
|
||||||
|
vpn = "fd7a:115c:a1e0::9";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gustave = {
|
gustave = {
|
||||||
|
@ -87,82 +114,140 @@ inputs: lib: with lib; let
|
||||||
hm_version = inputs.home-manager;
|
hm_version = inputs.home-manager;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
core-security = {
|
core-security = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
arch = "x86_64-linux";
|
arch = "x86_64-linux";
|
||||||
nixpkgs_version = inputs.nixpkgs;
|
nixpkgs_version = inputs.nixpkgs;
|
||||||
hm_version = inputs.home-manager;
|
hm_version = inputs.home-manager;
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.0.175"; vpn = "100.100.45.14"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:40f0:8cff:fe31:3e94"; vpn = "fd7a:115c:a1e0::e"; };
|
public = "82.67.34.230";
|
||||||
|
local = "192.168.0.175";
|
||||||
|
vpn = "100.100.45.14";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:40f0:8cff:fe31:3e94";
|
||||||
|
vpn = "fd7a:115c:a1e0::e";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
core-data =
|
core-data = {
|
||||||
{
|
inherit tld;
|
||||||
inherit tld;
|
arch = "x86_64-linux";
|
||||||
arch = "x86_64-linux";
|
nixpkgs_version = inputs.nixpkgs;
|
||||||
nixpkgs_version = inputs.nixpkgs;
|
hm_version = inputs.home-manager;
|
||||||
hm_version = inputs.home-manager;
|
ipv4 = {
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.0.66"; };
|
public = "82.67.34.230";
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:be24:11ff:fe09:638d"; };
|
local = "192.168.0.66";
|
||||||
};
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:be24:11ff:fe09:638d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nuage = {
|
nuage = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
subdomains = [ "nuage.malka.family" ];
|
subdomains = [ "nuage.malka.family" ];
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.0.101"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:95c9:b2e2:e999:1a45"; };
|
public = "82.67.34.230";
|
||||||
|
local = "192.168.0.101";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:95c9:b2e2:e999:1a45";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
doma-backups = {
|
doma-backups = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
subdomains = [ "doma-backups.julienmalka.me" ];
|
subdomains = [ "doma-backups.julienmalka.me" ];
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.0.250"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:6b86:c2c:2141:6702"; };
|
public = "82.67.34.230";
|
||||||
|
local = "192.168.0.250";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:6b86:c2c:2141:6702";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
doma-zulip = {
|
doma-zulip = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
subdomains = [ "zulip.julienmalka.me" ];
|
subdomains = [ "zulip.julienmalka.me" ];
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.0.187"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:6830:ddff:fe52:a444"; };
|
public = "82.67.34.230";
|
||||||
|
local = "192.168.0.187";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:6830:ddff:fe52:a444";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pve1 = {
|
pve1 = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.1.1"; vpn = "100.100.45.3"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:d250:99ff:fefa:b62"; vpn = "fd7a:115c:a1e0::3"; };
|
public = "82.67.34.230";
|
||||||
|
local = "192.168.1.1";
|
||||||
|
vpn = "100.100.45.3";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:d250:99ff:fefa:b62";
|
||||||
|
vpn = "fd7a:115c:a1e0::3";
|
||||||
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
};
|
};
|
||||||
pve2 = {
|
pve2 = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.1.2"; vpn = "100.100.45.15"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:aaa1:59ff:fec7:1d6"; vpn = "fd7a:115c:a1e0::f"; };
|
public = "82.67.34.230";
|
||||||
|
local = "192.168.1.2";
|
||||||
|
vpn = "100.100.45.15";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:aaa1:59ff:fec7:1d6";
|
||||||
|
vpn = "fd7a:115c:a1e0::f";
|
||||||
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
|
|
||||||
};
|
};
|
||||||
pve3 = {
|
pve3 = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.1.3"; vpn = "100.100.45.16"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:aaa1:59ff:fec1:aa10"; vpn = "fd7a:115c:a1e0::10"; };
|
public = "82.67.34.230";
|
||||||
|
local = "192.168.1.3";
|
||||||
|
vpn = "100.100.45.16";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:aaa1:59ff:fec1:aa10";
|
||||||
|
vpn = "fd7a:115c:a1e0::10";
|
||||||
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
};
|
};
|
||||||
pve4 = {
|
pve4 = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.1.4"; vpn = "100.100.45.17"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:d250:99ff:fefa:b76"; vpn = "fd7a:115c:a1e0::11"; };
|
public = "82.67.34.230";
|
||||||
|
local = "192.168.1.4";
|
||||||
|
vpn = "100.100.45.17";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:d250:99ff:fefa:b76";
|
||||||
|
vpn = "fd7a:115c:a1e0::11";
|
||||||
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
};
|
};
|
||||||
saves-paris = {
|
saves-paris = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
subdomains = [ "saves-paris.luj" ];
|
subdomains = [ "saves-paris.luj" ];
|
||||||
ipv4 = { public = "82.67.34.230"; local = "192.168.4.5"; vpn = "100.100.45.4"; };
|
ipv4 = {
|
||||||
ipv6 = { public = "2a01:e0a:de4:a0e1:3af3:abff:fe6a:1f54"; vpn = "fd7a:115c:a1e0::4"; };
|
public = "82.67.34.230";
|
||||||
|
local = "192.168.4.5";
|
||||||
|
vpn = "100.100.45.4";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
public = "2a01:e0a:de4:a0e1:3af3:abff:fe6a:1f54";
|
||||||
|
vpn = "fd7a:115c:a1e0::4";
|
||||||
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
};
|
};
|
||||||
|
@ -170,16 +255,18 @@ inputs: lib: with lib; let
|
||||||
saves-lyon = {
|
saves-lyon = {
|
||||||
inherit tld;
|
inherit tld;
|
||||||
subdomains = [ "saves-lyon.luj" ];
|
subdomains = [ "saves-lyon.luj" ];
|
||||||
ipv4 = { vpn = "100.100.45.20"; };
|
ipv4 = {
|
||||||
ipv6 = { vpn = "fd7a:115c:a1e0::14"; };
|
vpn = "100.100.45.20";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
vpn = "fd7a:115c:a1e0::14";
|
||||||
|
};
|
||||||
sshPort = 22;
|
sshPort = 22;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
(evalModules { inherit modules; }).config
|
(evalModules { inherit modules; }).config
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
./hardware.nix
|
||||||
./hardware.nix
|
./home-julien.nix
|
||||||
./home-julien.nix
|
];
|
||||||
];
|
|
||||||
|
|
||||||
networking.hostName = "enigma";
|
networking.hostName = "enigma";
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
@ -19,16 +18,17 @@
|
||||||
networking.networkmanager.dns = "systemd-resolved";
|
networking.networkmanager.dns = "systemd-resolved";
|
||||||
services.resolved.enable = true;
|
services.resolved.enable = true;
|
||||||
|
|
||||||
security.pam.loginLimits = [{
|
security.pam.loginLimits = [
|
||||||
domain = "*";
|
{
|
||||||
type = "-";
|
domain = "*";
|
||||||
item = "nofile";
|
type = "-";
|
||||||
value = "262144";
|
item = "nofile";
|
||||||
}];
|
value = "262144";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
security.pam.services.swaylock = { };
|
security.pam.services.swaylock = { };
|
||||||
|
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
layout = "fr";
|
layout = "fr";
|
||||||
|
@ -68,28 +68,24 @@
|
||||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||||
# Only available from driver 515.43.04+
|
# Only available from driver 515.43.04+
|
||||||
# Do not disable this unless your GPU is unsupported or if you have a good reason to.
|
# Do not disable this unless your GPU is unsupported or if you have a good reason to.
|
||||||
open = true;
|
open = false;
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
# Enable the Nvidia settings menu,
|
||||||
# accessible via `nvidia-settings`.
|
# accessible via `nvidia-settings`.
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
|
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "nvidia" ];
|
boot.initrd.kernelModules = [ "nvidia" ];
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
|
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
|
||||||
programs.xwayland.enable = true;
|
programs.xwayland.enable = true;
|
||||||
programs.hyprland =
|
programs.hyprland = {
|
||||||
{
|
enable = true;
|
||||||
enable = true;
|
package = pkgs.unstable.hyprland;
|
||||||
package = pkgs.unstable.hyprland;
|
portalPackage = pkgs.unstable.xdg-desktop-portal-hyprland;
|
||||||
portalPackage = pkgs.unstable.xdg-desktop-portal-hyprland;
|
};
|
||||||
};
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Paris";
|
time.timeZone = "Europe/Paris";
|
||||||
|
|
||||||
|
@ -111,7 +107,6 @@
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = lib.mkForce pkgs.nix;
|
|
||||||
distributedBuilds = true;
|
distributedBuilds = true;
|
||||||
buildMachines = [
|
buildMachines = [
|
||||||
{
|
{
|
||||||
|
@ -119,7 +114,12 @@
|
||||||
maxJobs = 100;
|
maxJobs = 100;
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" ];
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
supportedFeatures = [ "kvm" "nixos-test" "benchmark" "big-parallel" ];
|
supportedFeatures = [
|
||||||
|
"kvm"
|
||||||
|
"nixos-test"
|
||||||
|
"benchmark"
|
||||||
|
"big-parallel"
|
||||||
|
];
|
||||||
sshKey = "/home/julien/.ssh/id_ed25519";
|
sshKey = "/home/julien/.ssh/id_ed25519";
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
}
|
}
|
||||||
|
@ -149,19 +149,13 @@
|
||||||
|
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
environment.variables.WLR_NO_HARDWARE_CURSORS = "1";
|
environment.variables.WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
services.avahi.enable = true;
|
services.avahi.enable = true;
|
||||||
services.avahi.nssmdns4 = true;
|
services.avahi.nssmdns = true;
|
||||||
# for a WiFi printer
|
# for a WiFi printer
|
||||||
services.avahi.openFirewall = true;
|
services.avahi.openFirewall = true;
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue