forked from poz/niksos
move osu to separate module
This commit is contained in:
parent
6c13140697
commit
0f4101fe93
5 changed files with 51 additions and 11 deletions
|
@ -92,13 +92,11 @@
|
|||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
substituters = [
|
||||
"https://nix-gaming.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nixpkgs-wayland.cachix.org"
|
||||
"https://viperml.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||
"viperml.cachix.org-1:qZhKBMTfmcLL+OG6fj/hzsMEedgKvZVFRRAhq7j8Vh8="
|
||||
|
@ -424,6 +422,10 @@
|
|||
};
|
||||
foot.enable = true;
|
||||
mpv.enable = true;
|
||||
osu = {
|
||||
enable = true;
|
||||
enableStable = true;
|
||||
};
|
||||
neovim.enable = true;
|
||||
swaylock.enable = true;
|
||||
waybar.enable = true;
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
packages = let
|
||||
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
|
||||
shadower = inputs.shadower.packages.${pkgs.system};
|
||||
nix-gaming = inputs.nix-gaming.packages.${pkgs.system};
|
||||
fenix = inputs.fenix.packages.${pkgs.system};
|
||||
nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system};
|
||||
agenix = inputs.agenix.packages.${pkgs.system};
|
||||
|
@ -92,12 +91,6 @@
|
|||
pamixer
|
||||
brightnessctl
|
||||
dig
|
||||
(nix-gaming.osu-stable.override {
|
||||
preCommands = ''
|
||||
export DRI_PRIME=1
|
||||
'';
|
||||
})
|
||||
nix-gaming.osu-lazer-bin
|
||||
swappy
|
||||
nixpkgs-wayland.imv
|
||||
pcmanfm
|
||||
|
|
|
@ -11,6 +11,7 @@ _: {
|
|||
./gtklock.nix
|
||||
./hyprland.nix
|
||||
./mpv.nix
|
||||
./osu.nix
|
||||
./qt.nix
|
||||
#./rofi.nix
|
||||
#./schizofox.nix
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.programs.hyprland;
|
||||
osuCfg = config.myOptions.programs.osu;
|
||||
|
||||
inherit (inputs.nixpkgs-wayland.packages.${pkgs.system}) foot wl-clipboard swww wlsunset swaylock;
|
||||
inherit (inputs.anyrun.packages.${pkgs.system}) anyrun;
|
||||
|
@ -220,8 +221,12 @@ in {
|
|||
"center, class: ^(code), title: ^(Open*)"
|
||||
"float, class:^(org.keepassxc.KeePassXC)$"
|
||||
"size 960 670, title:^(ROG Control Center)$"
|
||||
]
|
||||
++ optional cfg.tearing "immediate, title:^(osu!)$";
|
||||
|
||||
(mkIf (cfg.tearing && osuCfg.enable)
|
||||
"immediate, class:^(osu!)$")
|
||||
(mkIf (cfg.tearing && osuCfg.enableStable)
|
||||
"immediate, class:^(osu!.exe)$")
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mainMod, RETURN, exec, ${foot}/bin/${if config.myOptions.programs.foot.server then "footclient" else "foot"}"
|
||||
|
|
39
modules/gui/osu.nix
Normal file
39
modules/gui/osu.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
config,
|
||||
config',
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.programs.osu;
|
||||
in {
|
||||
options.myOptions.programs.osu = {
|
||||
enable = mkEnableOption "enable osu!";
|
||||
enableStable = mkEnableOption "enable osu!stable";
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable || cfg.enableStable) {
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://nix-gaming.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.${config'.username} = {
|
||||
home.packages = with inputs.nix-gaming.packages.${pkgs.system}; [
|
||||
(mkIf cfg.enable
|
||||
osu-lazer-bin)
|
||||
(mkIf cfg.enableStable
|
||||
(osu-stable.override {
|
||||
preCommands = ''
|
||||
export DRI_PRIME=1
|
||||
'';
|
||||
})
|
||||
)
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue