add wofi lazy (WIP!!)
This commit is contained in:
parent
bf2ffcf802
commit
c119b84c30
3 changed files with 43 additions and 13 deletions
|
|
@ -35,9 +35,14 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
lazy = {
|
||||||
|
url = "github:bobvanderlinden/nixos-config";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nix-colors, automapaper, disko, home-manager, hyprland, ... }@inputs:
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, nix-colors, automapaper, disko, home-manager, hyprland, lazy, ... }@inputs:
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
default = nixpkgs.lib.nixosSystem {
|
default = nixpkgs.lib.nixosSystem {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,10 @@
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
modules.hyprland.enable = true;
|
modules = {
|
||||||
|
hyprland.enable = true;
|
||||||
|
wofi.lazy = true;
|
||||||
|
};
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
|
|
@ -43,8 +46,6 @@
|
||||||
mtr
|
mtr
|
||||||
|
|
||||||
obs-studio
|
obs-studio
|
||||||
steam-run
|
|
||||||
steam-tui
|
|
||||||
wayvnc
|
wayvnc
|
||||||
|
|
||||||
btop
|
btop
|
||||||
|
|
@ -100,17 +101,26 @@
|
||||||
|
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
userDirs = {
|
||||||
|
|
||||||
xdg.userDirs = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
createDirectories = true;
|
createDirectories = true;
|
||||||
};
|
};
|
||||||
|
portal = {
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||||
};
|
};
|
||||||
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
associations.added = {
|
||||||
|
"video/mp4" = [ "mpv.out.desktop" ];
|
||||||
|
};
|
||||||
|
defaultApplications = {
|
||||||
|
"video/mp4" = [ "mpv.out.desktop" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dconf = {
|
dconf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,31 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, inputs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.modules.wofi;
|
cfg = config.modules.wofi;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.wofi = {
|
options.modules.wofi = {
|
||||||
enable = lib.mkEnableOption "enable wofi app launcher";
|
enable = lib.mkEnableOption "enable wofi app launcher";
|
||||||
|
lazy = lib.mkEnableOption "enable lazy desktop entries";
|
||||||
};
|
};
|
||||||
imports = [
|
imports = [
|
||||||
../common/colors.nix
|
../common/colors.nix
|
||||||
];
|
];
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
(lib.mkIf cfg.lazy inputs.lazy.packages.${pkgs.system}.lazy-desktop)
|
||||||
|
(lib.mkIf cfg.lazy (writeShellApplication {
|
||||||
|
name = "lo";
|
||||||
|
runtimeInputs = [ xdg-utils ];
|
||||||
|
text = ''
|
||||||
|
echo "opening $*"
|
||||||
|
xdg-open "$*"
|
||||||
|
'';
|
||||||
|
}))
|
||||||
|
(lib.mkIf cfg.lazy (writeShellApplication {
|
||||||
|
name = "mt";
|
||||||
|
runtimeInputs = [ xdg-utils ];
|
||||||
|
text = ''xdg-mime query filetype "$@"'';
|
||||||
|
}))
|
||||||
(writeShellScriptBin "wofi-launch" ''
|
(writeShellScriptBin "wofi-launch" ''
|
||||||
${wofi}/bin/wofi --show drun
|
${wofi}/bin/wofi --show drun
|
||||||
'')
|
'')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue