add steamdeck
This commit is contained in:
@@ -36,6 +36,10 @@
|
||||
username = "nb-01.cloonar.com";
|
||||
key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN/2SAFm50kraB1fepAizox/QRXxB7WbqVbH+5OPalDT47VIJGNKOKhixQoqhABHxEoLxdf/C83wxlCVlPV9poLfDgVkA3Lyt5r3tSFQ6QjjOJAgchWamMsxxyGBedhKvhiEzcr/Lxytnoz3kjDG8fqQJwEpdqMmJoMUfyL2Rqp16u+FQ7d5aJtwO8EUqovhMaNO7rggjPpV/uMOg+tBxxmscliN7DLuP4EMTA/FwXVzcFNbOx3K9BdpMRAaSJt4SWcJO2cS2KHA5n/H+PQI7nz5KN3Yr/upJN5fROhi/SHvK39QOx12Pv7FCuWlc+oR68vLaoCKYhnkl3DnCfc7A7";
|
||||
}
|
||||
{
|
||||
username = "steamdeck.cloonar.com";
|
||||
key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC6j6VMm2qDEwiKRwYBbhaSxrUoPI0HRjhmsngUVZexFTJwVJFRxThourfeQ46LCRHAWSryc/+w0W1QXYzGHoeJFtGntpkL0d4c2xSERgRpmSXG4EBJtlqJCvItWoXgpJK5K8q0lM3SZTtKxUyARtHrx1WQBjS/KoBw6NLkUumi4SkPN9StUt4KqtZVaAIQh5VShkpGJ5yfiIBWjFNaLmZ8uHwY8zV6U6KMNIfOHL97cI0t4PbOfCc1+6ZeVtFlWq1/ceFkaJJodb00XPAQeq10Uc2xNw2nFi2A5HszP4jIEheTtM6AQHE8d9iqAwBZoTe//65heMKd4BWSKryIT7HmG5ANC2MdhkfmxkIymzLyi3GoQv/hYPlGeLG9PFqqhZtNRx1IQlGQjOE1zlbnL3sKDJyZECP+hX0/oj33KOZSxaRPSbhgoHt4pE3Ig71akurYIlQj0ZO4xAABu+YZfe0LyvvLOACDWZH0U6Mqo5hpBy7PuhxGU/EtEkmA82aabjs= root@steamdeck";
|
||||
}
|
||||
];
|
||||
in {
|
||||
imports = builtins.map create_users users;
|
||||
|
||||
76
hosts/steamdeck.cloonar.com/configuration.nix
Normal file
76
hosts/steamdeck.cloonar.com/configuration.nix
Normal file
@@ -0,0 +1,76 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(
|
||||
# Put the most recent revision here:
|
||||
let revision = "5cb5c5cbac8fc83aa62d8968c58a7ef556342b39"; in
|
||||
builtins.fetchTarball {
|
||||
url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${revision}.tar.gz";
|
||||
# Update the hash as needed:
|
||||
sha256 = "sha256:0000000000000000000000000000000000000000000000000000";
|
||||
} + "/modules"
|
||||
)
|
||||
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
jovian.steam.enable = true;
|
||||
jovian.steam.autoStart = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Setup keyfile
|
||||
boot.initrd.secrets = {
|
||||
"/crypto_keyfile.bin" = null;
|
||||
};
|
||||
|
||||
networking.hostName = "steamdeck"; # Define your hostname.
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Vienna";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_AT.UTF-8";
|
||||
LC_IDENTIFICATION = "de_AT.UTF-8";
|
||||
LC_MEASUREMENT = "de_AT.UTF-8";
|
||||
LC_MONETARY = "de_AT.UTF-8";
|
||||
LC_NAME = "de_AT.UTF-8";
|
||||
LC_NUMERIC = "de_AT.UTF-8";
|
||||
LC_PAPER = "de_AT.UTF-8";
|
||||
LC_TELEPHONE = "de_AT.UTF-8";
|
||||
LC_TIME = "de_AT.UTF-8";
|
||||
};
|
||||
|
||||
users.users.dominik = {
|
||||
isNormalUser = true;
|
||||
description = "Dominik Polakovics";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
# thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN/2SAFm50kraB1fepAizox/QRXxB7WbqVbH+5OPalDT47VIJGNKOKhixQoqhABHxEoLxdf/C83wxlCVlPV9poLfDgVkA3Lyt5r3tSFQ6QjjOJAgchWamMsxxyGBedhKvhiEzcr/Lxytnoz3kjDG8fqQJwEpdqMmJoMUfyL2Rqp16u+FQ7d5aJtwO8EUqovhMaNO7rggjPpV/uMOg+tBxxmscliN7DLuP4EMTA/FwXVzcFNbOx3K9BdpMRAaSJt4SWcJO2cS2KHA5n/H+PQI7nz5KN3Yr/upJN5fROhi/SHvK39QOx12Pv7FCuWlc+oR68vLaoCKYhnkl3DnCfc7A7"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIRQuPqH5fdX3KEw7DXzWEdO3AlUn1oSmtJtHB71ICoH Generated By Termius"
|
||||
];
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.xserver.displayManager.autoLogin.enable = true;
|
||||
services.xserver.displayManager.autoLogin.user = "dominik";
|
||||
|
||||
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
}
|
||||
51
hosts/steamdeck.cloonar.com/hardware-configuration.nix
Normal file
51
hosts/steamdeck.cloonar.com/hardware-configuration.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/2bc0a1c5-dd58-4824-9a27-4e6e6f33a2e8";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-4dfc511b-12f9-46ef-be2a-f4e026263005".device = "/dev/disk/by-uuid/4dfc511b-12f9-46ef-be2a-f4e026263005";
|
||||
|
||||
boot.initrd.luks = {
|
||||
yubikeySupport = true;
|
||||
devices."luks-4dfc511b-12f9-46ef-be2a-f4e026263005" = {
|
||||
device = "/dev/disk/by-uuid/4dfc511b-12f9-46ef-be2a-f4e026263005";
|
||||
yubikey = {
|
||||
slot = 2;
|
||||
twoFactor = false;
|
||||
storage = {
|
||||
device = "/dev/disk/by-uuid/661D-F155";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/661D-F155";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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
|
||||
# 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`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp4s0f3u1u3c2.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Reference in New Issue
Block a user