From 4f55e2393b2f15ecd8256b6c7f18d1131d31e52e Mon Sep 17 00:00:00 2001 From: caandt Date: Sun, 3 Nov 2024 20:23:34 -0600 Subject: [PATCH] add u2h --- flake.lock | 78 ++++++++++++++++++++++++++ flake.nix | 5 ++ hosts/hyuganatsu/default.nix | 18 ++++-- hosts/hyuganatsu/users/u2h/default.nix | 16 ++++++ 4 files changed, 113 insertions(+), 4 deletions(-) create mode 100644 hosts/hyuganatsu/users/u2h/default.nix diff --git a/flake.lock b/flake.lock index c3ea7ef..21f798a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-programs-sqlite": { "inputs": { "nixpkgs": [ @@ -41,6 +59,28 @@ "type": "github" } }, + "nix-gaming": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ], + "umu": "umu" + }, + "locked": { + "lastModified": 1730425644, + "narHash": "sha256-dfxO6mkn1KkotGQXV93m/2MoS9ayLUwaIIbR3mReLd0=", + "owner": "fufexan", + "repo": "nix-gaming", + "rev": "bcc7c896b56ccd644ca2daea74dac05c1731f59d", + "type": "github" + }, + "original": { + "owner": "fufexan", + "repo": "nix-gaming", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1729665710, @@ -57,6 +97,18 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1727825735, + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1729691686, @@ -77,10 +129,36 @@ "inputs": { "flake-programs-sqlite": "flake-programs-sqlite", "home-manager": "home-manager", + "nix-gaming": "nix-gaming", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable" } }, + "umu": { + "inputs": { + "nixpkgs": [ + "nix-gaming", + "nixpkgs" + ] + }, + "locked": { + "dir": "packaging/nix", + "lastModified": 1729978972, + "narHash": "sha256-Zox0iAi4CRPn4rxrhOetFFZ2jcSipe8tGD8nMTgcjhE=", + "ref": "refs/heads/main", + "rev": "72499f349ca81cb2838eced9d7c465b2cf71c4a2", + "revCount": 825, + "submodules": true, + "type": "git", + "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" + }, + "original": { + "dir": "packaging/nix", + "submodules": true, + "type": "git", + "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" + } + }, "utils": { "locked": { "lastModified": 1678901627, diff --git a/flake.nix b/flake.nix index f9a7b79..52a2a7e 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,10 @@ url = "github:wamserma/flake-programs-sqlite"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-gaming = { + url = "github:fufexan/nix-gaming"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { @@ -50,6 +54,7 @@ inherit pkgs; extraSpecialArgs = { inherit pkgs-stable; + inherit (inputs) nix-gaming; }; modules = [(users + "/${user}")]; }; diff --git a/hosts/hyuganatsu/default.nix b/hosts/hyuganatsu/default.nix index 02d9cc4..a466a61 100644 --- a/hosts/hyuganatsu/default.nix +++ b/hosts/hyuganatsu/default.nix @@ -1,4 +1,4 @@ -{...}: { +{pkgs, ...}: { imports = [ ../../system ./hardware-configuration.nix @@ -10,9 +10,19 @@ videoDrivers = ["amdgpu"]; deviceSection = ''Option "TearFree" "true"''; }; - users.users.ahnwuoa = { - isNormalUser = true; - extraGroups = ["wheel" "podman"]; + users.users = { + ahnwuoa = { + isNormalUser = true; + extraGroups = ["wheel" "podman"]; + }; + u2h = { + isNormalUser = true; + }; }; + services.udev.packages = [pkgs.opentabletdriver]; services.xserver.wacom.enable = true; + nix.settings = { + substituters = ["https://nix-gaming.cachix.org"]; + trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="]; + }; } diff --git a/hosts/hyuganatsu/users/u2h/default.nix b/hosts/hyuganatsu/users/u2h/default.nix new file mode 100644 index 0000000..c65d94d --- /dev/null +++ b/hosts/hyuganatsu/users/u2h/default.nix @@ -0,0 +1,16 @@ +{ + config, + pkgs, + nix-gaming, + ... +}: { + imports = [ + ../../../../user + ]; + + home.username = "u2h"; + home.packages = [ + pkgs.opentabletdriver + nix-gaming.packages."x86_64-linux".osu-stable + ]; +}