diff --git a/flake.nix b/flake.nix index ebebe00..2180423 100644 --- a/flake.nix +++ b/flake.nix @@ -106,6 +106,7 @@ # Nix configuration basic_module + # Nix rice inputs.nix-rice.modules.default ./modules/nixos/rice.nix @@ -114,13 +115,6 @@ # Agenix configuration 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; } ./modules/nixos/users/bertof.nix @@ -322,7 +316,17 @@ odin = inputs.nixpkgs-u.lib.nixosSystem { 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 { diff --git a/instances/odin/configuration.nix b/instances/odin/configuration.nix new file mode 100644 index 0000000..f25b973 --- /dev/null +++ b/instances/odin/configuration.nix @@ -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"; +} diff --git a/instances/sif/configuration.nix b/instances/sif/configuration.nix index 0862f94..d1e12db 100644 --- a/instances/sif/configuration.nix +++ b/instances/sif/configuration.nix @@ -39,6 +39,7 @@ }; hardware = { + logitech.wireless = { enable = true; enableGraphical = true; }; graphics = { 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/" ''; }; + extest.enable = true; remotePlay.openFirewall = true; }; zsh.enable = true; diff --git a/instances/thor/configuration.nix b/instances/thor/configuration.nix index c3443a9..8cf4842 100644 --- a/instances/thor/configuration.nix +++ b/instances/thor/configuration.nix @@ -63,6 +63,7 @@ hardware = { + logitech.wireless = { enable = true; enableGraphical = true; }; nvidia = { # modesetting.enable = true; nvidiaSettings = true; diff --git a/modules/nixos/installer.nix b/modules/nixos/installer.nix index 67bf262..30948a0 100644 --- a/modules/nixos/installer.nix +++ b/modules/nixos/installer.nix @@ -1,4 +1,4 @@ -{ +{ config, ... }: { services.openssh = { enable = true; openFirewall = true; @@ -7,14 +7,8 @@ PasswordAuthentication = false; }; }; - users.users.root = { - 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" - ]; - }; + + users.users.root.openssh.authorizedKeys.keys = config.users.users.bertof.openssh.authorizedKeys.keys; + system.stateVersion = "22.11"; } diff --git a/modules/nixos/steam.nix b/modules/nixos/steam.nix index 15071e7..00a4098 100644 --- a/modules/nixos/steam.nix +++ b/modules/nixos/steam.nix @@ -8,7 +8,8 @@ # # 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 = { allowedTCPPorts = [ diff --git a/modules/nixos/users/bertof.nix b/modules/nixos/users/bertof.nix index 737b364..45981bb 100644 --- a/modules/nixos/users/bertof.nix +++ b/modules/nixos/users/bertof.nix @@ -17,11 +17,11 @@ "wheel" ]; openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3W3Btk1qtLHU69aFwseDuKU6PJMA+NxVXJXiRNhDce bertof@odin" + # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3W3Btk1qtLHU69aFwseDuKU6PJMA+NxVXJXiRNhDce bertof@odin" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7mcf8fbMo1eXqSJeVFWaweB+JOU+67dFuf8laZKZZG bertof@thor" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKT+D5QE4TkgoKw5IvSYpvnvIIRM87RBePHce1Aaz3xJ bertof@thor" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbG791lSOl8Rqoy+KkdKiOJnOMRg02+HZ/VrlrWMYAX bertof@baldur" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFviqAN0S+wZ5BQRpWpmsrkduPox3L4C7iLlCOQk7+pE bertof@loki" + # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbG791lSOl8Rqoy+KkdKiOJnOMRg02+HZ/VrlrWMYAX bertof@baldur" + # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFviqAN0S+wZ5BQRpWpmsrkduPox3L4C7iLlCOQk7+pE bertof@loki" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFWnGoScIwOUQurZx8j0Y18nxdUJ3/gNyP5vleKkS/00 bertof@sif" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKobKuuJCoQ7gj/NeE57wfSg/Qs4X3osw9xXook3PMAP bertof@extra" ];