feat(host/fix): adding the steam possiblities
This commit is contained in:
parent
51f952aa7b
commit
b804520f4c
2 changed files with 189 additions and 152 deletions
|
|
@ -4,70 +4,72 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
# services.dbus.enable = true;
|
# services.dbus.enable = true;
|
||||||
boot = {
|
boot = {
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = [
|
availableKernelModules = [
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
"ahci"
|
"ahci"
|
||||||
"usbhid"
|
"usbhid"
|
||||||
"sd_mod"
|
"sd_mod"
|
||||||
];
|
];
|
||||||
kernelModules = [];
|
kernelModules = [];
|
||||||
};
|
};
|
||||||
kernelModules = [
|
kernelModules = [
|
||||||
"kvm-intel"
|
"kvm-intel"
|
||||||
];
|
];
|
||||||
extraModulePackages = [];
|
extraModulePackages = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "/dev/disk/by-uuid/a943d592-57d3-497e-bf43-49b50ac73f0b";
|
device = "/dev/disk/by-uuid/a943d592-57d3-497e-bf43-49b50ac73f0b";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-uuid/5AAB-0026";
|
device = "/dev/disk/by-uuid/5AAB-0026";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [
|
options = [
|
||||||
"fmask=0077"
|
"fmask=0077"
|
||||||
"dmask=0077"
|
"dmask=0077"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"/mnt/data" = {
|
"/mnt/data" = {
|
||||||
device = "/dev/disk/by-uuid/5729d30c-5806-4ccd-8a2a-080a258084dc";
|
device = "/dev/disk/by-uuid/5729d30c-5806-4ccd-8a2a-080a258084dc";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
|
|
||||||
hardware = {
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
graphics.enable = true;
|
|
||||||
nvidia = {
|
|
||||||
open = false;
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement.enable = false;
|
|
||||||
powerManagement.finegrained = false;
|
|
||||||
nvidiaSettings = true;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
hardware = {
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
graphics.enable = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
steam-hardware.enable = true;
|
||||||
|
nvidia = {
|
||||||
|
open = false;
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,102 +1,137 @@
|
||||||
|
# **************************************************************************** #
|
||||||
|
# #
|
||||||
|
# ::: :::::::: #
|
||||||
|
# configuration.nix :+: :+: :+: #
|
||||||
|
# +:+ +:+ +:+ #
|
||||||
|
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
||||||
|
# +#+#+#+#+#+ +#+ #
|
||||||
|
# Created: 2025/10/02 00:54:38 by rparodi #+# #+# #
|
||||||
|
# Updated: 2025/10/02 11:44:15 by rparodi ### ########.fr #
|
||||||
|
# #
|
||||||
|
# **************************************************************************** #
|
||||||
|
|
||||||
{ inputs, config, pkgs, lib, ... }:
|
{ inputs, config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../global.nix
|
../global.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/games/global.nix
|
../../modules/games/global.nix
|
||||||
../../services/forty_two.nix
|
../../services/forty_two.nix
|
||||||
../../services/discord.nix
|
../../services/discord.nix
|
||||||
../../services/games.nix
|
../../services/games.nix
|
||||||
../../services/web.nix
|
../../services/web.nix
|
||||||
../../services/self_host.nix
|
../../services/self_host.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "nixos-fix";
|
hostName = "nixos-fix";
|
||||||
firewall.enable = false;
|
firewall.enable = false;
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
wireless.enable = false;
|
wireless.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
service = {
|
service = {
|
||||||
selfhost = {
|
selfhost = {
|
||||||
htop = true;
|
htop = true;
|
||||||
ollama = false;
|
ollama = false;
|
||||||
mail = false;
|
mail = false;
|
||||||
monitor = true;
|
monitor = true;
|
||||||
teamspeak = true;
|
teamspeak = true;
|
||||||
nextcloud = true;
|
nextcloud = true;
|
||||||
};
|
};
|
||||||
forty_two.irc = true;
|
forty_two.irc = true;
|
||||||
web.portefolio = true;
|
web.portefolio = true;
|
||||||
minecraft = {
|
games = {
|
||||||
enium-pv = false;
|
enium-pv = false;
|
||||||
};
|
};
|
||||||
bot_discord = {
|
bot_discord = {
|
||||||
master = true;
|
master = true;
|
||||||
bde = false;
|
bde = false;
|
||||||
tut = true;
|
tut = true;
|
||||||
marty = true;
|
marty = true;
|
||||||
ada = true;
|
ada = true;
|
||||||
music = false;
|
music = false;
|
||||||
tempvoc = true;
|
tempvoc = true;
|
||||||
ticket = true;
|
ticket = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
programs = {
|
||||||
defaultUserShell = pkgs.zsh;
|
steam = {
|
||||||
users = {
|
enable = true;
|
||||||
axel = {
|
gamescopeSession.enable = true;
|
||||||
isNormalUser = true;
|
};
|
||||||
initialPassword = "Feuyllelpb12341234";
|
gamemode.enable = true;
|
||||||
description = "feuylle";
|
};
|
||||||
useDefaultShell = true;
|
|
||||||
extraGroups = [
|
users = {
|
||||||
"networkmanager"
|
defaultUserShell = pkgs.zsh;
|
||||||
"plugdev"
|
users = {
|
||||||
"docker"
|
axel = {
|
||||||
];
|
isNormalUser = true;
|
||||||
packages = with pkgs; [
|
initialPassword = "Feuyllelpb12341234";
|
||||||
home-manager
|
description = "feuylle";
|
||||||
];
|
useDefaultShell = true;
|
||||||
};
|
extraGroups = [
|
||||||
};
|
"networkmanager"
|
||||||
};
|
"plugdev"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
packages = with pkgs; [
|
||||||
|
home-manager
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
seatd.enable = true;
|
seatd.enable = true;
|
||||||
openssh = {
|
displayManager = {
|
||||||
enable = true;
|
defaultSession = "steam";
|
||||||
ports = [ 42131 ];
|
gdm.enable = true;
|
||||||
};
|
autoLogin = {
|
||||||
pipewire = {
|
enable = true;
|
||||||
enable = true;
|
user = "raphael";
|
||||||
alsa.enable = true;
|
};
|
||||||
alsa.support32Bit = true;
|
};
|
||||||
pulse.enable = true;
|
xserver = {
|
||||||
jack.enable = true;
|
enable = true;
|
||||||
};
|
videoDrivers = [
|
||||||
udev.extraRules = ''
|
"nvidia"
|
||||||
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="5740", MODE="0666"
|
];
|
||||||
'';
|
};
|
||||||
redis.servers."" = {
|
dbus.enable = true;
|
||||||
enable = true;
|
pipewire = {
|
||||||
};
|
enable = true;
|
||||||
postgresql = {
|
alsa.enable = true;
|
||||||
enable = true;
|
alsa.support32Bit = true;
|
||||||
};
|
pulse.enable = true;
|
||||||
};
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
openssh = {
|
||||||
|
enable = true;
|
||||||
|
ports = [ 42131 ];
|
||||||
|
};
|
||||||
|
udev.extraRules = ''
|
||||||
|
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="5740", MODE="0666"
|
||||||
|
'';
|
||||||
|
redis.servers."" = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
postgresql = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue