Odin: server configuration

This commit is contained in:
Filippo Berto 2024-12-25 22:39:40 +01:00
parent 7c38e6d9f1
commit 6c65746ba5
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED
7 changed files with 91 additions and 22 deletions

View file

@ -106,6 +106,7 @@
# Nix configuration # Nix configuration
basic_module basic_module
# Nix rice
inputs.nix-rice.modules.default inputs.nix-rice.modules.default
./modules/nixos/rice.nix ./modules/nixos/rice.nix
@ -114,13 +115,6 @@
# Agenix configuration # Agenix configuration
inputs.ragenix.nixosModules.default inputs.ragenix.nixosModules.default
{
age.secrets = {
# wg_psk.file = ./secrets/wg_psk.age;
# baldur_wg_priv.file = ./secrets/baldur_wg_priv.age;
# oppo_wg_priv.file = ./secrets/oppo_wg_priv.age;
};
}
# { services.userborn.enable = true; } # { services.userborn.enable = true; }
./modules/nixos/users/bertof.nix ./modules/nixos/users/bertof.nix
@ -322,7 +316,17 @@
odin = inputs.nixpkgs-u.lib.nixosSystem { odin = inputs.nixpkgs-u.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = commonModules ++ odinCommonModules ++ [ ./instances/odin/configuration-intel.nix ]; modules = commonModules ++ [
inputs.nixos-hardware.nixosModules.common-cpu-intel
inputs.nixos-hardware.nixosModules.common-pc-laptop
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
./instances/odin/hardware-configuration.nix
./instances/odin/configuration.nix
# ./instances/odin/common_configuration.nix
# ./instances/odin/configuration-nvidia.nix
] ++ homeManagerModules ++ [{
home-manager.users.bertof = import ./instances/odin/hm.nix;
}];
}; };
heimdall = inputs.nixpkgs.lib.nixosSystem { heimdall = inputs.nixpkgs.lib.nixosSystem {

View file

@ -0,0 +1,67 @@
{ pkgs, ... }: {
boot = {
kernelParams = [ "acpi_osi=Linux-Dell-Video" ];
initrd.checkJournalingFS = true; # Use same ACPI identifier as Dell Ubuntu
loader = {
systemd-boot = {
enable = true;
editor = false;
};
efi.canTouchEfiVariables = true;
};
};
console = { font = "Lat2-Terminus16"; keyMap = "it"; };
i18n.defaultLocale = "it_IT.UTF-8";
hardware = {
enableRedistributableFirmware = true;
bluetooth.enable = true;
cpu.intel.updateMicrocode = true;
graphics = {
enable = true;
enable32Bit = true;
extraPackages = [ pkgs.intel-media-driver ];
extraPackages32 = [ pkgs.pkgsi686Linux.intel-media-driver ];
};
nvidia = {
open = false;
prime = {
offload.enable = false;
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
nvidia-container-toolkit.enable = true;
};
networking = {
hostName = "odin";
networkmanager.enable = true;
};
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
extest.enable = true;
};
services = {
pipewire = {
enable = true;
pulse.enable = true;
jack.enable = true;
alsa = { enable = true; support32Bit = true; };
};
logind.lidSwitch = "ignore";
xserver.videoDrivers = [ "nvidia" ];
};
time.timeZone = "Europe/Rome";
zramSwap.enable = true;
system.stateVersion = "24.11";
}

View file

@ -39,6 +39,7 @@
}; };
hardware = { hardware = {
logitech.wireless = { enable = true; enableGraphical = true; };
graphics = { graphics = {
enable = true; enable = true;
@ -214,6 +215,7 @@
export GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas/" export GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas/"
''; '';
}; };
extest.enable = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
}; };
zsh.enable = true; zsh.enable = true;

View file

@ -63,6 +63,7 @@
hardware = { hardware = {
logitech.wireless = { enable = true; enableGraphical = true; };
nvidia = { nvidia = {
# modesetting.enable = true; # modesetting.enable = true;
nvidiaSettings = true; nvidiaSettings = true;

View file

@ -1,4 +1,4 @@
{ { config, ... }: {
services.openssh = { services.openssh = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
@ -7,14 +7,8 @@
PasswordAuthentication = false; PasswordAuthentication = false;
}; };
}; };
users.users.root = {
openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = config.users.users.bertof.openssh.authorizedKeys.keys;
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAhxOjo9Ac9hVd3eOR56F6sClUMUh1m7VpcmzA18dslj bertof@odin"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3W3Btk1qtLHU69aFwseDuKU6PJMA+NxVXJXiRNhDce bertof@odin"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7mcf8fbMo1eXqSJeVFWaweB+JOU+67dFuf8laZKZZG bertof@thor"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKT+D5QE4TkgoKw5IvSYpvnvIIRM87RBePHce1Aaz3xJ bertof@thor"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKp1Rfb2acLM/5TDUahu+AdV/HVw+hoOTdQIeQIjV5p8"
];
};
system.stateVersion = "22.11"; system.stateVersion = "22.11";
} }

View file

@ -8,7 +8,8 @@
# # export GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas/" # # export GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas/"
# # ''; # # '';
# }; # };
# remotePlay.openFirewall = true; # incorrect values remotePlay.openFirewall = true; # incorrect values
extest.enable = true;
}; };
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ allowedTCPPorts = [

View file

@ -17,11 +17,11 @@
"wheel" "wheel"
]; ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3W3Btk1qtLHU69aFwseDuKU6PJMA+NxVXJXiRNhDce bertof@odin" # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3W3Btk1qtLHU69aFwseDuKU6PJMA+NxVXJXiRNhDce bertof@odin"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7mcf8fbMo1eXqSJeVFWaweB+JOU+67dFuf8laZKZZG bertof@thor" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7mcf8fbMo1eXqSJeVFWaweB+JOU+67dFuf8laZKZZG bertof@thor"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKT+D5QE4TkgoKw5IvSYpvnvIIRM87RBePHce1Aaz3xJ bertof@thor" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKT+D5QE4TkgoKw5IvSYpvnvIIRM87RBePHce1Aaz3xJ bertof@thor"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbG791lSOl8Rqoy+KkdKiOJnOMRg02+HZ/VrlrWMYAX bertof@baldur" # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbG791lSOl8Rqoy+KkdKiOJnOMRg02+HZ/VrlrWMYAX bertof@baldur"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFviqAN0S+wZ5BQRpWpmsrkduPox3L4C7iLlCOQk7+pE bertof@loki" # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFviqAN0S+wZ5BQRpWpmsrkduPox3L4C7iLlCOQk7+pE bertof@loki"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFWnGoScIwOUQurZx8j0Y18nxdUJ3/gNyP5vleKkS/00 bertof@sif" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFWnGoScIwOUQurZx8j0Y18nxdUJ3/gNyP5vleKkS/00 bertof@sif"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKobKuuJCoQ7gj/NeE57wfSg/Qs4X3osw9xXook3PMAP bertof@extra" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKobKuuJCoQ7gj/NeE57wfSg/Qs4X3osw9xXook3PMAP bertof@extra"
]; ];