aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/hm-modules/wpaperd.nix74
-rw-r--r--share/home/default.nix64
-rw-r--r--share/home/eww/config/eww.scss13
-rw-r--r--share/home/eww/config/eww.yuck54
-rw-r--r--share/home/eww/default.nix7
-rw-r--r--share/home/firefox/default.nix62
-rw-r--r--share/home/firefox/usercss/compact-about-config.css24
-rw-r--r--share/home/firefox/usercss/context-menu.css12
-rw-r--r--share/home/firefox/usercss/tab-separator-lines.css23
-rw-r--r--share/home/firefox/usercss/unified-extensions-view.css46
-rw-r--r--share/home/git.nix12
-rw-r--r--share/home/helix.nix42
-rw-r--r--share/home/hyprland.nix65
-rw-r--r--share/home/kitty.nix26
-rw-r--r--share/home/wezterm/config.lua62
-rw-r--r--share/home/wezterm/default.nix10
-rw-r--r--share/home/wpaperd.nix15
-rw-r--r--share/home/zsh.nix72
-rw-r--r--share/nixos-modules/iwd-ext.nix106
-rw-r--r--share/nixos-modules/nix-config.nix15
-rw-r--r--share/system/hyprland.nix6
-rw-r--r--share/system/spotifyd.nix13
-rw-r--r--share/system/steam.nix24
23 files changed, 847 insertions, 0 deletions
diff --git a/share/hm-modules/wpaperd.nix b/share/hm-modules/wpaperd.nix
new file mode 100644
index 0000000..c38da21
--- /dev/null
+++ b/share/hm-modules/wpaperd.nix
@@ -0,0 +1,74 @@
+{ config, lib, pkgs, ... }:
+with lib;
+let
+ cfg = config.services.wpaperd;
+ tomlFormat = pkgs.formats.toml { };
+in
+{
+ options.services.wpaperd = {
+ enable = mkEnableOption "enable wpaperd";
+
+ package = mkOption {
+ default = pkgs.wpaperd;
+ defaultText = literalExpression "pkgs.wpaperd";
+ type = types.package;
+ example = literalExpression "pkgs.wpaperd";
+ description = "The package to use for the wpaperd binary.";
+ };
+
+ settings = mkOption {
+ type = tomlFormat.type;
+ description = ''
+ Configuration for wpaperd. Options are specified on:
+ https://github.com/danyspin97/wpaperd#wallpaper-configuration
+ '';
+ example = literalExpression ''
+ {
+ default = {
+ path = "/home/myusername/Pictures/Wallpapers/";
+ duration = "10m"
+ sorting = "random";
+ };
+ }
+ '';
+ };
+
+ systemdTarget = mkOption {
+ type = types.str;
+ default = "hyprland-session.target";
+ description = ''
+ Systemd target to bind to.
+ Note: if you're using home-manager to configure hyprland, you want to
+ have `wayland.windowManager.hyprland.systemdIntegration` enabled.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ assertions = [
+ (hm.assertions.assertPlatform "services.wpaperd" pkgs platforms.linux)
+ ];
+
+ home.packages = [ cfg.package ];
+
+ xdg.configFile = {
+ "wpaperd/wallpaper.toml" = mkIf (cfg.settings != { }) {
+ source = tomlFormat.generate "wpaperd-config" cfg.settings;
+ };
+ };
+
+ systemd.user.services.wpaperd = {
+ Unit = {
+ Description = "Wallpaper daemon for Wayland";
+ BindsTo = [ cfg.systemdTarget ];
+ };
+
+ Service = {
+ Type = "simple";
+ ExecStart = "${cfg.package}/bin/wpaperd --no-daemon";
+ };
+
+ Install.WantedBy = [ cfg.systemdTarget ];
+ };
+ };
+}
diff --git a/share/home/default.nix b/share/home/default.nix
new file mode 100644
index 0000000..f1ecf45
--- /dev/null
+++ b/share/home/default.nix
@@ -0,0 +1,64 @@
+# Minimal home configuration containing everything that I want on all of
+# my machines
+{ pkgs, config, ... }: {
+ imports = [ ./helix.nix ./zsh.nix ];
+
+ home.packages = with pkgs; [
+ xclip
+ wget
+ hunspell
+ hunspellDicts.en_US
+ hunspellDicts.hr_HR
+ ripgrep
+ git
+ age
+ gnupg
+ xh
+ fd
+ sd
+ bc # CLI calculator
+ ffmpeg
+ amfora # Gemini CLI browser
+ trashy # Trash CLI
+
+ # Useful nix tooling
+ nix-tree
+ ];
+
+ programs.direnv = {
+ enable = true;
+ nix-direnv.enable = true;
+ };
+
+ xdg = {
+ enable = true;
+ systemDirs.data =
+ let
+ gds = pkgs.gsettings-desktop-schemas;
+ gtk3 = pkgs.gtk3;
+ in
+ [
+ "${gds}/share/gsettings-schemas/${gds.name}"
+ "${gtk3}/share/gsettings-schemas/${gtk3.name}"
+ ];
+ userDirs = {
+ enable = true;
+ createDirectories = true;
+ };
+ };
+
+ # Lots of these are courtesy of xdg-ninja
+ # https://github.com/b3nj5m1n/xdg-ninja
+ home.sessionVariables = with config.xdg; {
+ CARGO_HOME = "${dataHome}/cargo";
+ GOPATH = "${dataHome}/go";
+ WINEPREFIX = "${dataHome}/wine";
+ XCOMPOSECACHE = "${cacheHome}/X11/xcompose";
+ GTK2_RC_FILES = "${configHome}/gtk-2.0/gtkrc";
+ NODE_REPL_HISTORY = "${dataHome}/node_repl_history";
+ NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc";
+ # shell
+ HISTFILE = "${stateHome}/shell/history";
+ ZDOTDIR = "${configHome}/zsh";
+ };
+}
diff --git a/share/home/eww/config/eww.scss b/share/home/eww/config/eww.scss
new file mode 100644
index 0000000..8172b28
--- /dev/null
+++ b/share/home/eww/config/eww.scss
@@ -0,0 +1,13 @@
+* {
+ all: unset; // Unsets everything so you can style everything from scratch
+}
+
+.bar {
+ background-color: #3a3a3a;
+ color: #fff;
+}
+
+.workspaces {
+ font-size: 1.5em;
+}
+
diff --git a/share/home/eww/config/eww.yuck b/share/home/eww/config/eww.yuck
new file mode 100644
index 0000000..0f27d9f
--- /dev/null
+++ b/share/home/eww/config/eww.yuck
@@ -0,0 +1,54 @@
+(defwidget bar []
+ (centerbox :orientation "v"
+ (workspaces)
+ "test"
+ (battery)))
+
+(defwidget workspace-btn [n ?icon]
+ (button :onclick "hyprctl dispatch 'workspace ${n}'"
+ :halign "baseline"
+ :hexpand true
+ "${icon ?: n}"))
+
+(defwidget workspaces []
+ (box :class "workspaces"
+ :orientation "v"
+ :space-evenly true
+ :valign "start"
+ :halign "center"
+ (workspace-btn :n 1 :icon "")
+ (workspace-btn :n 2 :icon "")
+ (workspace-btn :n 3 :icon "󰈹")
+ (workspace-btn :n 4 :icon "󰭹")
+ (workspace-btn :n 5 :icon "")
+ (workspace-btn :n 6 :icon "")
+ (workspace-btn :n 7 :icon "")
+ (workspace-btn :n 8 :icon "")
+ (workspace-btn :n 9 :icon "")))
+
+(defwidget battery []
+ (metric :label "󰁹"
+ :value {EWW_BATTERY}
+ :onchange ""))
+
+(defwidget metric [label value onchange]
+ (box :orientation "v"
+ :class "metric"
+ :space-evenly false
+ (box :class "label" label)
+ (scale :min 0
+ :max 101
+ :active {onchange != ""}
+ :value value
+ :onchange onchange)))
+
+(defwindow bar
+ :monitor 0
+ :geometry (geometry :width "1.25%"
+ :height "98%"
+ :anchor "right center")
+ :stacking "fg"
+ :windowtype "dock"
+ :exclusive true
+ (bar))
+
diff --git a/share/home/eww/default.nix b/share/home/eww/default.nix
new file mode 100644
index 0000000..63fe356
--- /dev/null
+++ b/share/home/eww/default.nix
@@ -0,0 +1,7 @@
+{ pkgs, ... }: {
+ programs.eww = {
+ enable = true;
+ configDir = ./config;
+ package = pkgs.eww-wayland; # If you're using x11, delete this
+ };
+}
diff --git a/share/home/firefox/default.nix b/share/home/firefox/default.nix
new file mode 100644
index 0000000..f1ee260
--- /dev/null
+++ b/share/home/firefox/default.nix
@@ -0,0 +1,62 @@
+{ pkgs, ... }:
+let
+ # Concatenate all files in the `./usercss` directory into one string
+ css-files =
+ map (n: ./usercss/${n}) (builtins.attrNames (builtins.readDir ./usercss));
+ userChrome = builtins.concatStringsSep "\n" (map builtins.readFile css-files);
+in
+{
+ programs.firefox = {
+ enable = true;
+ profiles = {
+ alice = {
+ name = "alice";
+ isDefault = true;
+ inherit userChrome;
+
+ search = {
+ default = "DuckDuckGo";
+ engines = {
+ "Nix Packages" = {
+ 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";
+ definedAliases = [ "@np" ];
+ };
+
+ "NixOS Wiki" = {
+ urls = [{
+ template = "https://nixos.wiki/index.php?search={searchTerms}";
+ }];
+ iconUpdateURL = "https://nixos.wiki/favicon.png";
+ updateInterval = 24 * 60 * 60 * 1000; # every day
+ definedAliases = [ "@nw" ];
+ };
+
+ "Bing".metaData.hidden = true;
+ # builtin engines only support specifying one additional alias
+ "Google".medaData.alias = "@g";
+ };
+ }; # end of search
+
+ settings = {
+ "browser.compactmode.show" = true;
+ "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
+ };
+ }; # end of alice (profile)
+ }; # end of profiles
+ };
+}
diff --git a/share/home/firefox/usercss/compact-about-config.css b/share/home/firefox/usercss/compact-about-config.css
new file mode 100644
index 0000000..55e30f7
--- /dev/null
+++ b/share/home/firefox/usercss/compact-about-config.css
@@ -0,0 +1,24 @@
+/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/content/compact_about_config.css made available under Mozilla Public License v. 2.0
+See the above repository for updates as well as full license text. */
+
+/* Makes about:config list more compact */
+
+@-moz-document url("about:config"){
+ .button-delete,
+ .button-edit,
+ .button-reset,
+ .button-save,
+ .button-toggle{
+ margin-block: 1px !important;
+ padding-block: 11px 0 !important;
+ padding-inline: 0 !important;
+ min-height: 22px !important;
+ width: 22px !important;
+ outline-offset: 0 !important;
+ }
+ .cell-edit{ width: 28px !important; }
+ form > input,
+ tr:not(.add) > th,
+ tr:not(.add) > .cell-value{ padding-block: 0 !important; }
+ tr:not(:hover) .semi-transparent:not(.primary,.button-add){ background-color: transparent !important; }
+}
diff --git a/share/home/firefox/usercss/context-menu.css b/share/home/firefox/usercss/context-menu.css
new file mode 100644
index 0000000..0bf5749
--- /dev/null
+++ b/share/home/firefox/usercss/context-menu.css
@@ -0,0 +1,12 @@
+/*** Remove items from image context menu ***/
+#context-sendimage, /* Email image */
+#context-inspect-a11y,
+#context-savelinktopocket,
+#context-pocket,
+#context-savepage,
+#context-print-selection, /* Print selected text */
+#context-selectall,
+#context-sep-selectall /* Seperator bar */
+{
+ display: none !important;
+}
diff --git a/share/home/firefox/usercss/tab-separator-lines.css b/share/home/firefox/usercss/tab-separator-lines.css
new file mode 100644
index 0000000..2f77db4
--- /dev/null
+++ b/share/home/firefox/usercss/tab-separator-lines.css
@@ -0,0 +1,23 @@
+/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/tab_separator_lines.css made available under Mozilla Public License v. 2.0
+See the above repository for updates as well as full license text. */
+
+/* Bring back tab separator lines that were removed in Proton */
+
+.tabbrowser-tab{
+ border-inline-start: 1px solid transparent !important;
+ border-image: 0 1 linear-gradient(
+ transparent 20%,
+ color-mix(in srgb, currentColor 20%, transparent) 20%,
+ color-mix(in srgb, currentColor 20%, transparent) 80%,
+ transparent 80%
+ ) !important;
+}
+
+.tabbrowser-tab:hover,
+#tabbrowser-tabs:not([movingtab]) .tabbrowser-tab:hover + .tabbrowser-tab:not([first-visible-unpinned-tab]),
+.tabbrowser-tab:first-child,
+.tabbrowser-tab[selected],
+.tabbrowser-tab[multiselected],
+#tabbrowser-arrowscrollbox[overflowing] > .tabbrowser-tab[first-visible-unpinned-tab],
+#tabbrowser-tabs:not([movingtab]) .tabbrowser-tab[multiselected] + .tabbrowser-tab,
+#tabbrowser-tabs:not([movingtab]) .tabbrowser-tab[selected] + .tabbrowser-tab { border-image: none !important; } \ No newline at end of file
diff --git a/share/home/firefox/usercss/unified-extensions-view.css b/share/home/firefox/usercss/unified-extensions-view.css
new file mode 100644
index 0000000..876a7d0
--- /dev/null
+++ b/share/home/firefox/usercss/unified-extensions-view.css
@@ -0,0 +1,46 @@
+/*** Clean and tight extensions menu ***/
+#unified-extensions-view {
+ --uei-icon-size: 20px;
+}
+
+#unified-extensions-view .panel-header,
+#unified-extensions-view .panel-header + toolbarseparator,
+#unified-extensions-view .panel-subview-body + toolbarseparator,
+#unified-extensions-view #unified-extensions-manage-extensions {
+ display:none !important;
+}
+
+#unified-extensions-view .unified-extensions-item-menu-button.subviewbutton {
+ visibility: hidden !important;
+ transition: 300ms !important;
+ -moz-margin-end: -3.6em !important;
+}
+
+#unified-extensions-view .panel-subview-body {
+ padding-top: 8px !important;
+ padding-bottom: 8px !important;
+}
+
+#unified-extensions-view:hover
+.unified-extensions-item-menu-button.subviewbutton {
+ visibility: visible !important;
+ transition: 300ms !important;
+ -moz-margin-end: initial !important;
+}
+
+#unified-extensions-view .unified-extensions-item .unified-extensions-item-icon,
+#unified-extensions-view .unified-extensions-item .toolbarbutton-badge-stack {
+ margin-inline-end: 2px !important;
+}
+
+#unified-extensions-view .unified-extensions-item-name,
+#unified-extensions-view .unified-extensions-item-message {
+ padding-inline-start: 0.5em !important;
+ width: 21em !important;
+}
+
+#unified-extensions-view .unified-extensions-item-action-button.subviewbutton {
+ padding-top: 2px !important;
+ padding-bottom: 2px !important;
+}
+
diff --git a/share/home/git.nix b/share/home/git.nix
new file mode 100644
index 0000000..98cafa2
--- /dev/null
+++ b/share/home/git.nix
@@ -0,0 +1,12 @@
+{ ... }: {
+ programs.git = {
+ enable = true;
+ userEmail = "miran.bastaja04@gmail.com";
+ userName = "Miran Bastaja";
+ signing = {
+ key = "002426427AE095E093D51B3EF42E936D529F5760";
+ signByDefault = true;
+ };
+ delta.enable = true;
+ };
+}
diff --git a/share/home/helix.nix b/share/home/helix.nix
new file mode 100644
index 0000000..c7b7cad
--- /dev/null
+++ b/share/home/helix.nix
@@ -0,0 +1,42 @@
+{ pkgs, ... }: {
+ programs.helix = {
+ enable = true;
+ defaultEditor = true;
+
+ extraPackages = with pkgs; [
+ rust-analyzer
+ rustfmt
+ nil
+ nixfmt
+ python311Packages.python-lsp-server
+ clang-tools
+ black
+ ];
+
+ settings = {
+ theme = "tokyonight";
+ editor = {
+ line-number = "relative";
+ cursor-shape = {
+ insert = "bar";
+ normal = "block";
+ select = "underline";
+ };
+ whitespace.render = {
+ space = "all";
+ tab = "all";
+ newline = "none";
+ };
+ whitespace.characters = {
+ space = "·";
+ nbsp = "⍽";
+ tab = "→";
+ newline = "⏎";
+ tabpad = "·"; # Tabs will look like "→···" (depending on tab width)
+ };
+ cursorline = true;
+ lsp.display-messages = true;
+ };
+ };
+ };
+}
diff --git a/share/home/hyprland.nix b/share/home/hyprland.nix
new file mode 100644
index 0000000..63d5d77
--- /dev/null
+++ b/share/home/hyprland.nix
@@ -0,0 +1,65 @@
+# IMPORTANT: this module requires the system to already have `programs.hyprland`
+# enabled. You can enable it by importing `share/system/hyprland.nix`
+{ pkgs, ... }: {
+ imports = [ ./kitty.nix ./wpaperd.nix ./eww ];
+
+ wayland.windowManager.hyprland = {
+ enable = true;
+ extraConfig = ''
+ $mod = SUPER
+
+ bind = $mod SHIFT, Return, exec, kitty
+
+ general {
+ layout = master
+ }
+
+ master {
+ mfact = 0.5
+ new_is_master = false
+ }
+
+ # 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)}
+
+ bind = $mod SHIFT, C, killactive
+ bind = $mod SHIFT, F, togglefloating
+ bind = $mod SHIFT, Q, exit
+ bind = $mod, P, exec, rofi -show run
+
+ bind = $mod, H, cyclenext, prev
+ bind = $mod, L, cyclenext
+ bind = $mod SHIFT, H, swapnext, prev
+ bind = $mod SHIFT, L, swapnext
+
+ # audio control
+ binde =, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ --limit 1.0 5%+
+ binde =, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ --limit 1.0 5%-
+ bind =, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
+
+ # monitor brightness control
+ binde =, XF86MonBrightnessUp, exec, brightnessctl set +5%
+ binde =, XF86MonBrightnessDown, exec, brightnessctl set 5%-
+
+ input {
+ # focus change on cursor move
+ follow_mouse = 1
+ accel_profile = flat
+ }
+ monitor=,preferred,auto,1
+
+ # set opacity to 0.9 active and 0.5 inactive for kitty
+ windowrule = opacity 0.9 override 0.5 override,^(kitty)$
+ '';
+ };
+
+ home.packages = with pkgs; [ brightnessctl wireplumber ];
+ services.dunst.enable = true;
+ programs.rofi.enable = true;
+}
diff --git a/share/home/kitty.nix b/share/home/kitty.nix
new file mode 100644
index 0000000..3cdc18b
--- /dev/null
+++ b/share/home/kitty.nix
@@ -0,0 +1,26 @@
+{ pkgs, ... }: {
+ programs.kitty = {
+ enable = true;
+ theme = "Mayukai";
+
+ font = {
+ package = pkgs.nerdfonts.override { fonts = [ "AnonymousPro" ]; };
+ name = "AnonymousPro";
+ size = 10;
+ };
+
+ settings = { cursor_shape = "beam"; };
+
+ keybindings = {
+ "ctrl+tab" = "new_tab";
+
+ "alt+1" = "goto_tab 1";
+ "alt+2" = "goto_tab 2";
+ "alt+3" = "goto_tab 3";
+ "alt+4" = "goto_tab 4";
+ "alt+5" = "goto_tab 5";
+ };
+ };
+
+ home.shellAliases = { s = "kitty +kitten ssh"; };
+}
diff --git a/share/home/wezterm/config.lua b/share/home/wezterm/config.lua
new file mode 100644
index 0000000..872a1aa
--- /dev/null
+++ b/share/home/wezterm/config.lua
@@ -0,0 +1,62 @@
+local wezterm = require 'wezterm'
+local act = wezterm.action
+local config = {}
+
+if wezterm.config_builder then
+ config = wezterm.config_builder()
+end
+
+config.color_scheme = 'Catppuccin Mocha'
+config.window_background_opacity = 0.9
+
+config.default_cursor_style = "SteadyBar"
+config.font = wezterm.font('Blex Mono Nerd Font')
+config.font_size = 9.5
+
+config.keys = {
+ -- Tab management
+ { key = '1', mods = 'ALT', action = act.ActivateTab(0) },
+ { key = '2', mods = 'ALT', action = act.ActivateTab(1) },
+ { key = '3', mods = 'ALT', action = act.ActivateTab(2) },
+ { key = '4', mods = 'ALT', action = act.ActivateTab(3) },
+ { key = '5', mods = 'ALT', action = act.ActivateTab(4) },
+ { key = '6', mods = 'ALT', action = act.ActivateTab(5) },
+ { key = '7', mods = 'ALT', action = act.ActivateTab(6) },
+ { key = '8', mods = 'ALT', action = act.ActivateTab(7) },
+ { key = 't', mods = 'CTRL|SHIFT', action = act.SpawnTab 'CurrentPaneDomain' },
+ { key = 'w', mods = 'CTRL|SHIFT', action = act.CloseCurrentTab{ confirm = true}},
+ { key = '{', mods = 'CTRL|SHIFT', action = act.MoveTabRelative(-1) },
+ { key = '}', mods = 'CTRL|SHIFT', action = act.MoveTabRelative(1) },
+
+ -- Split management
+ {
+ key = 'h',
+ mods = 'CTRL',
+ action = act.SplitHorizontal { domain = 'CurrentPaneDomain' },
+ },
+ {
+ key = 'v',
+ mods = 'CTRL',
+ action = act.SplitVertical { domain = 'CurrentPaneDomain' },
+ },
+ {
+ key = 'q',
+ mods = 'CTRL',
+ action = act.CloseCurrentPane { confirm = true },
+ },
+ -- Split movement
+ -- activate pane selection mode with the default alphabet (labels are "a", "s", "d", "f" and so on)
+ -- (j)ump to split
+ { key = 'j', mods = 'CTRL', action = act.PaneSelect },
+ -- show the pane selection mode, but have it swap the active and selected panes
+ -- (m)ove split
+ {
+ key = 'm',
+ mods = 'CTRL',
+ action = act.PaneSelect {
+ mode = 'SwapWithActive',
+ },
+ },
+}
+
+return config
diff --git a/share/home/wezterm/default.nix b/share/home/wezterm/default.nix
new file mode 100644
index 0000000..b06022b
--- /dev/null
+++ b/share/home/wezterm/default.nix
@@ -0,0 +1,10 @@
+{ pkgs, ... }: {
+ programs.wezterm = {
+ enable = true;
+ extraConfig = builtins.readFile ./config.lua;
+ };
+
+ fonts.fontconfig.enable = true;
+ home.packages = with pkgs;
+ [ (nerdfonts.override { fonts = [ "IBMPlexMono" ]; }) ];
+}
diff --git a/share/home/wpaperd.nix b/share/home/wpaperd.nix
new file mode 100644
index 0000000..d348c27
--- /dev/null
+++ b/share/home/wpaperd.nix
@@ -0,0 +1,15 @@
+# IMPORTANT: this is the config for a custom module that's located at
+# /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 {
+ services.wpaperd = {
+ enable = true;
+ settings.default = {
+ path = wallpapers-dir;
+ duration = "5m";
+ sorting = "random";
+ };
+ };
+}
diff --git a/share/home/zsh.nix b/share/home/zsh.nix
new file mode 100644
index 0000000..ef79acb
--- /dev/null
+++ b/share/home/zsh.nix
@@ -0,0 +1,72 @@
+{ pkgs, ... }: {
+ programs.zsh = {
+ enable = true;
+ enableAutosuggestions = true;
+ enableCompletion = true;
+ syntaxHighlighting.enable = true;
+ enableVteIntegration = true;
+ autocd = true;
+ dotDir = ".config/zsh";
+
+ shellAliases = {
+ battery-status = ''
+ upower -i $(upower -e | grep BAT) | grep -E "state|to full|percentage"
+ '';
+ ip = ''ip --color=auto'';
+ ltg = "ls --git --tree";
+ ltgi = "ltg --git-ignore";
+ sl = "sl -awFc5";
+ };
+ };
+ home.packages = with pkgs; [ sl ];
+
+ programs.eza = {
+ enable = true;
+ enableAliases = true;
+ icons = true;
+ extraOptions = [ "--header" "--group-directories-first" "--long" ];
+ };
+
+ programs.starship = {
+ enable = true;
+ enableZshIntegration = true;
+
+ # settings = let
+ # lightblue-bg = "bg:#769ff0";
+ # lightblue-fg = "fg:#e3e5e5";
+ # lightblue = "${lightblue-fg} ${lightblue-bg}";
+ # in {
+ # format = lib.concatStrings [
+ # "[░▒▓](#a3aed2)"
+ # "[$username @ $hostname](${lightblue})"
+ # "$directory"
+ # "$rust"
+ # "$package"
+ # "\n"
+ # "> "
+ # ];
+ #
+ # hostname = {
+ # ssh_only = false;
+ # format = "[$hostname]($style)";
+ # trim_at = ""; # disable trimming
+ # style = lightblue;
+ # };
+ #
+ # username = {
+ # show_always = true;
+ # format = "[$user]($style)";
+ # style_user = lightblue;
+ # style_root = "${lightblue-bg} fg:red bold";
+ # };
+ #
+ # directory = {
+ # format = "[ $path ]($style)";
+ # truncation_length = 3;
+ # truncation_symbol = "…/";
+ # };
+ # }; # end of settings
+ }; # end of programs.starship
+
+ programs.wezterm.enableZshIntegration = true;
+}
diff --git a/share/nixos-modules/iwd-ext.nix b/share/nixos-modules/iwd-ext.nix
new file mode 100644
index 0000000..ddf0494
--- /dev/null
+++ b/share/nixos-modules/iwd-ext.nix
@@ -0,0 +1,106 @@
+{ config, lib, pkgs, ... }:
+let
+ inherit (lib) mkEnableOption mkIf mkOption types recursiveUpdate;
+
+ cfg = config.networking.wireless.iwd-ext;
+ ini = pkgs.formats.ini { };
+ defaults = {
+ # without UseDefaultInterface, sometimes wlan0 simply goes AWOL with
+ # NetworkManager
+ # https://iwd.wiki.kernel.org/interface_lifecycle#interface_management_in_iwd
+ General.UseDefaultInterface = with config.networking.networkmanager;
+ (enable && (wifi.backend == "iwd"));
+ };
+ configFile = ini.generate "main.conf" (recursiveUpdate defaults cfg.settings);
+
+in
+{
+ options.networking.wireless.iwd-ext = {
+ enable = mkEnableOption (lib.mdDoc "iwd");
+
+ package = mkOption {
+ type = types.package;
+ default = pkgs.iwd;
+ defaultText = lib.literalExpression "pkgs.iwd";
+ description = lib.mdDoc ''
+ The iwd package to use
+ '';
+ };
+
+ settings = mkOption {
+ type = ini.type;
+ default = { };
+
+ example = {
+ Settings.AutoConnect = true;
+
+ Network = {
+ EnableIPv6 = true;
+ RoutePriorityOffset = 300;
+ };
+ };
+
+ description = lib.mdDoc ''
+ Options passed to iwd.
+ See [here](https://iwd.wiki.kernel.org/networkconfigurationsettings) for
+ supported options.
+ '';
+ };
+
+ networks = mkOption {
+ type = types.attrsOf ini.type;
+ default = { };
+ example = {
+ HomeNetwork = {
+ Security.PreSharedKey = "totallysecurepsk";
+ };
+ "@NETWORK_2_SSID@" = {
+ Security.PreSharedKey = "@NETWORK_2_PSK@";
+ };
+ };
+
+ description = lib.mdDoc ''
+ AttrSet of type SSID - iwd network INI config.
+ See [here](https://iwd.wiki.kernel.org/networkconfigurationsettings) for
+ supported options.
+ '';
+ };
+ }; # end of options.networking.wireless.iwd-ext
+
+ config = mkIf cfg.enable {
+ assertions = [
+ {
+ assertion = !config.networking.wireless.enable;
+ message = ''
+ Only one wireless daemon is allowed at the time:
+ networking.wireless.enable and networking.wireless.iwd-ext.enable are
+ mutually exclusive.
+ '';
+ }
+ {
+ assertion = !config.networking.iwd.enable;
+ message = ''
+ Only one wireless daemon is allowed at the time:
+ networking.wireless.iwd.enable and networking.wireless.iwd-ext.enable are
+ mutually exclusive.
+ '';
+ }
+ ];
+
+ environment.etc."iwd/${configFile.name}".source = configFile;
+
+ environment.systemPackages = [ cfg.package ]; # for iwctl
+ services.dbus.packages = [ cfg.package ];
+ systemd.packages = [ cfg.package ];
+
+ systemd.network.links."80-iwd" = {
+ matchConfig.Type = "wlan";
+ linkConfig.NamePolicy = "keep kernel";
+ };
+
+ systemd.services.iwd = {
+ wantedBy = [ "multi-user.target" ];
+ restartTriggers = [ configFile ];
+ };
+ };
+}
diff --git a/share/nixos-modules/nix-config.nix b/share/nixos-modules/nix-config.nix
new file mode 100644
index 0000000..9634bcf
--- /dev/null
+++ b/share/nixos-modules/nix-config.nix
@@ -0,0 +1,15 @@
+{ inputs, ... }: {
+ nix.settings = {
+ experimental-features = [ "nix-command" "flakes" ];
+ auto-optimise-store = true;
+
+ extra-substituters =
+ [ "https://helix.cachix.org" "https://hyprland.cachix.org" ];
+ extra-trusted-public-keys = [
+ "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
+ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
+ ];
+ };
+ nixpkgs.overlays =
+ [ inputs.helix.overlays.default inputs.hyprland.overlays.default ];
+}
diff --git a/share/system/hyprland.nix b/share/system/hyprland.nix
new file mode 100644
index 0000000..2e1c679
--- /dev/null
+++ b/share/system/hyprland.nix
@@ -0,0 +1,6 @@
+{ inputs, pkgs, ... }: {
+ programs.hyprland = {
+ enable = true;
+ package = inputs.hyprland.packages.${pkgs.system}.hyprland;
+ };
+}
diff --git a/share/system/spotifyd.nix b/share/system/spotifyd.nix
new file mode 100644
index 0000000..5e04898
--- /dev/null
+++ b/share/system/spotifyd.nix
@@ -0,0 +1,13 @@
+{ config, ... }:
+let secrets = config.sops.secrets;
+in {
+ services.spotifyd = {
+ enable = true;
+ settings.global = {
+ username_cmd = "cat ${secrets."spotify/username".path}";
+ password_cmd = "cat ${secrets."spotify/password".path}";
+ device_name = "nixos_${config.networking.hostName}";
+ device_type = "computer";
+ };
+ };
+}
diff --git a/share/system/steam.nix b/share/system/steam.nix
new file mode 100644
index 0000000..7137bfa
--- /dev/null
+++ b/share/system/steam.nix
@@ -0,0 +1,24 @@
+{ lib, ... }: {
+ programs.steam.enable = true;
+
+ nixpkgs.config = {
+ allowUnfreePredicate = pkg:
+ builtins.elem (lib.getName pkg) [
+ "steam"
+ "steam-original"
+ "steam-runtime"
+ ];
+ packageOverrides = pkgs: {
+ steam =
+ pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ libgdiplus ]; };
+ };
+ };
+
+ environment.sessionVariables = rec {
+ # Steam needs this to find Proton-GE
+ STEAM_EXTRA_COMPAT_TOOLS_PATHS =
+ "\${HOME}/.steam/root/compatibilitytools.d";
+ # note: this doesn't replace PATH, it just adds this to it
+ PATH = [ "\${XDG_BIN_HOME}" ];
+ };
+}