hosts: steamdeck: add initial config

This commit is contained in:
Kabbone 2023-07-23 20:12:02 +02:00
parent 0df6e3313a
commit 3c4d801b71
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY
6 changed files with 175 additions and 73 deletions

View File

@ -51,11 +51,11 @@
pki.certificateFiles = [
./rootCA.pem
];
tpm2 = {
enable = true;
pkcs11.enable = true;
tctiEnvironment.enable = true;
};
#tpm2 = {
# enable = true;
# pkcs11.enable = true;
# tctiEnvironment.enable = true;
# };
};
sound = { # ALSA sound enable

View File

@ -22,8 +22,7 @@
{
imports = # For now, if applying to other system, swap files
[(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
#[(import ../../modules/desktop/hyprland/default.nix)] ++ # Window Manager
[(import ../../modules/desktop/sway/default.nix)] ++ # Window Manager
[(import ../../modules/desktop/gnome/default.nix)] ++ # Window Manager
[(import ../../modules/desktop/virtualisation/default.nix)] ++ # Docker
(import ../../modules/hardware); # Hardware devices
@ -63,7 +62,6 @@
enableSSHSupport = true;
pinentryFlavor = "curses";
};
steam.enable = true;
};
services = {

View File

@ -22,70 +22,76 @@
boot.kernelModules = [ "kvm-amd" ];
boot.kernelParams = [ ];
boot.tmp.useTmpfs = true;
zramSwap.enable = true;
# zramSwap.enable = true;
services.btrfs.autoScrub = {
enable = true;
interval = "monthly";
fileSystems = [
"/"
];
};
# services.btrfs.autoScrub = {
# enable = true;
# interval = "monthly";
# fileSystems = [
# "/"
# ];
# };
#
# services.btrbk = {
# instances = {
# hf = {
# onCalendar = "hourly";
# settings = {
# incremental = "yes";
# snapshot_create = "ondemand";
# snapshot_dir = "@snapshots";
# timestamp_format = "long";
#
# snapshot_preserve = "2m 2w 5d 5h";
# snapshot_preserve_min = "latest";
#
# volume = {
# "/mnt/snapshots/root" = {
# snapshot_create = "always";
# subvolume = {
# "@home" = {};
# };
# };
# };
# };
# };
# };
# };
services.btrbk = {
instances = {
hf = {
onCalendar = "hourly";
settings = {
incremental = "yes";
snapshot_create = "ondemand";
snapshot_dir = "@snapshots";
timestamp_format = "long";
snapshot_preserve = "2m 2w 5d 5h";
snapshot_preserve_min = "latest";
volume = {
"/mnt/snapshots/root" = {
snapshot_create = "always";
subvolume = {
"@home" = {};
};
};
};
};
};
};
};
# fileSystems."/" =
# { device = "/dev/disk/by-label/NIXROOT";
# fsType = "btrfs";
# options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async" ];
# };
#
# fileSystems."/home" =
# { device = "/dev/disk/by-label/NIXROOT";
# fsType = "btrfs";
# options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async" ];
# };
#
# fileSystems."/srv" =
# { device = "/dev/disk/by-label/NIXROOT";
# fsType = "btrfs";
# options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async" ];
# };
#
# fileSystems."/nix" =
# { device = "/dev/disk/by-label/NIXROOT";
# fsType = "btrfs";
# options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ];
# };
#
# fileSystems."/mnt/snapshots/root" =
# { device = "/dev/disk/by-label/NIXROOT";
# fsType = "btrfs";
# options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async" ];
# };
fileSystems."/" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async" ];
};
fileSystems."/srv" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ];
};
fileSystems."/mnt/snapshots/root" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async" ];
fsType = "ext4";
options = [ "defaults,noatime" ];
};
fileSystems."/boot" =
@ -96,22 +102,21 @@
fileSystems."/sdcard" =
{ device = "/dev/disk/by-label/sdcard";
fsType = "ext4";
options = [ "nofail" "x-systemd.automount" ];
options = [ "nofail,x-systemd.automount" ];
};
fileSystems."/mnt/Pluto" =
{ device = "nas:/Pluto";
fsType = "nfs";
options = [ "noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2" ];
options = [ "nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2" ];
};
fileSystems."/mnt/Mars" =
{ device = "nas:/Mars";
fsType = "nfs";
options = [ "noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2" ];
options = [ "nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2" ];
};
swapDevices = [
{ device = "/dev/disk/by-label/NIXSWAP"; }
];

View File

@ -17,7 +17,7 @@
imports =
[
#../../modules/desktop/hyprland/home.nix # Window Manager
../../modules/desktop/sway/home.nix # Window Manager
../../modules/desktop/gnome/home.nix # Window Manager
../../modules/home.nix # Window Manager
];
@ -31,7 +31,6 @@
streamlink
streamlink-twitch-gui-bin
element-desktop
intel-gpu-tools
pulsemixer
# Display

View File

@ -0,0 +1,54 @@
#
# Gnome configuration
#
# flake.nix
# ├─ ./hosts
# │ └─ ./laptop
# │ └─ default.nix
# └─ ./modules
# └─ ./desktop
# └─ ./gnome
# └─ default.nix *
#
{ config, lib, user, pkgs, jovian-nixos, ... }:
{
imports = [
(jovian-nixos + "/modules")
];
jovian = {
steam.enable = true;
devices.steamdeck = {
enable = true;
};
};
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
environment.systemPackages = with pkgs; [
gnome.gnome-terminal
gnomeExtensions.dash-to-dock
steamdeck-firmware
rocm-opencl-icd
rocm-opencl-runtime
clinfo
];
services = {
xserver = {
desktopManager.gnome.enable = true;
displayManager = {
gdm.wayland = true;
defaultSession = "steam-wayland";
autoLogin.enable = true;
autoLogin.user = "kabbone";
};
};
};
}

View File

@ -0,0 +1,46 @@
#
# Gnome NixOS & Home manager configuration
#
# flake.nix
# ├─ ./hosts
# │ └─ ./steamdeck
# │ └─ home.nix
# └─ ./modules
# └─ ./desktop
# └─ ./gnome
# └─ home.nix *
#
{ config, lib, pkgs, ... }:
{
dconf.settings = {
# Enable on-screen keyboard
"org/gnome/desktop/a11y/applications" = {
screen-keyboard-enabled = true;
};
# "org/gnome/shell" = {
# enabled-extensions = [
# "dash-to-dock@micxgx.gmail.com"
# ];
favorite-apps = ["steam.desktop"];
};
# Dash to Dock settings for a better touch screen experience
"org/gnome/shell/extensions/dash-to-dock" = {
background-opacity = 0.80000000000000004;
custom-theme-shrink = true;
dash-max-icon-size = 48;
dock-fixed = true;
dock-position = "LEFT";
extend-height = true;
height-fraction = 0.60999999999999999;
hot-keys = false;
preferred-monitor = -2;
preferred-monitor-by-connector = "eDP-1";
scroll-to-focused-application = true;
show-apps-at-top = true;
show-mounts = true;
show-show-apps-button = true;
show-trash = false;
};
};
}