From 2305b6903f844f80e3f8823d5d82756b92e60f2d Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 3 Oct 2023 17:09:12 -0500 Subject: [PATCH] WIP melee mode --- flake.lock | 107 +++++++++++++++++++++++++++++++++++++- flake.nix | 17 +++--- home/linux.nix | 15 +++--- modules/nixos/default.nix | 1 + modules/nixos/melee.nix | 29 +++++++++++ nixos/dragon/default.nix | 1 + 6 files changed, 153 insertions(+), 17 deletions(-) create mode 100644 modules/nixos/melee.nix diff --git a/flake.lock b/flake.lock index d9a0cf7..6a9407a 100644 --- a/flake.lock +++ b/flake.lock @@ -239,6 +239,40 @@ "type": "github" } }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1598695561, + "narHash": "sha256-gyH/5j+h/nWw0W8AcR2WKvNBUsiQ7QuxqSJNXAwV+8E=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "1705b4a26fbf065d9574dce47a94e8c7c79e052f", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "repo": "lowdown", + "type": "github" + } + }, + "nix": { + "inputs": { + "lowdown-src": "lowdown-src", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1609520816, + "narHash": "sha256-IGO7tfJXsv9u2wpW76VCzOsHYapRZqH9pHGVsoffPrI=", + "owner": "NixOS", + "repo": "nix", + "rev": "8a2ce0f455da32bc20978e68c0aad9efb4560abc", + "type": "github" + }, + "original": { + "id": "nix", + "type": "indirect" + } + }, "nix-colors": { "inputs": { "base16-schemes": "base16-schemes", @@ -417,6 +451,37 @@ "type": "github" } }, + "nixpkgs_7": { + "locked": { + "lastModified": 1602702596, + "narHash": "sha256-fqJ4UgOb4ZUnCDIapDb4gCrtAah5Rnr2/At3IzMitig=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ad0d20345219790533ebe06571f82ed6b034db31", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-20.09-small", + "type": "indirect" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1692447944, + "narHash": "sha256-fkJGNjEmTPvqBs215EQU4r9ivecV5Qge5cF/QDLVn3U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d680ded26da5cf104dd2735a51e88d2d8f487b4d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "api-lyte-dev": "api-lyte-dev", @@ -428,7 +493,9 @@ "nix-colors": "nix-colors", "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable": "nixpkgs-unstable", - "sops-nix": "sops-nix" + "slippi-desktop": "slippi-desktop", + "sops-nix": "sops-nix", + "ssbm": "ssbm" } }, "rust-overlay": { @@ -456,6 +523,22 @@ "type": "github" } }, + "slippi-desktop": { + "flake": false, + "locked": { + "lastModified": 1696044044, + "narHash": "sha256-LdQHjYIQ/5FyTBq1hY2pFB8zrUF4Z26JvwTAXT0GH9w=", + "owner": "project-slippi", + "repo": "slippi-desktop-app", + "rev": "f3d4cc0993af6bde9b0809079871fa7b4fdc7fcd", + "type": "github" + }, + "original": { + "owner": "project-slippi", + "repo": "slippi-desktop-app", + "type": "github" + } + }, "sops-nix": { "inputs": { "nixpkgs": "nixpkgs_6", @@ -475,6 +558,28 @@ "type": "github" } }, + "ssbm": { + "inputs": { + "nix": "nix", + "nixpkgs": "nixpkgs_8", + "slippi-desktop": [ + "slippi-desktop" + ] + }, + "locked": { + "lastModified": 1692992594, + "narHash": "sha256-FpX1bOgMKgOBPHpWLtWmnaN7Tk50i6EKlPi/Xe2O3qM=", + "owner": "djanatyn", + "repo": "ssbm-nix", + "rev": "87f2565474ab7e75ed6eee0fdce52162a4b7ed0c", + "type": "github" + }, + "original": { + "owner": "djanatyn", + "repo": "ssbm-nix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 1acd1ae..dbbf31a 100644 --- a/flake.nix +++ b/flake.nix @@ -2,23 +2,22 @@ inputs = { nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager/master"; - - # TODO: avoid my manual workaround of `nix profile install helix#helix --priority 4` helix.url = "github:helix-editor/helix/75c0a5ceb32d8a503915a93ccc1b64c8ad1cba8b"; - disko.url = "github:nix-community/disko/master"; sops-nix.url = "github:Mic92/sops-nix"; + hardware.url = "github:nixos/nixos-hardware"; + hyprland.url = "github:hyprwm/Hyprland"; + nix-colors.url = "github:misterio77/nix-colors"; + ssbm.url = "github:djanatyn/ssbm-nix"; # TODO: do I really need this in the root of my flake if _only_ beefcake uses it? api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git"; - hardware.url = "github:nixos/nixos-hardware"; - - hyprland.url = "github:hyprwm/Hyprland"; - - nix-colors.url = "github:misterio77/nix-colors"; + # track slippi-desktop version in my own flake instead of waiting for the upstream repo to update + slippi-desktop.url = "github:project-slippi/slippi-desktop-app"; + slippi-desktop.flake = false; + ssbm.inputs.slippi-desktop.follows = "slippi-desktop"; }; outputs = { diff --git a/home/linux.nix b/home/linux.nix index f44f3db..8b319ed 100644 --- a/home/linux.nix +++ b/home/linux.nix @@ -11,7 +11,7 @@ }; services = { - mako = { + mako = with config.colorScheme.colors; { enable = true; borderSize = 1; maxVisible = 5; @@ -19,14 +19,15 @@ font = "Symbols Nerd Font 12,IosevkaLyteTerm 12"; # TODO: config - backgroundColor = "#1e1e2e"; - textColor = "#cdd6f4"; - borderColor = "#89b4fa"; - progressColor = "#313244"; + backgroundColor = base01; + textColor = base05; + borderColor = base0C; + progressColor = base0A; extraConfig = '' [urgency=high] - border-color=#fab387 + border-color=#${base0F} + background-color=#${base03} ''; }; @@ -107,7 +108,7 @@ # TODO: popup_during_fullscreen smart focus = { - wrapping = "yes"; + wrapping = "no"; followMouse = "no"; mouseWarping = false; }; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index ea528a5..392e8e4 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -3,6 +3,7 @@ { common = import ./common.nix; amd = import ./amd.nix; + melee = import ./melee.nix; desktop-usage = import ./desktop-usage.nix; intel = import ./intel.nix; pipewire = import ./pipewire.nix; diff --git a/modules/nixos/melee.nix b/modules/nixos/melee.nix new file mode 100644 index 0000000..5664236 --- /dev/null +++ b/modules/nixos/melee.nix @@ -0,0 +1,29 @@ +{ + # flake, + inputs, + # outputs, + # lib, + # config, + # pkgs, + system, + # modulesPath, + ... +}: { + imports = [inputs.ssbm.nixosModule]; + + environment = { + systemPackages = with inputs.ssbm.packages.${system}; [ + slippi-netplay + slippi-playback + ]; + }; + + ssbm = { + cache.enable = true; + + gcc = { + rules.enable = true; + oc-kmod.enable = true; + }; + }; +} diff --git a/nixos/dragon/default.nix b/nixos/dragon/default.nix index 8b4275c..531acee 100644 --- a/nixos/dragon/default.nix +++ b/nixos/dragon/default.nix @@ -18,6 +18,7 @@ ] ++ (with outputs.nixosModules; [ # If you want to use modules your own flake exports (from modules/nixos): + melee amd desktop-usage podman