mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 10:04:09 -05:00
add openrgb module, couple improvements
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
hardware.nixosModules.common-cpu-amd
|
||||
hardware.nixosModules.common-gpu-amd
|
||||
hardware.nixosModules.common-pc-ssd
|
||||
impermanence.nixosModules.impermanence
|
||||
./hardware-configuration.nix
|
||||
../../modules/openrgb.nix
|
||||
../../overlays
|
||||
];
|
||||
|
||||
@@ -64,7 +65,7 @@
|
||||
"vm.max_map_count" = 16777216;
|
||||
"abi.vsyscall32" = 0;
|
||||
};
|
||||
kernelModules = [ "v4l2loopback" ];
|
||||
kernelModules = [ "v4l2loopback" "i2c-dev" "i2c-piix4" ];
|
||||
extraModprobeConfig = ''
|
||||
options v4l2loopback exclusive_caps=1 video_nr=9 card_label=a7III
|
||||
'';
|
||||
@@ -150,6 +151,7 @@
|
||||
|
||||
hardware = {
|
||||
ckb-next.enable = true;
|
||||
openrgb.enable = true;
|
||||
steam-hardware.enable = true;
|
||||
opengl.enable = true;
|
||||
pulseaudio = {
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.hardware.openrgb;
|
||||
|
||||
in {
|
||||
options.hardware.openrgb = {
|
||||
enable = mkEnableOption "OpenRGB";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.openrgb;
|
||||
defaultText = "pkgs.openrgb";
|
||||
description = ''
|
||||
The package implementing OpenRGB.
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
services.udev.packages = [ cfg.package ];
|
||||
|
||||
systemd.services.openrgb = {
|
||||
description = "OpenRGB Daemon";
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package}/bin/openrgb --server";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -109,6 +109,7 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
xdg.configFile."rgbdaemon.conf" = {
|
||||
text = ''
|
||||
OPENRGB_BIN=${pkgs.openrgb}/bin/openrgb
|
||||
PASTEL_BIN=${pkgs.pastel}/bin/pastel
|
||||
PACTL_BIN=${pkgs.pulseaudio}/bin/pactl
|
||||
PLAYERCTL_BIN=${pkgs.playerctl}/bin/playerctl
|
||||
|
||||
+15
-4
@@ -2,7 +2,6 @@
|
||||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
|
||||
(final: prev: {
|
||||
preferredplayer = let playerctl = "${prev.playerctl}/bin/playerctl";
|
||||
in prev.writeShellScriptBin "preferredplayer" ''
|
||||
@@ -184,13 +183,13 @@
|
||||
(final: prev: {
|
||||
rgbdaemon = prev.stdenv.mkDerivation {
|
||||
name = "rgbdaemon";
|
||||
version = "0.1";
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "Misterio77";
|
||||
repo = "rgbdaemon";
|
||||
rev = "fe06bd5f8bbcf9cf9015d9663a44329548938eef";
|
||||
sha256 = "sha256-05uc4fpYf1svuukDjSplPaI7vgTZO06RNWSPr7NvCX4=";
|
||||
rev = "a7bf098a6dea1d280158627b887a0349fb9ad9c9";
|
||||
sha256 = "sha256-tH6ykZ9nO2GkSyxtJOdeekL887CsGmqJR9cYM7iR/eQ=";
|
||||
};
|
||||
propagatedBuildInputs = with prev; [ pastel makeWrapper ];
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
installPhase = ''
|
||||
@@ -225,5 +224,17 @@
|
||||
'';
|
||||
});
|
||||
})
|
||||
(final: prev: {
|
||||
openrgb = prev.openrgb.overrideAttrs (oldAttrs: rec {
|
||||
buildInputs = (oldAttrs.buildInputs or [ ]) ++ [ prev.mbedtls ];
|
||||
version = "master";
|
||||
src = prev.fetchFromGitLab {
|
||||
owner = "CalcProgrammer1";
|
||||
repo = "OpenRGB";
|
||||
rev = "e4692cb5625fbc9634742d7043283f8bffa21bce";
|
||||
sha256 = "sha256-+t3TfeqMvmj5T3GpbbCZ5toqJYZpRkvX4/TBN76KwkU=";
|
||||
};
|
||||
});
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# User info
|
||||
users.users.misterio = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "audio" "wheel" "docker" ];
|
||||
extraGroups = [ "audio" "wheel" "docker" "plugdev" ];
|
||||
shell = pkgs.fish;
|
||||
# Grab hashed password from /data
|
||||
passwordFile = "/data/home/misterio/.password";
|
||||
|
||||
@@ -1 +1 @@
|
||||
"rose-pine-moon"
|
||||
"pasque"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
vim = "nvim";
|
||||
m = "neomutt";
|
||||
mutt = "neomutt";
|
||||
wl-root = "xhost si:localuser:root";
|
||||
};
|
||||
shellAliases = {
|
||||
getip = "curl ifconfig.me";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs,... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neomutt = {
|
||||
@@ -14,14 +14,15 @@
|
||||
text_flowed = "yes";
|
||||
reverse_name = "yes";
|
||||
};
|
||||
binds = [
|
||||
{
|
||||
action = "sidebar-toggle-visible";
|
||||
key = "\\\\";
|
||||
map = [ "index" "pager" ];
|
||||
}
|
||||
];
|
||||
macros = [
|
||||
binds = [{
|
||||
action = "sidebar-toggle-visible";
|
||||
key = "\\\\";
|
||||
map = [ "index" "pager" ];
|
||||
}];
|
||||
macros = let
|
||||
qutebrowserpipe =
|
||||
"cat /dev/stdin > /tmp/muttmail.html && ${pkgs.qutebrowser}/bin/qutebrowser /tmp/muttmail.html";
|
||||
in [
|
||||
{
|
||||
action = "<sidebar-next><sidebar-open>";
|
||||
key = "J";
|
||||
@@ -33,10 +34,22 @@
|
||||
map = [ "index" "pager" ];
|
||||
}
|
||||
{
|
||||
action = ":set confirmappend=no\\n<tag-prefix><save-message>+Archive<enter>:set confirmappend=yes\\n";
|
||||
action =
|
||||
":set confirmappend=no\\n<tag-prefix><save-message>+Archive<enter>:set confirmappend=yes\\n";
|
||||
key = "A";
|
||||
map = [ "index" "pager" ];
|
||||
}
|
||||
{
|
||||
action =
|
||||
"<pipe-entry>${qutebrowserpipe}<enter><exit>";
|
||||
key = "V";
|
||||
map = [ "attach" ];
|
||||
}
|
||||
{
|
||||
action = "<view-attachments><search>html<enter><pipe-entry>${qutebrowserpipe}<enter><exit>";
|
||||
key = "V";
|
||||
map = [ "index" "pager" ];
|
||||
}
|
||||
];
|
||||
extraConfig = ''
|
||||
alternates "eu@misterio.me|gabriel.fontes@uget.express|g.fontes@usp.br"
|
||||
@@ -158,9 +171,7 @@
|
||||
programs.mbsync.enable = true;
|
||||
programs.msmtp.enable = true;
|
||||
systemd.user.services.mbsync = {
|
||||
Unit = {
|
||||
Description = "mbsync synchronization";
|
||||
};
|
||||
Unit = { Description = "mbsync synchronization"; };
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecCondition = ''
|
||||
@@ -170,9 +181,7 @@
|
||||
};
|
||||
};
|
||||
systemd.user.timers.mbsync = {
|
||||
Unit = {
|
||||
Description = "Automatic mbsync synchronization";
|
||||
};
|
||||
Unit = { Description = "Automatic mbsync synchronization"; };
|
||||
Timer = {
|
||||
OnBootSec = "30";
|
||||
OnUnitActiveSec = "1m";
|
||||
|
||||
Reference in New Issue
Block a user