Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Drop tuxedo-keyboard package as it moved into nixpkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
blitz committed Aug 31, 2021
1 parent 37521a4 commit 5ba74ed
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 72 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
with:
name: blitz
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
pushFilter: '(-source$|nixpkgs\.tar\.gz$)'
pushFilter: '(-source$|nixpkgs\.tar\.gz$|nixexprs\.tar\.xz$)'
- run: nix-shell --run "echo OK"
- run: nix-build --arg nixpkgs "<nixpkgs>" ./nix/ci.nix -A tuxedo-control-center
- run: nix-build --arg nixpkgs "<nixpkgs>" ./nix/ci.nix -A tuxedo-keyboard

test:
needs: build
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ in {
tuxedo.module
];
nixpkgs.overlays = [
tuxedo.overlay
];
hardware.tuxedo.enable = true;
}
```
1 change: 0 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
module = import ./nix/module.nix;
overlay = import ./nix/overlay.nix;
}
9 changes: 2 additions & 7 deletions nix/ci.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{ nixpkgs ? (import ./sources.nix).nixpkgs }:
let
this = import ../.;

pkgs = import nixpkgs {
overlays = [
this.overlay
];
};
pkgs = import nixpkgs {};

in {
inherit (pkgs) tuxedo-control-center tuxedo-keyboard;
tuxedo-control-center = pkgs.callPackage ./tuxedo-control-center {};

test = pkgs.nixosTest ({ lib, pkgs, ... }: {
name = "tuxedo-control-center-test";
Expand Down
39 changes: 18 additions & 21 deletions nix/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ with lib;

let
cfg = config.hardware.tuxedo-control-center;

tuxedo-control-center = pkgs.callPackage ./tuxedo-control-center {};
in
{
options.hardware.tuxedo-control-center = {
Expand All @@ -15,45 +17,40 @@ in
will get the default configuration until you change it in the
Tuxedo Control Center.
'';

package = mkOption {
type = types.package;
default = tuxedo-control-center;
defaultText = "pkgs.tuxedo-control-center";
description = ''
Which package to use for tuxedo-control-center.
'';
};
};

config = mkIf cfg.enable {
assertions = [
{
assertion = !config.hardware.tuxedo-keyboard.enable;
message = "hardware.tuxedo-control-center is not compatible with tuxedo-keyboard as long as we use our own version of the tuxedo-keyboard module.";
}
];

boot.extraModulePackages = [
(pkgs.tuxedo-keyboard.override {
kernel = config.boot.kernelPackages.kernel;
})
];
hardware.tuxedo-keyboard.enable = true;
boot.kernelModules = [ "tuxedo_io" ];

environment.systemPackages = [
pkgs.tuxedo-control-center
];

services.dbus.packages = [ pkgs.tuxedo-control-center ];
environment.systemPackages = [ cfg.package ];
services.dbus.packages = [ cfg.package ];

systemd.services.tccd = {
path = [ pkgs.tuxedo-control-center ];
path = [ cfg.package ];

description = "Tuxedo Control Center Service";

wantedBy = [ "multi-user.target" ];

serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.tuxedo-control-center}/bin/tccd --start";
ExecStop = "${pkgs.tuxedo-control-center}/bin/tccd --stop";
ExecStart = "${cfg.package}/bin/tccd --start";
ExecStop = "${cfg.package}/bin/tccd --stop";
};
};

systemd.services.tccd-sleep = {
path = [ pkgs.tuxedo-control-center ];
path = [ cfg.package ];

description = "Tuxedo Control Center Service (sleep/resume)";

Expand Down
3 changes: 0 additions & 3 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
final: prev: {
tuxedo-control-center = final.callPackage ./tuxedo-control-center {};
tuxedo-keyboard = final.callPackage ./tuxedo-keyboard {
kernel = final.linux;
};
}
34 changes: 0 additions & 34 deletions nix/tuxedo-keyboard/default.nix

This file was deleted.

0 comments on commit 5ba74ed

Please sign in to comment.