flake: reorg outputs (#132)
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / adjustor-build (push) Waiting to run
nix-build / clean-install-build (push) Waiting to run
nix-build / hd-ui-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / pacifidlog-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-build / slateport-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run

* overlays: init with tablet overlays

* flake: add overlays.tablet

* overlays.tablet: document

* pacifidlog: migrate to overlays.tablet

* pacvifidlog: cleanup

* overlays: add rofi-bluetooth

* flake: output adjustor and hhd-ui

* flake: reorg packages and overlays

* flake.devShells.default: add nix-update

* github: add adjustor and hhd-ui to ci

* githuib: test builds

* github: undo test change

* pkgs: update descriptions

* pkgs: reformat
This commit is contained in:
Aly Raffauf 2024-10-19 14:43:33 -04:00 committed by GitHub
parent d52929052e
commit 97db653259
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 123 additions and 89 deletions

View file

@ -7,7 +7,22 @@ on:
- '_img/**' - '_img/**'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
default-build: adjustor-build:
if: contains(github.event.head_commit.message, 'pkgs/') || contains(github.event.head_commit.message, 'flake.nix') || contains(github.event.head_commit.message, 'flake.lock')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 1
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: cachix/cachix-action@master
with:
name: alyraffauf
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build default package
run: nix build --accept-flake-config .#packages.x86_64-linux.adjustor
clean-install-build:
if: contains(github.event.head_commit.message, 'flake/') || contains(github.event.head_commit.message, 'flake.nix') || contains(github.event.head_commit.message, 'flake.lock') if: contains(github.event.head_commit.message, 'flake/') || contains(github.event.head_commit.message, 'flake.nix') || contains(github.event.head_commit.message, 'flake.lock')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -21,7 +36,22 @@ jobs:
name: alyraffauf name: alyraffauf
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build default package - name: Build default package
run: nix build --accept-flake-config .#packages.x86_64-linux.default run: nix build --accept-flake-config .#packages.x86_64-linux.clean-install
hd-ui-build:
if: contains(github.event.head_commit.message, 'pkgs/') || contains(github.event.head_commit.message, 'flake.nix') || contains(github.event.head_commit.message, 'flake.lock')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 1
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: cachix/cachix-action@master
with:
name: alyraffauf
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build default package
run: nix build --accept-flake-config .#packages.x86_64-linux.hhd-ui
fallarbor-build: fallarbor-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View file

@ -1,4 +1,4 @@
{ {self, ...}: {
nix = { nix = {
gc = { gc = {
automatic = true; automatic = true;
@ -38,4 +38,13 @@
trusted-users = ["aly"]; trusted-users = ["aly"];
}; };
}; };
nixpkgs = {
config.allowUnfree = true; # Allow unfree packages
overlays = [
self.overlays.default
self.overlays.rofi-bluetooth
];
};
} }

View file

@ -1,22 +0,0 @@
{pkgs, ...}: {
nixpkgs = {
config.allowUnfree = true; # Allow unfree packages
overlays = [
(final: prev: {
rofi-bluetooth =
prev.rofi-bluetooth.overrideAttrs
(old: {
version = "unstable-2024-07-25";
src = pkgs.fetchFromGitHub {
owner = "alyraffauf";
repo = old.pname;
rev = "50252e4a9aebe4899a6ef2f7bc11d91b7e4aa8ae";
sha256 = "sha256-o0Sr3/888L/2KzZZP/EcXx+8ZUzdHB/I/VIeVuJvJks=";
};
});
})
];
};
}

View file

@ -112,6 +112,7 @@
git git
mdformat mdformat
nh nh
nix-update
ruby ruby
sbctl sbctl
]) ])
@ -129,13 +130,6 @@
formatter = forAllSystems ({pkgs}: pkgs.alejandra); formatter = forAllSystems ({pkgs}: pkgs.alejandra);
packages = forAllLinuxSystems ({pkgs}: {
default = pkgs.writeShellApplication {
name = "clean-install";
text = ./flake/clean-install.sh;
};
});
homeManagerModules = { homeManagerModules = {
default = import ./homeManagerModules self; default = import ./homeManagerModules self;
aly = import ./homes/aly self; aly = import ./homes/aly self;
@ -148,7 +142,6 @@
common-locale = import ./common/locale.nix; common-locale = import ./common/locale.nix;
common-mauville-share = import ./common/samba.nix; common-mauville-share = import ./common/samba.nix;
common-nix = import ./common/nix.nix; common-nix = import ./common/nix.nix;
common-overlays = import ./common/overlays.nix;
common-pkgs = import ./common/pkgs.nix; common-pkgs = import ./common/pkgs.nix;
common-tailscale = import ./common/tailscale.nix; common-tailscale = import ./common/tailscale.nix;
common-wifi-profiles = import ./common/wifi.nix; common-wifi-profiles = import ./common/wifi.nix;
@ -194,5 +187,24 @@
]; ];
} }
); );
overlays = {
rofi-bluetooth = import ./overlays/rofi-bluetooth.nix;
tablet = import ./overlays/tablet.nix;
default = import ./overlays/default.nix {inherit self;};
};
packages = forAllLinuxSystems ({pkgs}: rec {
default = clean-install;
adjustor = pkgs.callPackage ./pkgs/adjustor.nix {};
clean-install = pkgs.writeShellApplication {
name = "clean-install";
text = ./flake/clean-install.sh;
};
hhd-ui = pkgs.callPackage ./pkgs/hhd-ui.nix {};
});
}; };
} }

View file

@ -14,7 +14,6 @@
self.nixosModules.common-locale self.nixosModules.common-locale
self.nixosModules.common-mauville-share self.nixosModules.common-mauville-share
self.nixosModules.common-nix self.nixosModules.common-nix
self.nixosModules.common-overlays
self.nixosModules.common-pkgs self.nixosModules.common-pkgs
self.nixosModules.common-wifi-profiles self.nixosModules.common-wifi-profiles
self.nixosModules.hw-framework-13-intel-11th self.nixosModules.hw-framework-13-intel-11th

View file

@ -16,7 +16,6 @@
self.nixosModules.common-locale self.nixosModules.common-locale
self.nixosModules.common-mauville-share self.nixosModules.common-mauville-share
self.nixosModules.common-nix self.nixosModules.common-nix
self.nixosModules.common-overlays
self.nixosModules.common-pkgs self.nixosModules.common-pkgs
self.nixosModules.common-tailscale self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles self.nixosModules.common-wifi-profiles

View file

@ -18,7 +18,6 @@ in {
self.nixosModules.common-base self.nixosModules.common-base
self.nixosModules.common-locale self.nixosModules.common-locale
self.nixosModules.common-nix self.nixosModules.common-nix
self.nixosModules.common-overlays
self.nixosModules.common-pkgs self.nixosModules.common-pkgs
self.nixosModules.common-tailscale self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles self.nixosModules.common-wifi-profiles

View file

@ -5,10 +5,7 @@
lib, lib,
self, self,
... ...
}: let }: {
adjustor = pkgs.callPackage ./../../pkgs/adjustor.nix {};
hhd-ui = pkgs.callPackage ./../../pkgs/hhd-ui.nix {};
in {
imports = [ imports = [
./home.nix ./home.nix
./secrets.nix ./secrets.nix
@ -21,7 +18,6 @@ in {
self.nixosModules.common-locale self.nixosModules.common-locale
self.nixosModules.common-mauville-share self.nixosModules.common-mauville-share
self.nixosModules.common-nix self.nixosModules.common-nix
self.nixosModules.common-overlays
self.nixosModules.common-pkgs self.nixosModules.common-pkgs
self.nixosModules.common-tailscale self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles self.nixosModules.common-wifi-profiles
@ -47,10 +43,10 @@ in {
}; };
environment = { environment = {
systemPackages = [ systemPackages = with pkgs; [
heroic
hhd-ui hhd-ui
pkgs.heroic lutris
pkgs.lutris
]; ];
variables.GDK_SCALE = "2"; variables.GDK_SCALE = "2";
@ -68,13 +64,9 @@ in {
steam = { steam = {
enable = true; enable = true;
environment = {
STEAM_GAMESCOPE_COLOR_MANAGED = "0";
};
autoStart = true; autoStart = true;
desktopSession = "hyprland"; desktopSession = "hyprland";
environment.STEAM_GAMESCOPE_COLOR_MANAGED = "0";
user = "aly"; user = "aly";
}; };
@ -82,44 +74,21 @@ in {
}; };
networking.hostName = "pacifidlog"; networking.hostName = "pacifidlog";
nixpkgs.overlays = [self.overlays.tablet];
nixpkgs.overlays = [
(final: prev: {
brave = prev.brave.override {commandLineArgs = "--gtk-version=4 --enable-wayland-ime";};
obsidian = prev.obsidian.overrideAttrs (old: {
installPhase =
builtins.replaceStrings ["--ozone-platform=wayland"]
["--ozone-platform=wayland --enable-wayland-ime"]
old.installPhase;
});
vscodium = prev.vscodium.override {commandLineArgs = "--enable-wayland-ime";};
webcord = prev.webcord.overrideAttrs (old: {
installPhase =
builtins.replaceStrings ["--ozone-platform-hint=auto"]
["--ozone-platform-hint=auto --enable-wayland-ime"]
old.installPhase;
});
})
];
programs.steam.platformOptimizations.enable = true; programs.steam.platformOptimizations.enable = true;
services = { services = {
handheld-daemon = { handheld-daemon = {
enable = true; enable = true;
user = "aly";
package = with pkgs; package = with pkgs;
handheld-daemon.overrideAttrs (oldAttrs: { handheld-daemon.overrideAttrs (oldAttrs: {
propagatedBuildInputs = propagatedBuildInputs =
oldAttrs.propagatedBuildInputs oldAttrs.propagatedBuildInputs
++ [ ++ [pkgs.adjustor];
adjustor
];
}); });
user = "aly";
}; };
pipewire.lowLatency = { pipewire.lowLatency = {
@ -130,7 +99,7 @@ in {
}; };
system.stateVersion = "24.11"; system.stateVersion = "24.11";
systemd.services.handheld-daemon.path = [hhd-ui pkgs.lsof]; systemd.services.handheld-daemon.path = with pkgs; [hhd-ui lsof];
zramSwap.memoryPercent = 100; zramSwap.memoryPercent = 100;
ar = { ar = {

View file

@ -15,7 +15,6 @@
self.nixosModules.common-locale self.nixosModules.common-locale
self.nixosModules.common-mauville-share self.nixosModules.common-mauville-share
self.nixosModules.common-nix self.nixosModules.common-nix
self.nixosModules.common-overlays
self.nixosModules.common-pkgs self.nixosModules.common-pkgs
self.nixosModules.common-tailscale self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles self.nixosModules.common-wifi-profiles

View file

@ -13,7 +13,6 @@
self.nixosModules.common-locale self.nixosModules.common-locale
self.nixosModules.common-mauville-share self.nixosModules.common-mauville-share
self.nixosModules.common-nix self.nixosModules.common-nix
self.nixosModules.common-overlays
self.nixosModules.common-pkgs self.nixosModules.common-pkgs
self.nixosModules.common-tailscale self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles self.nixosModules.common-wifi-profiles

5
overlays/default.nix Normal file
View file

@ -0,0 +1,5 @@
# Default overlay.
{self}: final: prev: {
adjustor = self.packages.${prev.system}.adjustor;
hhd-ui = self.packages.${prev.system}.hhd-ui;
}

View file

@ -0,0 +1,15 @@
# My personal fork of rofi-bluetooth.
final: prev: {
rofi-bluetooth =
prev.rofi-bluetooth.overrideAttrs
(old: {
version = "unstable-2024-07-25";
src = prev.fetchFromGitHub {
owner = "alyraffauf";
repo = old.pname;
rev = "50252e4a9aebe4899a6ef2f7bc11d91b7e4aa8ae";
sha256 = "sha256-o0Sr3/888L/2KzZZP/EcXx+8ZUzdHB/I/VIeVuJvJks=";
};
});
}

20
overlays/tablet.nix Normal file
View file

@ -0,0 +1,20 @@
# Text input fixes for electron apps.
final: prev: {
brave = prev.brave.override {commandLineArgs = "--gtk-version=4 --enable-wayland-ime";};
obsidian = prev.obsidian.overrideAttrs (old: {
installPhase =
builtins.replaceStrings ["--ozone-platform=wayland"]
["--ozone-platform=wayland --enable-wayland-ime"]
old.installPhase;
});
vscodium = prev.vscodium.override {commandLineArgs = "--enable-wayland-ime";};
webcord = prev.webcord.overrideAttrs (old: {
installPhase =
builtins.replaceStrings ["--ozone-platform-hint=auto"]
["--ozone-platform-hint=auto --enable-wayland-ime"]
old.installPhase;
});
}

View file

@ -9,28 +9,28 @@ python3.pkgs.buildPythonApplication rec {
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
hash = "sha256-9ONWKI68Llh36giIS6nVKNrZYmNAGMfwW2vgPMFuwXM=";
owner = "hhd-dev"; owner = "hhd-dev";
repo = "adjustor"; repo = "adjustor";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-9ONWKI68Llh36giIS6nVKNrZYmNAGMfwW2vgPMFuwXM=";
}; };
propagatedBuildInputs = with python3.pkgs; [ propagatedBuildInputs = with python3.pkgs; [
setuptools dbus-python
rich
pyroute2
fuse fuse
pygobject3 pygobject3
dbus-python pyroute2
rich
setuptools
]; ];
# This package doesn't have upstream tests. # This package doesn't have upstream tests.
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {
description = "TDP control of AMD Handhelds with handheld-daemon.";
homepage = "https://github.com/hhd-dev/adjustor/"; homepage = "https://github.com/hhd-dev/adjustor/";
description = "Allows for TDP control of AMD Handhelds under handheld-daemon support";
platforms = platforms.linux;
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux;
}; };
} }

View file

@ -6,16 +6,17 @@
appimageTools.wrapType2 rec { appimageTools.wrapType2 rec {
pname = "hhd-ui"; pname = "hhd-ui";
version = "3.2.2"; version = "3.2.2";
src = fetchurl { src = fetchurl {
url = "https://github.com/hhd-dev/hhd-ui/releases/download/v${version}/${pname}.AppImage";
hash = "sha256-AFFQBhvWUimNW+LZvIf7bTyOX5GEc60kFSUwpsKqG5A="; hash = "sha256-AFFQBhvWUimNW+LZvIf7bTyOX5GEc60kFSUwpsKqG5A=";
url = "https://github.com/hhd-dev/hhd-ui/releases/download/v${version}/${pname}.AppImage";
}; };
meta = with lib; { meta = with lib; {
description = "Graphical user interface for Handheld Daemon settings from Steam Big Picture Mode, the Desktop, and the Web.";
homepage = "https://github.com/hhd-dev/hhd-ui/"; homepage = "https://github.com/hhd-dev/hhd-ui/";
description = "A UI app that can manage Handheld Daemon settings from Steam, the Desktop, and the Web.";
platforms = platforms.linux;
license = licenses.mit; license = licenses.mit;
mainProgram = "hhd-ui"; mainProgram = "hhd-ui";
platforms = platforms.linux;
}; };
} }