hosts: steamdeck: add initial config

This commit is contained in:
2023-07-23 20:12:02 +02:00
parent 0df6e3313a
commit 3c4d801b71
6 changed files with 175 additions and 73 deletions

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