started the steam box set up

This commit is contained in:
Chris Kruining 2025-06-15 16:07:10 +02:00
parent b9c54a5660
commit be896b7739
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg
13 changed files with 129 additions and 25 deletions

View file

@ -42,6 +42,11 @@
};
erosanix.url = "github:emmanuelrosa/erosanix";
jovian = {
url = "github:Jovian-Experiments/Jovian-NixOS";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs = inputs @ { self, nixpkgs, nix-minecraft, flux, ... }:

19
hosts/tulkas/default.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, ... }:
{
modules = {
system.audio.enable = true;
gaming.enable = true;
root = {
user = {
full_name = "__ROOT__";
email = "__ROOT__@${config.networking.hostName}";
};
shell = {
default = "zsh";
};
};
};
}

33
hosts/tulkas/hardware.nix Normal file
View file

@ -0,0 +1,33 @@
{ config, lib, pkgs, modulesPath, ... }:
let
inherit (lib.modules) mkDefault;
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/C842-316A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; }
];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
kernelParams = [];
extraModulePackages = [ ];
};
nixpkgs.hostPlatform = mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,39 @@
{ ... }:
{
user = {
full_name = "Chris Kruining";
email = "chris@kruining.eu";
is_trusted = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
desktop = {
plasma = {
enable = true;
autoLogin = true;
};
applications = {
steam.enable = true;
};
terminal = {
default = "ghostty";
ghostty.enable = true;
};
editors = {
default = "nano";
nano.enable = true;
};
};
shell = {
default = "zsh";
};
}

View file

@ -42,10 +42,10 @@ in rec
})
(filterAttrs (n: v: !elem n ["system"]) attrs)
(import path)
(args@{ inputs, lib, pkgs, config, options, ... }: {
(args@{ ... }: {
imports = mapModulesRec' ../modules/home (file: (import file (args // { user = "root"; })));
})
({config, ...}: {
({...}: {
imports = [];
config = {
@ -61,7 +61,7 @@ in rec
};
})
]
++ (map (user: (args@{ inputs, lib, pkgs, config, options, ... }: {
++ (map (user: (args@{ ... }: {
imports = mapModulesRec' ../modules/home (file: (import file (args // { inherit user; })));
config.modules.${user} = (import "${path}/users/${user}/default.nix" args);

View file

@ -1,12 +1,10 @@
{
config,
options,
lib,
pkgs,
user,
...
}: let
inherit (builtins) toString;
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf mkMerge;
in {

View file

@ -1,8 +1,6 @@
{ config, lib, pkgs, user, ... }:
let
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.modules) mkIf;
inherit (lib.strings) concatStrings escapeNixString;
cfg = config.modules.${user}.shell;
in

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, user, ... }:
let
inherit (lib) mkIf mkDefault;
inherit (lib) mkIf;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) nullOr enum;

View file

@ -0,0 +1,20 @@
{ inputs, lib, config, ... }: let
inherit (lib) mkEnableOption mkIf;
cfg = config.modules.desktop.gaming;
in
{
imports = [ inputs.jovian.nixosModules.default ];
options.modules.desktop.gaming = {
enable = mkEnableOption "enable steamdeck like desktop";
};
config = mkIf cfg.enable {
jovian.steam = {
enable = true;
autoStart = true;
};
};
}

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
services.xserver.videoDrivers = [ "nvidia" ];

View file

@ -1,15 +1,10 @@
{ inputs, config, options, lib, pkgs, ... }:
{ config, lib, ... }:
let
inherit (builtins) pathExists toString;
inherit (lib.lists) findFirst;
inherit (lib.modules) mkAliasDefinitions;
inherit (lib.types) attrs;
inherit (lib.my) mkOpt;
in
{
options = let
inherit (lib.types) attrs path;
inherit (lib.my) mkOpt;
in
{
options = {
user = mkOpt attrs {};
};

View file

@ -1,4 +1,4 @@
{ config, options, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf;

View file

@ -1,15 +1,12 @@
{ config, options, lib, pkgs, ... }:
{ config, lib, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.system.bluetooth;
in
{
options.modules.system.bluetooth = let
inherit (lib.options) mkEnableOption;
in
{
options.modules.system.bluetooth = {
enable = mkEnableOption "enable bluetooth";
};