aboutsummaryrefslogtreecommitdiff
path: root/share/cfg
diff options
context:
space:
mode:
authorMiran Bastaja <miran.bastaja04@gmail.com>2024-07-06 06:48:40 +0200
committerMiran Bastaja <miran.bastaja04@gmail.com>2024-07-06 06:48:40 +0200
commitc97a1d66084aaf50ca816d9c482f296d31346f9f (patch)
treed03726dfb1edfa87b93ca42b9076658c7c50c940 /share/cfg
parentfed01b401d65e655f565fc5c6304f2ab0d758513 (diff)
formatting
Diffstat (limited to 'share/cfg')
-rw-r--r--share/cfg/default.nix3
-rw-r--r--share/cfg/firefox/default.nix41
-rw-r--r--share/cfg/fish.nix3
-rw-r--r--share/cfg/gallery-dl.nix35
-rw-r--r--share/cfg/git.nix3
-rw-r--r--share/cfg/helix.nix37
-rw-r--r--share/cfg/hyprland.nix25
-rw-r--r--share/cfg/kitty.nix7
-rw-r--r--share/cfg/mpv.nix3
-rw-r--r--share/cfg/shellenv.nix9
-rw-r--r--share/cfg/tofi.nix3
-rw-r--r--share/cfg/waybar.nix30
-rw-r--r--share/cfg/wpaperd.nix6
13 files changed, 141 insertions, 64 deletions
diff --git a/share/cfg/default.nix b/share/cfg/default.nix
index 9a6407d..ed290a7 100644
--- a/share/cfg/default.nix
+++ b/share/cfg/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
../hm-modules
diff --git a/share/cfg/firefox/default.nix b/share/cfg/firefox/default.nix
index 5590d5d..9c486e4 100644
--- a/share/cfg/firefox/default.nix
+++ b/share/cfg/firefox/default.nix
@@ -1,10 +1,10 @@
{ pkgs, ... }:
let
# Concatenate all files in the `./usercss` directory into one string
- css-files =
- map (n: ./usercss/${n}) (builtins.attrNames (builtins.readDir ./usercss));
+ css-files = map (n: ./usercss/${n}) (builtins.attrNames (builtins.readDir ./usercss));
userChrome = builtins.concatStringsSep "\n" (map builtins.readFile css-files);
-in {
+in
+{
home.sessionVariables.BROWSER = "firefox";
programs.firefox = {
@@ -18,29 +18,28 @@ in {
default = "DuckDuckGo";
engines = {
"Nix Packages" = {
- urls = [{
- template = "https://search.nixos.org/packages";
- params = [
- {
- name = "type";
- value = "packages";
- }
- {
- name = "query";
- value = "{searchTerms}";
- }
- ];
- }];
+ urls = [
+ {
+ template = "https://search.nixos.org/packages";
+ params = [
+ {
+ name = "type";
+ value = "packages";
+ }
+ {
+ name = "query";
+ value = "{searchTerms}";
+ }
+ ];
+ }
+ ];
- icon =
- "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
+ icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
- urls = [{
- template = "https://nixos.wiki/index.php?search={searchTerms}";
- }];
+ urls = [ { template = "https://nixos.wiki/index.php?search={searchTerms}"; } ];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
diff --git a/share/cfg/fish.nix b/share/cfg/fish.nix
index d697942..62cb6ee 100644
--- a/share/cfg/fish.nix
+++ b/share/cfg/fish.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [ ./shellenv.nix ];
programs.starship.enableFishIntegration = true;
diff --git a/share/cfg/gallery-dl.nix b/share/cfg/gallery-dl.nix
index 802141f..3ee065b 100644
--- a/share/cfg/gallery-dl.nix
+++ b/share/cfg/gallery-dl.nix
@@ -1,4 +1,5 @@
-{ config, ... }: {
+{ config, ... }:
+{
programs.gallery-dl = {
settings.extractor = {
base-directory = "${config.xdg.userDirs.download}/gallery-dl";
@@ -7,15 +8,24 @@
{
name = "metadata";
mode = "json";
- whitelist =
- [ "danbooru" "moebooru" "gelbooru" "sankaku" "nhentai" "rule34" ];
+ whitelist = [
+ "danbooru"
+ "moebooru"
+ "gelbooru"
+ "sankaku"
+ "nhentai"
+ "rule34"
+ ];
}
{
name = "zip";
compression = "store";
extension = "cbz";
filter = "extension not in ('zip', 'rar')";
- whitelist = [ "nhentai" "mangadex" ];
+ whitelist = [
+ "nhentai"
+ "mangadex"
+ ];
}
];
@@ -24,14 +34,21 @@
reddit = {
archive-format = "s_{subreddit}{filename}";
directory = {
- "locals().get('is_gallery')" =
- [ "Reddit" "S" "{subreddit!C}" "{title[:120]!t:?/_/R /_/}{id}" ];
- "" = [ "Reddit" "S" "{subreddit!C}" ];
+ "locals().get('is_gallery')" = [
+ "Reddit"
+ "S"
+ "{subreddit!C}"
+ "{title[:120]!t:?/_/R /_/}{id}"
+ ];
+ "" = [
+ "Reddit"
+ "S"
+ "{subreddit!C}"
+ ];
};
filename = {
- "locals().get('is_gallery')" =
- "{title[:120]!t:?/_/R /_/}{id}{num:?_//>02}.{extension}";
+ "locals().get('is_gallery')" = "{title[:120]!t:?/_/R /_/}{id}{num:?_//>02}.{extension}";
"" = "{title[:120]!t:?/_/R /_/}{id}.{extension}";
};
};
diff --git a/share/cfg/git.nix b/share/cfg/git.nix
index 67170a0..eb05865 100644
--- a/share/cfg/git.nix
+++ b/share/cfg/git.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
programs.git = {
userEmail = "miran.bastaja04@gmail.com";
userName = "Miran Bastaja";
diff --git a/share/cfg/helix.nix b/share/cfg/helix.nix
index 78c22fe..dd99557 100644
--- a/share/cfg/helix.nix
+++ b/share/cfg/helix.nix
@@ -1,9 +1,11 @@
{
-# inputs,
-pkgs,
-# config,
-# lib,
-... }: {
+ # inputs,
+ pkgs,
+ # config,
+ # lib,
+ ...
+}:
+{
programs.helix = {
defaultEditor = true;
extraPackages = with pkgs; [
@@ -64,8 +66,7 @@ pkgs,
command = "astro-ls";
args = [ "--stdio" ];
config = {
- typescript.tsdk =
- "${pkgs.typescript}/lib/node_modules/typescript/lib";
+ typescript.tsdk = "${pkgs.typescript}/lib/node_modules/typescript/lib";
environment = "node";
};
# language-server.snippets-html = {
@@ -96,8 +97,14 @@ pkgs,
scope = "source.astro";
injection-regex = "astro";
file-types = [ "astro" ];
- roots = [ "package.json" "astro.config.mjs" ];
- language-servers = [ "astro-ls" "emmet-ls" ];
+ roots = [
+ "package.json"
+ "astro.config.mjs"
+ ];
+ language-servers = [
+ "astro-ls"
+ "emmet-ls"
+ ];
auto-format = true;
}
{
@@ -124,14 +131,22 @@ pkgs,
{
name = "typescript";
shebangs = [ "deno" ];
- roots = [ "deno.json" "deno.jsonc" "package.json" ];
+ roots = [
+ "deno.json"
+ "deno.jsonc"
+ "package.json"
+ ];
auto-format = true;
language-servers = [ "deno-lsp" ];
}
];
}; # end of languages
- ignores = [ "*.lock" "!.gitignore" "!.cargo" ];
+ ignores = [
+ "*.lock"
+ "!.gitignore"
+ "!.cargo"
+ ];
}; # end of programs.helix
# xdg.configFile = {
diff --git a/share/cfg/hyprland.nix b/share/cfg/hyprland.nix
index 629f105..b9353ef 100644
--- a/share/cfg/hyprland.nix
+++ b/share/cfg/hyprland.nix
@@ -17,7 +17,8 @@ let
};
terminal = "kitty";
};
-in {
+in
+{
wayland.windowManager.hyprland = {
extraConfig = ''
$mod = SUPER
@@ -35,12 +36,22 @@ in {
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
- ${builtins.concatStringsSep "\n" (builtins.genList (x:
- let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
- in ''
- bind = $mod, ${ws}, workspace, ${toString (x + 1)}
- bind = $mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}
- '') 10)}
+ ${builtins.concatStringsSep "\n" (
+ builtins.genList (
+ x:
+ let
+ ws =
+ let
+ c = (x + 1) / 10;
+ in
+ builtins.toString (x + 1 - (c * 10));
+ in
+ ''
+ bind = $mod, ${ws}, workspace, ${toString (x + 1)}
+ bind = $mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}
+ ''
+ ) 10
+ )}
bind = $mod SHIFT, C, killactive
bind = $mod SHIFT, F, togglefloating
diff --git a/share/cfg/kitty.nix b/share/cfg/kitty.nix
index a28091b..9cf33f8 100644
--- a/share/cfg/kitty.nix
+++ b/share/cfg/kitty.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
programs.kitty = {
theme = "Mayukai";
@@ -24,5 +25,7 @@
};
};
- home.shellAliases = { s = "kitty +kitten ssh"; };
+ home.shellAliases = {
+ s = "kitty +kitten ssh";
+ };
}
diff --git a/share/cfg/mpv.nix b/share/cfg/mpv.nix
index 427ed33..f86da15 100644
--- a/share/cfg/mpv.nix
+++ b/share/cfg/mpv.nix
@@ -1,4 +1,5 @@
-{ config, ... }: {
+{ config, ... }:
+{
programs.mpv = {
config = {
# The format is '<Filename without extension> [<screenshot number>].<ext>'
diff --git a/share/cfg/shellenv.nix b/share/cfg/shellenv.nix
index 16b28ac..0b1e7d6 100644
--- a/share/cfg/shellenv.nix
+++ b/share/cfg/shellenv.nix
@@ -1,11 +1,16 @@
-{ ... }: {
+{ ... }:
+{
home.shellAliases = {
ltg = "ls --git --tree";
ltgi = "ltg --git-ignore";
};
programs.eza = {
icons = true;
- extraOptions = [ "--header" "--group-directories-first" "--long" ];
+ extraOptions = [
+ "--header"
+ "--group-directories-first"
+ "--long"
+ ];
};
programs.starship = {
diff --git a/share/cfg/tofi.nix b/share/cfg/tofi.nix
index 998b6dc..433a911 100644
--- a/share/cfg/tofi.nix
+++ b/share/cfg/tofi.nix
@@ -1,4 +1,5 @@
-{ lib, config, ... }: {
+{ lib, config, ... }:
+{
# Tofi's cache seems to get messed up sometimes, so we regenerate it when
# building the system.
# https://github.com/philj56/tofi/issues/115#issuecomment-1701748297
diff --git a/share/cfg/waybar.nix b/share/cfg/waybar.nix
index 892850a..bd6cc96 100644
--- a/share/cfg/waybar.nix
+++ b/share/cfg/waybar.nix
@@ -1,4 +1,5 @@
-{ lib, ... }: {
+{ lib, ... }:
+{
programs.waybar = {
systemd = {
enable = true;
@@ -24,15 +25,34 @@
];
# TODO: fix clock format
- clock = { format = "{:%H:%M}"; };
+ clock = {
+ format = "{:%H:%M}";
+ };
"battery#capacity" = {
- format = lib.concatStringsSep "\n" [ "{icon}" "{capacity}%" ];
- format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
+ format = lib.concatStringsSep "\n" [
+ "{icon}"
+ "{capacity}%"
+ ];
+ format-icons = [
+ "󰁺"
+ "󰁻"
+ "󰁼"
+ "󰁽"
+ "󰁾"
+ "󰁿"
+ "󰂀"
+ "󰂁"
+ "󰂂"
+ "󰁹"
+ ];
};
"battery#power" = {
- format = lib.concatStringsSep "\n" [ "󱐋" "{power:4.1f}W" ];
+ format = lib.concatStringsSep "\n" [
+ "󱐋"
+ "{power:4.1f}W"
+ ];
interval = 1;
};
diff --git a/share/cfg/wpaperd.nix b/share/cfg/wpaperd.nix
index f5e58b4..3760caf 100644
--- a/share/cfg/wpaperd.nix
+++ b/share/cfg/wpaperd.nix
@@ -2,8 +2,10 @@
# /share/hm-modules/wpaperd.nix. In order to use this config you have to also
# import that module.
{ config, ... }:
-let wallpapers-dir = "${config.xdg.userDirs.pictures}/Wallpapers";
-in {
+let
+ wallpapers-dir = "${config.xdg.userDirs.pictures}/Wallpapers";
+in
+{
services.wpaperd = {
settings.default = {
path = wallpapers-dir;