Merge branch 'main' of github.com:ooks-io/nix
This commit is contained in:
commit
b0f0488a6e
11 changed files with 86 additions and 25 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.homeModules.desktop.media.video.mpv;
|
cfg = config.homeModules.desktop.media.video.mpv;
|
||||||
|
|
@ -8,5 +8,6 @@ in
|
||||||
programs.mpv = lib.mkIf cfg.enable {
|
programs.mpv = lib.mkIf cfg.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
home.packages = [ pkgs.ffmpeg ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.homeModules.desktop.utility.gammastep;
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.gammastep = lib.mkif config.programs.desktop.windowManager.hyprland.enable {
|
|
||||||
enable = true;
|
|
||||||
provider = "geoclue2";
|
|
||||||
temperature = {
|
|
||||||
day = 6000;
|
|
||||||
night = 4600;
|
|
||||||
};
|
|
||||||
settings = {
|
|
||||||
general.adjustment-method = "wayland";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib, config, pkgs, inputs, ... }:
|
{ lib, config, pkgs, inputs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||||
inherit (import ./pkgs {inherit pkgs;}) hyprbrightness hyprvolume hyprkillsession;
|
inherit (import ./pkgs {inherit pkgs;}) hyprrecord hyprbrightness hyprvolume hyprkillsession;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -22,6 +22,7 @@ in
|
||||||
hyprvolume
|
hyprvolume
|
||||||
hyprkillsession
|
hyprkillsession
|
||||||
hyprbrightness
|
hyprbrightness
|
||||||
|
hyprrecord
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ let
|
||||||
packages = {
|
packages = {
|
||||||
hyprvolume = pkgs.callPackage ./hyprvolume.nix {};
|
hyprvolume = pkgs.callPackage ./hyprvolume.nix {};
|
||||||
hyprbrightness = pkgs.callPackage ./hyprbrightness.nix {};
|
hyprbrightness = pkgs.callPackage ./hyprbrightness.nix {};
|
||||||
|
hyprrecord = pkgs.callPackage ./hyprrecord {};
|
||||||
# Script to help Hyprland quit https://github.com/hyprwm/Hyprland/issues/3558#issuecomment-1848768654
|
# Script to help Hyprland quit https://github.com/hyprwm/Hyprland/issues/3558#issuecomment-1848768654
|
||||||
hyprkillsession = pkgs.callPackage ./hyprkillsession.nix {};
|
hyprkillsession = pkgs.callPackage ./hyprkillsession.nix {};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
|
||||||
|
pkgs.writeShellScriptBin "hyprrecord" ''
|
||||||
|
${builtins.readFile ./hyprrecord.sh}
|
||||||
|
''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
getTargetDirectory() {
|
||||||
|
test -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" &&
|
||||||
|
. "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs"
|
||||||
|
echo "${XDG_RECORDINGS_DIR:-${XDG_VIDEOS_DIR:-$HOME}}"
|
||||||
|
}
|
||||||
|
|
||||||
|
SINK="$(pactl get-default-sink).monitor"
|
||||||
|
AUDIO=""
|
||||||
|
FILE="--file=$(getTargetDirectory)/$(date -Ins).mp4"
|
||||||
|
SET_REGION=false
|
||||||
|
|
||||||
|
while [[ "$#" -gt 0 ]]; do
|
||||||
|
case $1 in
|
||||||
|
-a | --audio)
|
||||||
|
AUDIO="--audio=$SINK"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-r | --region)
|
||||||
|
SET_REGION=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown parameter passed: $1"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
notify() {
|
||||||
|
notify-send -t 5000 -a system-notify "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
takeRecording() {
|
||||||
|
if pgrep -x "wf-recorder" >/dev/null; then
|
||||||
|
pkill -x "wf-recorder"
|
||||||
|
notify "Recording Stopped"
|
||||||
|
else
|
||||||
|
# Only invoke slurp if starting a new recording and the region option was set
|
||||||
|
if [ "$SET_REGION" = true ]; then
|
||||||
|
REGION="--geometry=$(slurp)"
|
||||||
|
fi
|
||||||
|
wf-recorder "$AUDIO" "$REGION" "$FILE"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $(takeRecording)
|
||||||
|
|
@ -42,6 +42,9 @@ in
|
||||||
|
|
||||||
", Print, exec, grimblast --notify --cursor copysave area"
|
", Print, exec, grimblast --notify --cursor copysave area"
|
||||||
"SUPER, Print, exec, grimblast --notify --cursor copysave screen"
|
"SUPER, Print, exec, grimblast --notify --cursor copysave screen"
|
||||||
|
"SUPER, r, exec, hyprrecord -a"
|
||||||
|
"SUPER CTRL, r, exec, hyprrecord -a -r"
|
||||||
|
|
||||||
|
|
||||||
# Brightness
|
# Brightness
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./systemd ];
|
imports = [ ./systemd ./plymouth ];
|
||||||
|
|
||||||
options.systemModules = {
|
options.systemModules = {
|
||||||
bootloader = {
|
bootloader = {
|
||||||
|
|
@ -9,5 +9,8 @@
|
||||||
enable = lib.mkEnableOption "Enable systemd bootloader module";
|
enable = lib.mkEnableOption "Enable systemd bootloader module";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
plymouth = {
|
||||||
|
enable = lib.mkEnableOption "Enable plymouth bootscreen";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
15
system/modules/bootloader/plymouth/default.nix
Normal file
15
system/modules/bootloader/plymouth/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.systemModules.plymouth;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
boot.plymouth = {
|
||||||
|
enable = true;
|
||||||
|
themePackages = [(pkgs.catppuccin-plymouth.override {variant = "mocha";})];
|
||||||
|
theme = "catppuccin-mocha";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue