chore(linter/formatter): Apply linter and formatter
This commit is contained in:
parent
aefd89f89d
commit
68d16b8212
24 changed files with 469 additions and 448 deletions
33
.github/workflows/pr.yaml
vendored
Normal file
33
.github/workflows/pr.yaml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
# inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml
|
||||||
|
name: Rust-build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["main"]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
extra-conf: |
|
||||||
|
extra-experimental-features = nix-command flakes
|
||||||
|
- name: Set up cache
|
||||||
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
- name: action
|
||||||
|
uses: cachix/install-nix-action@v25
|
||||||
|
with:
|
||||||
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
|
- name: cache
|
||||||
|
uses: cachix/cachix-action@v16
|
||||||
|
with:
|
||||||
|
name: dashnix
|
||||||
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
- name: Linter check
|
||||||
|
run: nix -L build github:${{ github.repository }}/${{ github.sha }} --no-write-lock-file
|
||||||
|
|
@ -20,8 +20,8 @@
|
||||||
pathToAttrs = path:
|
pathToAttrs = path:
|
||||||
lib.attrsets.mapAttrsToList (
|
lib.attrsets.mapAttrsToList (
|
||||||
name: meta: {
|
name: meta: {
|
||||||
name = name;
|
inherit name;
|
||||||
meta = meta;
|
inherit meta;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
(builtins.readDir path);
|
(builtins.readDir path);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {...} @ inputs: {
|
outputs = inputs: {
|
||||||
nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems {root = ./.;};
|
nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems {root = ./.;};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
14
flake.nix
14
flake.nix
|
|
@ -30,9 +30,6 @@
|
||||||
|
|
||||||
zen-browser.url = "github:youwen5/zen-browser-flake";
|
zen-browser.url = "github:youwen5/zen-browser-flake";
|
||||||
|
|
||||||
# TODO move to upstream repository after merged nix flake pr
|
|
||||||
fancontrol.url = "git+https://github.com/DashieTM/fancontrol-gui?ref=nix-flake";
|
|
||||||
|
|
||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:danth/stylix";
|
||||||
base16.url = "github:SenchoPens/base16.nix";
|
base16.url = "github:SenchoPens/base16.nix";
|
||||||
disko.url = "github:nix-community/disko/latest";
|
disko.url = "github:nix-community/disko/latest";
|
||||||
|
|
@ -44,6 +41,7 @@
|
||||||
oxidash.url = "github:Xetibo/OxiDash";
|
oxidash.url = "github:Xetibo/OxiDash";
|
||||||
oxipaste.url = "github:Xetibo/OxiPaste";
|
oxipaste.url = "github:Xetibo/OxiPaste";
|
||||||
oxirun.url = "github:Xetibo/OxiRun";
|
oxirun.url = "github:Xetibo/OxiRun";
|
||||||
|
dashvim.url = "github:Xetibo/DashVim";
|
||||||
# For now until merged into Xetibo
|
# For now until merged into Xetibo
|
||||||
hyprdock.url = "github:Xetibo/hyprdock";
|
hyprdock.url = "github:Xetibo/hyprdock";
|
||||||
reset.url = "github:Xetibo/ReSet";
|
reset.url = "github:Xetibo/ReSet";
|
||||||
|
|
@ -53,10 +51,6 @@
|
||||||
|
|
||||||
# absolute insanity
|
# absolute insanity
|
||||||
chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||||
|
|
||||||
dashvim = {
|
|
||||||
url = "github:Xetibo/DashVim";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {self, ...} @ inputs: let
|
outputs = {self, ...} @ inputs: let
|
||||||
|
|
@ -109,9 +103,11 @@
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
pkgs = unstable;
|
pkgs = unstable;
|
||||||
system = currentSystem;
|
system = currentSystem;
|
||||||
lib = inputs.unstable.lib;
|
inherit (inputs.unstable) lib;
|
||||||
buildSystems = dashNixLib.buildSystems;
|
inherit (dashNixLib) buildSystems;
|
||||||
};
|
};
|
||||||
|
lint = unstable.statix;
|
||||||
|
format = unstable.alejandra;
|
||||||
dashNixInputs = inputs;
|
dashNixInputs = inputs;
|
||||||
stablePkgs = stable;
|
stablePkgs = stable;
|
||||||
unstablePkgs = unstable;
|
unstablePkgs = unstable;
|
||||||
|
|
|
||||||
|
|
@ -15,44 +15,40 @@
|
||||||
in
|
in
|
||||||
lib.mkIf config.mods.nextcloud.enable {
|
lib.mkIf config.mods.nextcloud.enable {
|
||||||
systemd.user = {
|
systemd.user = {
|
||||||
services = (
|
services = builtins.listToAttrs (
|
||||||
builtins.listToAttrs (
|
map (opts: {
|
||||||
map (opts: {
|
name = "${opts.name}";
|
||||||
name = "${opts.name}";
|
value = {
|
||||||
value = {
|
Unit = {
|
||||||
Unit = {
|
Description = "Auto sync Nextcloud";
|
||||||
Description = "Auto sync Nextcloud";
|
After = "network-online.target";
|
||||||
After = "network-online.target";
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.nextcloud-client}/bin/nextcloudcmd -h --path ${opts.remote} ${opts.local} https://${username}:$(bat ${password})@${url}'";
|
|
||||||
TimeoutStopSec = "180";
|
|
||||||
KillMode = "process";
|
|
||||||
KillSignal = "SIGINT";
|
|
||||||
};
|
|
||||||
Install.WantedBy = ["multi-user.target"];
|
|
||||||
};
|
};
|
||||||
})
|
Service = {
|
||||||
synclist
|
Type = "simple";
|
||||||
)
|
ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.nextcloud-client}/bin/nextcloudcmd -h --path ${opts.remote} ${opts.local} https://${username}:$(bat ${password})@${url}'";
|
||||||
|
TimeoutStopSec = "180";
|
||||||
|
KillMode = "process";
|
||||||
|
KillSignal = "SIGINT";
|
||||||
|
};
|
||||||
|
Install.WantedBy = ["multi-user.target"];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
synclist
|
||||||
);
|
);
|
||||||
timers = (
|
timers = builtins.listToAttrs (
|
||||||
builtins.listToAttrs (
|
map (opts: {
|
||||||
map (opts: {
|
name = "${opts.name}";
|
||||||
name = "${opts.name}";
|
value = {
|
||||||
value = {
|
Unit.Description = "Automatic sync files with Nextcloud when booted up after 1 minute then rerun every 60 minutes";
|
||||||
Unit.Description = "Automatic sync files with Nextcloud when booted up after 1 minute then rerun every 60 minutes";
|
Timer.OnBootSec = "1min";
|
||||||
Timer.OnBootSec = "1min";
|
Timer.OnUnitActiveSec = "60min";
|
||||||
Timer.OnUnitActiveSec = "60min";
|
Install.WantedBy = [
|
||||||
Install.WantedBy = [
|
"multi-user.target"
|
||||||
"multi-user.target"
|
"timers.target"
|
||||||
"timers.target"
|
];
|
||||||
];
|
};
|
||||||
};
|
})
|
||||||
})
|
synclist
|
||||||
synclist
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
startServices = true;
|
startServices = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -319,11 +319,9 @@
|
||||||
else {}
|
else {}
|
||||||
);
|
);
|
||||||
moduleFn = lib.lists.foldr (attr1: attr2: attr1 // attr2) {};
|
moduleFn = lib.lists.foldr (attr1: attr2: attr1 // attr2) {};
|
||||||
mkFirefoxTheme = (
|
mkFirefoxTheme = profiles:
|
||||||
profiles:
|
profiles
|
||||||
profiles
|
|> profileNamesFn
|
||||||
|> profileNamesFn
|
|> chromesFn
|
||||||
|> chromesFn
|
|> moduleFn;
|
||||||
|> moduleFn
|
|
||||||
);
|
|
||||||
in {home.file = mkFirefoxTheme profiles;}
|
in {home.file = mkFirefoxTheme profiles;}
|
||||||
|
|
|
||||||
|
|
@ -65,16 +65,16 @@ in {
|
||||||
|
|
||||||
# legacy compatibility
|
# legacy compatibility
|
||||||
name = scheme.scheme;
|
name = scheme.scheme;
|
||||||
base00 = scheme.base00;
|
inherit (scheme) base00;
|
||||||
base01 = scheme.base01;
|
inherit (scheme) base01;
|
||||||
base02 = scheme.base02;
|
inherit (scheme) base02;
|
||||||
base03 = scheme.base03;
|
inherit (scheme) base03;
|
||||||
base04 = scheme.base04;
|
inherit (scheme) base04;
|
||||||
base05 = scheme.base05;
|
inherit (scheme) base05;
|
||||||
base06 = scheme.base06;
|
inherit (scheme) base06;
|
||||||
base07 = scheme.base07;
|
inherit (scheme) base07;
|
||||||
base08 = scheme.base08;
|
inherit (scheme) base08;
|
||||||
base09 = scheme.base09;
|
inherit (scheme) base09;
|
||||||
base0a = scheme.base0A;
|
base0a = scheme.base0A;
|
||||||
base0b = scheme.base0B;
|
base0b = scheme.base0B;
|
||||||
base0c = scheme.base0C;
|
base0c = scheme.base0C;
|
||||||
|
|
|
||||||
|
|
@ -31,15 +31,6 @@
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
xdg.configFile."qt5ct/colors/tokyonight.conf" = {
|
|
||||||
text = "${color}";
|
|
||||||
};
|
|
||||||
xdg.configFile."qt6ct/colors/tokyonight.conf" = {
|
|
||||||
text = "${color}";
|
|
||||||
};
|
|
||||||
xdg.configFile."qt5ct/qss/tab.qss" = {
|
|
||||||
text = "${qss}";
|
|
||||||
};
|
|
||||||
stylix.targets.qt = {
|
stylix.targets.qt = {
|
||||||
enable = false;
|
enable = false;
|
||||||
};
|
};
|
||||||
|
|
@ -49,74 +40,85 @@ in {
|
||||||
style.name = lib.mkForce "breeze-dark";
|
style.name = lib.mkForce "breeze-dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."qt5ct/qt5ct.conf" = {
|
xdg.configFile = {
|
||||||
text = ''
|
"qt5ct/colors/tokyonight.conf" = {
|
||||||
|
text = "${color}";
|
||||||
|
};
|
||||||
|
"qt6ct/colors/tokyonight.conf" = {
|
||||||
|
text = "${color}";
|
||||||
|
};
|
||||||
|
"qt5ct/qss/tab.qss" = {
|
||||||
|
text = "${qss}";
|
||||||
|
};
|
||||||
|
"qt5ct/qt5ct.conf" = {
|
||||||
|
text = ''
|
||||||
|
|
||||||
[Appearance]
|
[Appearance]
|
||||||
color_scheme_path=/home/${username}/.config/qt5ct/colors/tokyonight.conf
|
color_scheme_path=/home/${username}/.config/qt5ct/colors/tokyonight.conf
|
||||||
custom_palette=true
|
custom_palette=true
|
||||||
icon_theme=MoreWaita
|
icon_theme=MoreWaita
|
||||||
standard_dialogs=xdgdesktopportal
|
standard_dialogs=xdgdesktopportal
|
||||||
style=Breeze
|
style=Breeze
|
||||||
|
|
||||||
[Fonts]
|
[Fonts]
|
||||||
fixed="Noto Sans,12,-1,5,50,0,0,0,0,0"
|
fixed="Noto Sans,12,-1,5,50,0,0,0,0,0"
|
||||||
general="Noto Sans,12,-1,5,50,0,0,0,0,0"
|
general="Noto Sans,12,-1,5,50,0,0,0,0,0"
|
||||||
|
|
||||||
[Interface]
|
[Interface]
|
||||||
activate_item_on_single_click=2
|
activate_item_on_single_click=2
|
||||||
buttonbox_layout=3
|
buttonbox_layout=3
|
||||||
cursor_flash_time=1000
|
cursor_flash_time=1000
|
||||||
dialog_buttons_have_icons=0
|
dialog_buttons_have_icons=0
|
||||||
double_click_interval=400
|
double_click_interval=400
|
||||||
gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox
|
gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox
|
||||||
keyboard_scheme=4
|
keyboard_scheme=4
|
||||||
menus_have_icons=true
|
menus_have_icons=true
|
||||||
show_shortcuts_in_context_menus=true
|
show_shortcuts_in_context_menus=true
|
||||||
stylesheets=/home/${username}/.config/qt5ct/qss/tab.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/fusion-fixes.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/scrollbar-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/sliders-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/tooltip-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/traynotification-simple.qss
|
stylesheets=/home/${username}/.config/qt5ct/qss/tab.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/fusion-fixes.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/scrollbar-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/sliders-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/tooltip-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/traynotification-simple.qss
|
||||||
toolbutton_style=4
|
toolbutton_style=4
|
||||||
underline_shortcut=0
|
underline_shortcut=0
|
||||||
wheel_scroll_lines=3
|
wheel_scroll_lines=3
|
||||||
|
|
||||||
[SettingsWindow]
|
[SettingsWindow]
|
||||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q\0\0\n\0\0\0\0\0\0\0\r[\0\0\x5\x7f\0\0\0\0\x2\0\0\0\rp\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q)
|
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q\0\0\n\0\0\0\0\0\0\0\r[\0\0\x5\x7f\0\0\0\0\x2\0\0\0\rp\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q)
|
||||||
|
|
||||||
[Troubleshooting]
|
[Troubleshooting]
|
||||||
force_raster_widgets=1
|
force_raster_widgets=1
|
||||||
ignored_applications=@Invalid()
|
ignored_applications=@Invalid()
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
xdg.configFile."qt6ct/qt6ct.conf" = {
|
"qt6ct/qt6ct.conf" = {
|
||||||
text = ''
|
text = ''
|
||||||
|
|
||||||
[Appearance]
|
[Appearance]
|
||||||
color_scheme_path=/home/${username}/.config/qt6ct/colors/tokyonight.conf
|
color_scheme_path=/home/${username}/.config/qt6ct/colors/tokyonight.conf
|
||||||
custom_palette=true
|
custom_palette=true
|
||||||
standard_dialogs=xdgdesktopportal
|
standard_dialogs=xdgdesktopportal
|
||||||
style=Breeze
|
style=Breeze
|
||||||
|
|
||||||
[Fonts]
|
[Fonts]
|
||||||
fixed="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
fixed="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||||
general="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
general="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||||
|
|
||||||
[Interface]
|
[Interface]
|
||||||
activate_item_on_single_click=2
|
activate_item_on_single_click=2
|
||||||
buttonbox_layout=3
|
buttonbox_layout=3
|
||||||
cursor_flash_time=1000
|
cursor_flash_time=1000
|
||||||
dialog_buttons_have_icons=0
|
dialog_buttons_have_icons=0
|
||||||
double_click_interval=400
|
double_click_interval=400
|
||||||
gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox
|
gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox
|
||||||
keyboard_scheme=4
|
keyboard_scheme=4
|
||||||
menus_have_icons=true
|
menus_have_icons=true
|
||||||
show_shortcuts_in_context_menus=true
|
show_shortcuts_in_context_menus=true
|
||||||
stylesheets=@Invalid()
|
stylesheets=@Invalid()
|
||||||
toolbutton_style=4
|
toolbutton_style=4
|
||||||
underline_shortcut=1
|
underline_shortcut=1
|
||||||
wheel_scroll_lines=3
|
wheel_scroll_lines=3
|
||||||
|
|
||||||
[Troubleshooting]
|
[Troubleshooting]
|
||||||
force_raster_widgets=1
|
force_raster_widgets=1
|
||||||
ignored_applications=@Invalid()
|
ignored_applications=@Invalid()
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
in {
|
in {
|
||||||
imports = ["${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"];
|
imports = ["${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"];
|
||||||
nixpkgs.hostPlatform = {
|
nixpkgs.hostPlatform = {
|
||||||
system = system;
|
inherit system;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,6 @@
|
||||||
inputs.reset.homeManagerModules.default
|
inputs.reset.homeManagerModules.default
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
inputs.dashvim.homeManagerModules.dashvim
|
inputs.dashvim.homeManagerModules.dashvim
|
||||||
inputs.fancontrol.homeManagerModules.default
|
|
||||||
inputs.chaoticNyx.homeManagerModules.default
|
inputs.chaoticNyx.homeManagerModules.default
|
||||||
../modules
|
../modules
|
||||||
];
|
];
|
||||||
|
|
@ -82,7 +81,7 @@
|
||||||
builtins.listToAttrs (
|
builtins.listToAttrs (
|
||||||
map
|
map
|
||||||
(name: {
|
(name: {
|
||||||
name = name;
|
inherit name;
|
||||||
value = let
|
value = let
|
||||||
mod = root + /hosts/${name}/configuration.nix;
|
mod = root + /hosts/${name}/configuration.nix;
|
||||||
additionalNixosConfig = root + /hosts/${name}/hardware.nix;
|
additionalNixosConfig = root + /hosts/${name}/hardware.nix;
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ in {
|
||||||
// {
|
// {
|
||||||
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.firefox.extensions
|
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.firefox.extensions
|
||||||
++ (
|
++ (
|
||||||
if (config.mods.browser.firefox.darkreader)
|
if config.mods.browser.firefox.darkreader
|
||||||
then [
|
then [
|
||||||
{
|
{
|
||||||
"addon@darkreader.org" = {
|
"addon@darkreader.org" = {
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ in {
|
||||||
// {
|
// {
|
||||||
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.librewolf.extensions
|
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.librewolf.extensions
|
||||||
++ (
|
++ (
|
||||||
if (config.mods.browser.firefox.darkreader)
|
if config.mods.browser.firefox.darkreader
|
||||||
then [
|
then [
|
||||||
{
|
{
|
||||||
"addon@darkreader.org" = {
|
"addon@darkreader.org" = {
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ in {
|
||||||
// {
|
// {
|
||||||
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.zen.extensions
|
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.zen.extensions
|
||||||
++ (
|
++ (
|
||||||
if (config.mods.browser.firefox.darkreader)
|
if config.mods.browser.firefox.darkreader
|
||||||
then [
|
then [
|
||||||
{
|
{
|
||||||
"addon@darkreader.org" = {
|
"addon@darkreader.org" = {
|
||||||
|
|
|
||||||
|
|
@ -517,28 +517,30 @@ in {
|
||||||
lib.optionalAttrs (options ? home.packages) {
|
lib.optionalAttrs (options ? home.packages) {
|
||||||
programs.dashvim = lib.mkIf config.mods.coding.dashvim {
|
programs.dashvim = lib.mkIf config.mods.coding.dashvim {
|
||||||
enable = true;
|
enable = true;
|
||||||
colorscheme = config.mods.stylix.colorscheme;
|
inherit (config.mods.stylix) colorscheme;
|
||||||
};
|
};
|
||||||
programs.vscode = lib.mkIf config.mods.coding.vscodium.enable {
|
programs.vscode = lib.mkIf config.mods.coding.vscodium.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = mkDashDefault pkgs.vscodium;
|
package = mkDashDefault pkgs.vscodium;
|
||||||
profiles.default.extensions = config.mods.coding.vscodium.extensions;
|
profiles.default.extensions = config.mods.coding.vscodium.extensions;
|
||||||
};
|
};
|
||||||
xdg.configFile."neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) {
|
xdg.configFile = {
|
||||||
source =
|
"neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) {
|
||||||
(pkgs.formats.toml {}).generate "neovide"
|
source =
|
||||||
config.mods.coding.neovide.config;
|
(pkgs.formats.toml {}).generate "neovide"
|
||||||
};
|
config.mods.coding.neovide.config;
|
||||||
|
};
|
||||||
|
|
||||||
xdg.configFile."gh/config.yml" = lib.mkIf config.mods.coding.gh.enable {
|
"gh/config.yml" = lib.mkIf config.mods.coding.gh.enable {
|
||||||
source =
|
source =
|
||||||
(pkgs.formats.yaml {}).generate "config"
|
(pkgs.formats.yaml {}).generate "config"
|
||||||
config.mods.coding.gh.config;
|
config.mods.coding.gh.config;
|
||||||
};
|
};
|
||||||
xdg.configFile."gh/hosts.yml" = lib.mkIf config.mods.coding.gh.enable {
|
"gh/hosts.yml" = lib.mkIf config.mods.coding.gh.enable {
|
||||||
source =
|
source =
|
||||||
(pkgs.formats.yaml {}).generate "hosts"
|
(pkgs.formats.yaml {}).generate "hosts"
|
||||||
config.mods.coding.gh.hosts;
|
config.mods.coding.gh.hosts;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
|
|
|
||||||
|
|
@ -43,39 +43,37 @@
|
||||||
description = "Container packages";
|
description = "Container packages";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = (
|
config = lib.optionalAttrs (options ? environment.systemPackages) {
|
||||||
lib.optionalAttrs (options ? environment.systemPackages) {
|
environment.systemPackages =
|
||||||
environment.systemPackages =
|
(lib.lists.optionals (
|
||||||
(lib.lists.optionals (
|
config.mods.containers.variant == "podman"
|
||||||
config.mods.containers.variant == "podman"
|
)
|
||||||
)
|
config.mods.containers.podmanPackages)
|
||||||
config.mods.containers.podmanPackages)
|
++ (lib.lists.optionals (
|
||||||
++ (lib.lists.optionals (
|
config.mods.containers.variant == "docker"
|
||||||
config.mods.containers.variant == "docker"
|
)
|
||||||
)
|
config.mods.containers.dockerPackages)
|
||||||
config.mods.containers.dockerPackages)
|
++ (lib.lists.optionals (
|
||||||
++ (lib.lists.optionals (
|
config.mods.containers.variant == "podman" || config.mods.containers.variant == "docker"
|
||||||
config.mods.containers.variant == "podman" || config.mods.containers.variant == "docker"
|
)
|
||||||
)
|
config.mods.containers.combinedPackages);
|
||||||
config.mods.containers.combinedPackages);
|
virtualisation =
|
||||||
virtualisation =
|
if (config.mods.containers.variant == "podman")
|
||||||
if (config.mods.containers.variant == "podman")
|
then {
|
||||||
then {
|
containers.enable = true;
|
||||||
containers.enable = true;
|
podman = {
|
||||||
podman = {
|
enable = true;
|
||||||
enable = true;
|
dockerCompat = mkDashDefault true;
|
||||||
dockerCompat = mkDashDefault true;
|
defaultNetwork.settings.dns_enabled = mkDashDefault true;
|
||||||
defaultNetwork.settings.dns_enabled = mkDashDefault true;
|
};
|
||||||
};
|
}
|
||||||
}
|
else if (config.mods.containers.variant == "docker")
|
||||||
else if (config.mods.containers.variant == "docker")
|
then {
|
||||||
then {
|
containers.enable = true;
|
||||||
containers.enable = true;
|
docker = {
|
||||||
docker = {
|
enable = true;
|
||||||
enable = true;
|
};
|
||||||
};
|
}
|
||||||
}
|
else {};
|
||||||
else {};
|
};
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,25 +159,143 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = (
|
config = lib.optionalAttrs (options ? fileSystems) {
|
||||||
lib.optionalAttrs (options ? fileSystems) {
|
boot.initrd.luks.devices = lib.mkIf (config.mods.drives.variant == "manual" && config.mods.drives.useEncryption) (
|
||||||
boot.initrd.luks.devices = lib.mkIf (config.mods.drives.variant == "manual" && config.mods.drives.useEncryption) (
|
builtins.listToAttrs (
|
||||||
builtins.listToAttrs (
|
map (
|
||||||
map (
|
{
|
||||||
{
|
name,
|
||||||
name,
|
drive,
|
||||||
drive,
|
}: {
|
||||||
}: {
|
cryptstorage.device = lib.mkIf (name != "root") drive?device;
|
||||||
cryptstorage.device = lib.mkIf (name != "root") drive?device;
|
cryptoroot.device = lib.mkIf (name == "root") drive?device;
|
||||||
cryptoroot.device = lib.mkIf (name == "root") drive?device;
|
}
|
||||||
}
|
|
||||||
)
|
|
||||||
config.mods.drives.extraDrives
|
|
||||||
)
|
)
|
||||||
);
|
config.mods.drives.extraDrives
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
fileSystems = lib.mkIf (config.mods.drives.variant == "manual" && !config.conf.wsl) (
|
fileSystems = lib.mkIf (config.mods.drives.variant == "manual" && !config.conf.wsl) (
|
||||||
builtins.listToAttrs (
|
builtins.listToAttrs (
|
||||||
|
map (
|
||||||
|
{
|
||||||
|
name,
|
||||||
|
drive,
|
||||||
|
}: {
|
||||||
|
name = "/" + name;
|
||||||
|
value = drive;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
config.mods.drives.extraDrives
|
||||||
|
)
|
||||||
|
// (lib.optionalAttrs config.mods.drives.defaultDrives.enable) {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-label/ROOT";
|
||||||
|
fsType = config.mods.drives.homeAndRootFsTypes;
|
||||||
|
options = [
|
||||||
|
"noatime"
|
||||||
|
"nodiratime"
|
||||||
|
"discard"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-label/BOOT";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/home" = {
|
||||||
|
device = "/dev/disk/by-label/HOME";
|
||||||
|
fsType = config.mods.drives.homeAndRootFsTypes;
|
||||||
|
options = [
|
||||||
|
"noatime"
|
||||||
|
"nodiratime"
|
||||||
|
"discard"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
swapDevices = lib.mkIf (config.mods.drives.useSwap && config.mods.drives.variant == "manual" && !config.conf.wsl) [
|
||||||
|
{device = "/dev/disk/by-label/SWAP";}
|
||||||
|
];
|
||||||
|
|
||||||
|
disko.devices = lib.mkIf (config.mods.drives.variant == "disko") {
|
||||||
|
disk =
|
||||||
|
{
|
||||||
|
main = (lib.optionalAttrs config.mods.drives.defaultDrives.enable) {
|
||||||
|
device = "${config.mods.drives.disko.defaultDiskId}";
|
||||||
|
type = "disk";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
root = {
|
||||||
|
start = "${
|
||||||
|
if config.mods.drives.useSwap
|
||||||
|
then builtins.toString config.mods.drives.disko.swapAmount
|
||||||
|
else builtins.toString 1
|
||||||
|
}G";
|
||||||
|
end = "${builtins.toString config.mods.drives.disko.rootAmount}%";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = config.mods.drives.homeAndRootFsTypes;
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [
|
||||||
|
"noatime"
|
||||||
|
"nodiratime"
|
||||||
|
"discard"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
plainSwap = {
|
||||||
|
start = "1G";
|
||||||
|
end = "33G";
|
||||||
|
content = {
|
||||||
|
type = "swap";
|
||||||
|
discardPolicy = "both";
|
||||||
|
resumeDevice = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
boot = {
|
||||||
|
start = "0G";
|
||||||
|
end = "1G";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [
|
||||||
|
"rw"
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
start = "${builtins.toString config.mods.drives.disko.rootAmount}%";
|
||||||
|
end = "100%";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = config.mods.drives.homeAndRootFsTypes;
|
||||||
|
mountpoint = "/home";
|
||||||
|
mountOptions = [
|
||||||
|
"noatime"
|
||||||
|
"nodiratime"
|
||||||
|
"discard"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// builtins.listToAttrs (
|
||||||
map (
|
map (
|
||||||
{
|
{
|
||||||
name,
|
name,
|
||||||
|
|
@ -188,127 +306,7 @@
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
config.mods.drives.extraDrives
|
config.mods.drives.extraDrives
|
||||||
)
|
);
|
||||||
// (lib.optionalAttrs config.mods.drives.defaultDrives.enable) {
|
};
|
||||||
"/" = {
|
};
|
||||||
device = "/dev/disk/by-label/ROOT";
|
|
||||||
fsType = config.mods.drives.homeAndRootFsTypes;
|
|
||||||
options = [
|
|
||||||
"noatime"
|
|
||||||
"nodiratime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"/boot" = {
|
|
||||||
device = "/dev/disk/by-label/BOOT";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [
|
|
||||||
"rw"
|
|
||||||
"fmask=0022"
|
|
||||||
"dmask=0022"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"/home" = {
|
|
||||||
device = "/dev/disk/by-label/HOME";
|
|
||||||
fsType = config.mods.drives.homeAndRootFsTypes;
|
|
||||||
options = [
|
|
||||||
"noatime"
|
|
||||||
"nodiratime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
swapDevices = lib.mkIf (config.mods.drives.useSwap && config.mods.drives.variant == "manual" && !config.conf.wsl) [
|
|
||||||
{device = "/dev/disk/by-label/SWAP";}
|
|
||||||
];
|
|
||||||
|
|
||||||
disko.devices = lib.mkIf (config.mods.drives.variant == "disko") {
|
|
||||||
disk =
|
|
||||||
{
|
|
||||||
main = (lib.optionalAttrs config.mods.drives.defaultDrives.enable) {
|
|
||||||
device = "${config.mods.drives.disko.defaultDiskId}";
|
|
||||||
type = "disk";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
root = {
|
|
||||||
start = "${
|
|
||||||
if config.mods.drives.useSwap
|
|
||||||
then builtins.toString config.mods.drives.disko.swapAmount
|
|
||||||
else builtins.toString 1
|
|
||||||
}G";
|
|
||||||
end = "${builtins.toString config.mods.drives.disko.rootAmount}%";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = config.mods.drives.homeAndRootFsTypes;
|
|
||||||
mountpoint = "/";
|
|
||||||
mountOptions = [
|
|
||||||
"noatime"
|
|
||||||
"nodiratime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
plainSwap = {
|
|
||||||
start = "1G";
|
|
||||||
end = "33G";
|
|
||||||
content = {
|
|
||||||
type = "swap";
|
|
||||||
discardPolicy = "both";
|
|
||||||
resumeDevice = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
boot = {
|
|
||||||
start = "0G";
|
|
||||||
end = "1G";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
mountOptions = [
|
|
||||||
"rw"
|
|
||||||
"fmask=0022"
|
|
||||||
"dmask=0022"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home = {
|
|
||||||
start = "${builtins.toString config.mods.drives.disko.rootAmount}%";
|
|
||||||
end = "100%";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = config.mods.drives.homeAndRootFsTypes;
|
|
||||||
mountpoint = "/home";
|
|
||||||
mountOptions = [
|
|
||||||
"noatime"
|
|
||||||
"nodiratime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// builtins.listToAttrs (
|
|
||||||
map (
|
|
||||||
{
|
|
||||||
name,
|
|
||||||
drive,
|
|
||||||
}: {
|
|
||||||
name = "/" + name;
|
|
||||||
value = drive;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
config.mods.drives.extraDrives
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
config,
|
config,
|
||||||
options,
|
options,
|
||||||
...
|
...
|
||||||
|
|
@ -20,7 +21,7 @@
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.mods.fancontrol.enable (
|
config = lib.mkIf config.mods.fancontrol.enable (
|
||||||
lib.optionalAttrs (options ? home.packages) {
|
lib.optionalAttrs (options ? home.packages) {
|
||||||
programs.fancontrol-gui.enable = true;
|
home.packages = [pkgs.fancontrol-gui];
|
||||||
}
|
}
|
||||||
// (lib.optionalAttrs (options ? boot.kernelModules) {
|
// (lib.optionalAttrs (options ? boot.kernelModules) {
|
||||||
boot = {
|
boot = {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.optionalAttrs (options ? home.packages) {
|
config = lib.optionalAttrs (options ? home.packages) {
|
||||||
xdg.configFile."fastfetch/config.jsonc" = lib.mkIf (config.mods.dashfetch.enable) {
|
xdg.configFile."fastfetch/config.jsonc" = lib.mkIf config.mods.dashfetch.enable {
|
||||||
source =
|
source =
|
||||||
(pkgs.formats.json {}).generate "config.jsonc"
|
(pkgs.formats.json {}).generate "config.jsonc"
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -47,15 +47,13 @@
|
||||||
description = "ssh configuration (keys for git)";
|
description = "ssh configuration (keys for git)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = (
|
config = lib.optionalAttrs (options ? programs.git && options ? home.file) {
|
||||||
lib.optionalAttrs (options ? programs.git && options ? home.file) {
|
programs.git = {
|
||||||
programs.git = {
|
enable = true;
|
||||||
enable = true;
|
userName = config.mods.git.username;
|
||||||
userName = config.mods.git.username;
|
userEmail = config.mods.git.email;
|
||||||
userEmail = config.mods.git.email;
|
extraConfig = config.mods.git.additionalConfig;
|
||||||
extraConfig = config.mods.git.additionalConfig;
|
};
|
||||||
};
|
home.file.".ssh/config".text = config.mods.git.sshConfig;
|
||||||
home.file.".ssh/config".text = config.mods.git.sshConfig;
|
};
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,9 +130,13 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# unlock GPG keyring on login
|
# unlock GPG keyring on login
|
||||||
security.pam.services.greetd.enableGnomeKeyring = mkDashDefault true;
|
security.pam = {
|
||||||
security.pam.services.greetd.sshAgentAuth = mkDashDefault true;
|
services.greetd = {
|
||||||
security.pam.sshAgentAuth.enable = mkDashDefault true;
|
enableGnomeKeyring = mkDashDefault true;
|
||||||
|
sshAgentAuth = mkDashDefault true;
|
||||||
|
};
|
||||||
|
sshAgentAuth.enable = mkDashDefault true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs (options ? home) {
|
// lib.optionalAttrs (options ? home) {
|
||||||
xdg.configFile."regreet/regreet.toml".source =
|
xdg.configFile."regreet/regreet.toml".source =
|
||||||
|
|
|
||||||
|
|
@ -24,102 +24,100 @@
|
||||||
description = "More scripts to be passed. (check existing ones for types and examples)";
|
description = "More scripts to be passed. (check existing ones for types and examples)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = (
|
config = lib.optionalAttrs (options ? home.packages) {
|
||||||
lib.optionalAttrs (options ? home.packages) {
|
home.packages =
|
||||||
home.packages =
|
[
|
||||||
[
|
(lib.mkIf config.mods.scripts.changeBrightness (
|
||||||
(lib.mkIf config.mods.scripts.changeBrightness (
|
pkgs.writeShellScriptBin "changeBrightness" ''
|
||||||
pkgs.writeShellScriptBin "changeBrightness" ''
|
brightnessctl set "$1"
|
||||||
brightnessctl set "$1"
|
CURRENT=$(brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}')
|
||||||
CURRENT=$(brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}')
|
notify-send -a "changeBrightness" -r 3 -u low -i brightness-high -h int:value:"$CURRENT" "Brightness: ''${CURRENT}%"
|
||||||
notify-send -a "changeBrightness" -r 3 -u low -i brightness-high -h int:value:"$CURRENT" "Brightness: ''${CURRENT}%"
|
''
|
||||||
''
|
))
|
||||||
))
|
(lib.mkIf config.mods.scripts.audioControl (
|
||||||
(lib.mkIf config.mods.scripts.audioControl (
|
pkgs.writeShellScriptBin "audioControl" ''
|
||||||
pkgs.writeShellScriptBin "audioControl" ''
|
ncspot() {
|
||||||
ncspot() {
|
NUM=$(pactl list clients short | rg "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n')
|
||||||
NUM=$(pactl list clients short | rg "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n')
|
CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
|
||||||
CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
|
pactl set-sink-input-volume "$CHANGE" "$1"
|
||||||
pactl set-sink-input-volume "$CHANGE" "$1"
|
VOLUME=$(pactl list sink-inputs | rg "$NUM" -A7 | rg "Volume:" | awk -F ' ' ' { print $5 }' | tr -d '%')
|
||||||
VOLUME=$(pactl list sink-inputs | rg "$NUM" -A7 | rg "Volume:" | awk -F ' ' ' { print $5 }' | tr -d '%')
|
notify-send -a "ncspot" -r 990 -u low -i audio-volume-high -h int:progress:"$VOLUME" "Spotify Volume: ''${VOLUME}%"
|
||||||
notify-send -a "ncspot" -r 990 -u low -i audio-volume-high -h int:progress:"$VOLUME" "Spotify Volume: ''${VOLUME}%"
|
}
|
||||||
}
|
|
||||||
|
|
||||||
firefox() {
|
firefox() {
|
||||||
STRING=$(pactl list clients short | rg "firefox" | awk -F 'PipeWire' ' { print $1 "," } ' | tr -d ' \t\n')
|
STRING=$(pactl list clients short | rg "firefox" | awk -F 'PipeWire' ' { print $1 "," } ' | tr -d ' \t\n')
|
||||||
# NUMS=',' read -r -a array <<< "$STRING"
|
# NUMS=',' read -r -a array <<< "$STRING"
|
||||||
readarray -td, NUMS <<<"$STRING"
|
readarray -td, NUMS <<<"$STRING"
|
||||||
declare -p NUMS
|
declare -p NUMS
|
||||||
for index in "''${!NUMS[@]}"; do #"''${!array[@]}"
|
for index in "''${!NUMS[@]}"; do #"''${!array[@]}"
|
||||||
NUM=$(echo "''${NUMS[index]}" | tr -d ' \t\n')
|
NUM=$(echo "''${NUMS[index]}" | tr -d ' \t\n')
|
||||||
CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
|
CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
|
||||||
pactl set-sink-input-volume "$CHANGE" "$1"
|
pactl set-sink-input-volume "$CHANGE" "$1"
|
||||||
done
|
done
|
||||||
VOLUME=$(pactl list sink-inputs | rg "''${NUMS[0]}" -A7 | rg "Volume:" | awk -F ' ' ' { print $5 }' | tr -d '%')
|
VOLUME=$(pactl list sink-inputs | rg "''${NUMS[0]}" -A7 | rg "Volume:" | awk -F ' ' ' { print $5 }' | tr -d '%')
|
||||||
notify-send -a "Firefox" -r 991 -u low -i audio-volume-high -h int:progress:"$VOLUME" "Firefox Volume: ''${VOLUME}%"
|
notify-send -a "Firefox" -r 991 -u low -i audio-volume-high -h int:progress:"$VOLUME" "Firefox Volume: ''${VOLUME}%"
|
||||||
}
|
}
|
||||||
|
|
||||||
internal() {
|
internal() {
|
||||||
SPEAKER=$(pactl list sinks | grep "Name" | grep "alsa" | awk -F ': ' '{ print $2 }')
|
SPEAKER=$(pactl list sinks | grep "Name" | grep "alsa" | awk -F ': ' '{ print $2 }')
|
||||||
if [ "$SPEAKER" != "" ]; then
|
if [ "$SPEAKER" != "" ]; then
|
||||||
pactl set-default-sink "$SPEAKER"
|
pactl set-default-sink "$SPEAKER"
|
||||||
pactl set-sink-mute "$SPEAKER" false
|
pactl set-sink-mute "$SPEAKER" false
|
||||||
DEVICE=$(echo "$SPEAKER" | awk -F '.' ' { print $4 } ')
|
DEVICE=$(echo "$SPEAKER" | awk -F '.' ' { print $4 } ')
|
||||||
notify-send "changed audio to "$DEVICE" "
|
notify-send "changed audio to "$DEVICE" "
|
||||||
else
|
else
|
||||||
notify-send "failed, not available!"
|
notify-send "failed, not available!"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set_volume_sink() {
|
set_volume_sink() {
|
||||||
pactl set-sink-volume @DEFAULT_SINK@ "$1"
|
pactl set-sink-volume @DEFAULT_SINK@ "$1"
|
||||||
CURRENT=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %')
|
CURRENT=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %')
|
||||||
notify-send -a "System Volume" -r 1001 -u low -i audio-volume-high -h int:progress:"$CURRENT" "Output Volume: ''${CURRENT}%"
|
notify-send -a "System Volume" -r 1001 -u low -i audio-volume-high -h int:progress:"$CURRENT" "Output Volume: ''${CURRENT}%"
|
||||||
}
|
}
|
||||||
|
|
||||||
set_volume_source() {
|
set_volume_source() {
|
||||||
pactl set-source-volume @DEFAULT_SOURCE@ "$1"
|
pactl set-source-volume @DEFAULT_SOURCE@ "$1"
|
||||||
CURRENT=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %')
|
CURRENT=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %')
|
||||||
notify-send -a "System Volume" -r 1001 -u low -i audio-volume-high -h int:progress:"$CURRENT" "Input Volume: ''${CURRENT}%"
|
notify-send -a "System Volume" -r 1001 -u low -i audio-volume-high -h int:progress:"$CURRENT" "Input Volume: ''${CURRENT}%"
|
||||||
}
|
}
|
||||||
|
|
||||||
bluetooth() {
|
bluetooth() {
|
||||||
SPEAKER=$(pactl list sinks | grep "Name" | grep "blue" | awk -F ': ' '{ print $2 }')
|
SPEAKER=$(pactl list sinks | grep "Name" | grep "blue" | awk -F ': ' '{ print $2 }')
|
||||||
if [ "$SPEAKER" != "" ]; then
|
if [ "$SPEAKER" != "" ]; then
|
||||||
pactl set-default-sink "$SPEAKER"
|
pactl set-default-sink "$SPEAKER"
|
||||||
pactl set-sink-mute "$SPEAKER" false
|
pactl set-sink-mute "$SPEAKER" false
|
||||||
DEVICE=$(echo "$SPEAKER" | awk -F '.' ' { print $4 } ')
|
DEVICE=$(echo "$SPEAKER" | awk -F '.' ' { print $4 } ')
|
||||||
notify-send "changed audio to "$DEVICE" "
|
notify-send "changed audio to "$DEVICE" "
|
||||||
else
|
else
|
||||||
notify-send "failed, not available!"
|
notify-send "failed, not available!"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
mute() {
|
mute() {
|
||||||
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
MUTE=$(pactl get-sink-mute @DEFAULT_SINK@)
|
MUTE=$(pactl get-sink-mute @DEFAULT_SINK@)
|
||||||
notify-send -a "Audio" -r 994 -u low -i audio-volume-high "Audio: $MUTE"
|
notify-send -a "Audio" -r 994 -u low -i audio-volume-high "Audio: $MUTE"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$1" == "internal" ]; then
|
if [ "$1" == "internal" ]; then
|
||||||
internal
|
internal
|
||||||
elif [ "$1" == "bluetooth" ]; then
|
elif [ "$1" == "bluetooth" ]; then
|
||||||
bluetooth
|
bluetooth
|
||||||
elif [ "$1" == "firefox" ]; then
|
elif [ "$1" == "firefox" ]; then
|
||||||
firefox "$2"
|
firefox "$2"
|
||||||
elif [ "$1" == "ncspot" ]; then
|
elif [ "$1" == "ncspot" ]; then
|
||||||
ncspot "$2"
|
ncspot "$2"
|
||||||
elif [ "$1" == "mute" ]; then
|
elif [ "$1" == "mute" ]; then
|
||||||
mute
|
mute
|
||||||
elif [ "$1" == "sink" ]; then
|
elif [ "$1" == "sink" ]; then
|
||||||
set_volume_sink "$2"
|
set_volume_sink "$2"
|
||||||
elif [ "$1" == "source" ]; then
|
elif [ "$1" == "source" ]; then
|
||||||
set_volume_source "$2"
|
set_volume_source "$2"
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
))
|
))
|
||||||
]
|
]
|
||||||
++ config.mods.scripts.scripts;
|
++ config.mods.scripts.scripts;
|
||||||
}
|
};
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ in {
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.mods.teams.enable (
|
config = lib.mkIf config.mods.teams.enable (
|
||||||
lib.optionalAttrs (options ? home.packages) {
|
lib.optionalAttrs (options ? home.packages) {
|
||||||
home.packages = [(callPackage ../../override/teams.nix {chromium = pkgs.chromium;})];
|
home.packages = [(callPackage ../../override/teams.nix {inherit (pkgs) chromium;})];
|
||||||
}
|
}
|
||||||
// (lib.optionalAttrs (options ? boot.kernelModules) {
|
// (lib.optionalAttrs (options ? boot.kernelModules) {
|
||||||
boot = {
|
boot = {
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,11 @@
|
||||||
description = "Your variant";
|
description = "Your variant";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = (
|
config = lib.optionalAttrs (options ? services.xserver) {
|
||||||
lib.optionalAttrs (options ? services.xserver) {
|
# Configure keymap in X11
|
||||||
# Configure keymap in X11
|
services.xserver = {
|
||||||
services.xserver = {
|
xkb.layout = "${config.mods.xkb.layout}";
|
||||||
xkb.layout = "${config.mods.xkb.layout}";
|
xkb.variant = "${config.mods.xkb.variant}";
|
||||||
xkb.variant = "${config.mods.xkb.variant}";
|
};
|
||||||
};
|
};
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
lib.mkIf config.mods.yazi.enable {
|
lib.mkIf config.mods.yazi.enable {
|
||||||
home.packages = [pkgs.glow];
|
home.packages = [pkgs.glow];
|
||||||
programs.yazi = {
|
programs.yazi = {
|
||||||
enable = conf.enable;
|
inherit (conf) enable;
|
||||||
settings = conf.settings // config.mods.yazi.additionalKeymap;
|
settings = conf.settings // config.mods.yazi.additionalKeymap;
|
||||||
keymap = conf.keymap // config.mods.yazi.additionalConfig;
|
keymap = conf.keymap // config.mods.yazi.additionalConfig;
|
||||||
plugins = config.mods.yazi.plugins;
|
plugins = config.mods.yazi.plugins;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue