[fix] Use lib.optionals where possible

This commit is contained in:
uttarayan21
2024-03-11 09:16:47 +05:30
parent 3487d5eb28
commit 6fcac28663
4 changed files with 18 additions and 12 deletions

View File

@@ -9,8 +9,8 @@ in
# Include the results of the hardware scan.
./tmux.nix
./wezterm.nix
] ++ (if device.isLinux then [ ../linux ] else [ ])
++ (if !lazy then [ ./nvim ] else [ ]);
] ++ lib.optionals device.isLinux [ ../linux ]
++ lib.optionals (!lazy) [ ./nvim ];
home.packages = with pkgs;
[
@@ -19,7 +19,6 @@ in
neovide
sqls
vcpkg
# vcpkg-tool
file
yt-dlp
ngrok
@@ -50,7 +49,7 @@ in
lua-language-server
(nerdfonts.override { fonts = [ "Hasklig" ]; })
mpv
] ++ (if device.isLinux then [
] ++ lib.optionals device.isLinux [
gnome.seahorse
gnome.nautilus
nextcloud-client
@@ -71,7 +70,6 @@ in
accent = "mauve";
flavor = "mocha";
})
swaynotificationcenter
usbutils
handlr-regex
webcord-vencord
@@ -86,8 +84,7 @@ in
handlr open "$@"
'';
})
] else
[ ]) ++ (if device.isMac then [ ] else [ ]);
] ++ lib.optionals device.isMac [ ];
# xdg.enable = true;
@@ -126,9 +123,7 @@ in
ls = "eza";
t = "${start-tmux}";
};
shellAliases = {
g = "git";
};
shellAliases = { g = "git"; };
shellInit = ''
set fish_greeting
yes | fish_config theme save "Catppuccin Mocha"
@@ -144,6 +139,7 @@ in
shellAliases = {
cd = "z";
yy = "yazi";
nv = "neovide";
};
package = pkgs.nushellFull;
configFile.text = ''
@@ -245,6 +241,7 @@ in
EDITOR = "nvim";
SHELL = "${pkgs.nushellFull}/bin/nu";
CARGO_TARGET_DIR = "${config.xdg.cacheHome}/cargo/target";
BROWSER = "xdg-open";
};
sessionPath = [
"${config.home.homeDirectory}/.local/bin"

View File

@@ -31,7 +31,7 @@
kb_options = "ctrl:nocaps";
# kb_rules = "";
follow_mouse = 0;
# follow_mouse = 0;
touchpad = {
natural_scroll = true;
@@ -146,7 +146,7 @@
"$mainMod, Space, exec, ${pkgs.anyrun}/bin/anyrun"
"$mainMod, p, pseudo, # dwindle"
"$mainMod, v, togglesplit,"
"$mainMod, a, exec, swaync-client -t"
# "$mainMod, a, exec, swaync-client -t"
"$mainMod, Tab, cyclenext"
# Audio
",xf86audioraisevolume, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume raise"

View File

@@ -73,6 +73,13 @@
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
hardware.bluetooth.settings = {
General = {
Name = "Ryu";
Enable = "Source,Sink,Media,Socket";
};
};
# Bootloader.
boot.loader.systemd-boot.enable = pkgs.lib.mkForce false;

View File

@@ -46,6 +46,8 @@
};
# hardware.bluetooth.settings = {
boot.initrd.availableKernelModules =
[ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];