my nixos configuration
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

reorganization + theme + other random shit

Thunder a2716c5f 9c996035

+458 -226
+1
home/programs/default.nix
··· 3 3 ./swaync.nix 4 4 ./vicinae.nix 5 5 ./alacritty.nix 6 + ./loupe.nix 6 7 ]; 7 8 }
+43
home/programs/loupe.nix
··· 1 + { 2 + pkgs, 3 + lib, 4 + ... 5 + }: let 6 + inherit (lib) concatMapAttrs mergeAttrsList genAttrs; 7 + in { 8 + config = { 9 + home.packages = [pkgs.loupe]; 10 + 11 + xdg.mime.enable = true; 12 + 13 + xdg.mimeApps = { 14 + enable = true; 15 + defaultApplications = 16 + concatMapAttrs 17 + (app: list: genAttrs list (_: [app])) 18 + { 19 + "org.gnome.Loupe.desktop" = [ 20 + "application/postscript" 21 + "image/avif" 22 + "image/bmp" 23 + "image/gif" 24 + "image/gp2" 25 + "image/heic" 26 + "image/heif" 27 + "image/jpeg" 28 + "image/jpg" 29 + "image/jxl" 30 + "image/pjpeg" 31 + "image/png" 32 + "image/svg+xml" 33 + "image/tiff" 34 + "image/webp" 35 + "image/x-bmp" 36 + "image/x-png" 37 + "image/x-tga" 38 + "image/x-xpixmap" 39 + ]; 40 + }; 41 + }; 42 + }; 43 + }
+1
hosts/desktop/default.nix
··· 88 88 meow = { 89 89 fullSetup = true; 90 90 workstation.enable = true; 91 + rice = "minimal"; 91 92 92 93 boot.efi = true; 93 94
+1 -1
hosts/framework/default.nix
··· 138 138 height = 1920; 139 139 refresh = 120.0; 140 140 primary = true; 141 - scale = 1.5; 141 + scale = 1.6; 142 142 }; 143 143 }; 144 144
+2 -6
modules/workstation/environment/default.nix
··· 21 21 meow.workstation.displayManager = mkOpt (enum ["sddm" "gdm"]) "sddm" { 22 22 description = "Display manager (login screen) to install."; 23 23 }; 24 - 25 - # meow.workstation.xdgPortals = mkOpt (listOf package) [] { 26 - # description = "Do not touch, internal way of passing values."; 27 - # }; 28 24 }; 29 25 imports = [ 30 26 ./hyprland 31 27 ./niri 28 + ./waybar.nix 32 29 ]; 33 30 34 31 config = mkIf cfg (mkMerge [ ··· 47 44 package = lib.mkForce pkgs.kdePackages.sddm; 48 45 wayland = { 49 46 enable = true; 50 - # compositor = lib.mkForce "weston"; 51 47 }; 52 48 }; 53 49 ··· 73 69 } 74 70 ]; 75 71 }) 76 - (mkIf (builtins.elem "hyprland" envir) { 72 + (mkIf (builtins.elem "niri" envir) { 77 73 services.gvfs.enable = true; 78 74 79 75 systemd.user.services.polkit-gnome-authentication-agent-1 = {
-1
modules/workstation/environment/hyprland/default.nix
··· 26 26 }; 27 27 }; 28 28 imports = [ 29 - ./waybar.nix 30 29 ./nsxiv.nix 31 30 ./hyprlock.nix 32 31 ./anyrun.nix
+2 -3
modules/workstation/environment/hyprland/nsxiv.nix
··· 4 4 config, 5 5 ... 6 6 }: let 7 - inherit (lib) mkIf; 8 - inherit (builtins) elem; 7 + inherit (lib) mkIf elem listToAttrs; 9 8 10 9 work = config.meow.workstation.enable; 11 10 env = config.meow.workstation.environment; ··· 51 50 }; 52 51 xdg.mimeApps = { 53 52 enable = true; 54 - defaultApplications = builtins.listToAttrs (builtins.map 53 + defaultApplications = listToAttrs (map 55 54 (mime: { 56 55 name = mime; 57 56 value = ["nsxiv.desktop"];
-193
modules/workstation/environment/hyprland/waybar.nix
··· 1 - { 2 - mlib, 3 - lib, 4 - config, 5 - pkgs, 6 - ... 7 - }: let 8 - inherit (mlib) homeModule mkOpt; 9 - inherit (lib) mkIf; 10 - inherit (lib.types) listOf str attrsOf anything; 11 - inherit (lib.lists) unique elem; 12 - inherit (lib.attrsets) mapAttrs' mapAttrsToList filterAttrs attrNames; 13 - inherit (builtins) replaceStrings; 14 - 15 - work = config.meow.workstation.enable; 16 - env = config.meow.workstation.environment; 17 - in { 18 - options = { 19 - meow.workstation.waybarDiskFilter = 20 - mkOpt (listOf str) 21 - [] 22 - { 23 - description = "Mountpoints to filter out in waybar."; 24 - }; 25 - 26 - meow.workstation.extraWaybarModules = mkOpt (attrsOf anything) {} { 27 - description = "Extra modules to add to waybar."; 28 - }; 29 - }; 30 - 31 - config = mkIf (work && (elem "hyprland" env) || (elem "niri" env)) (homeModule { 32 - programs.waybar.settings = let 33 - diskName = name: 34 - if name == null 35 - then "NULL" 36 - else replaceStrings ["/"] ["_"] name; 37 - 38 - filterList = 39 - ["/boot"] 40 - ++ lib.lists.optional config.meow.impermanence.enable "/" 41 - ++ config.meow.workstation.waybarDiskFilter; 42 - 43 - fileSystems = 44 - filterAttrs (_: d: !elem d.mountPoint filterList) config.fileSystems; 45 - 46 - disks = 47 - mapAttrs' (n: v: { 48 - name = "disk#${diskName v.device}"; 49 - value = { 50 - interval = 30; 51 - format = " {path} {free}"; 52 - path = n; 53 - warning = 80; 54 - critical = 90; 55 - 56 - on-click = "xdg-open '${n}'"; 57 - }; 58 - }) 59 - fileSystems; 60 - in [ 61 - ({ 62 - layer = "top"; 63 - position = "top"; 64 - height = 36; 65 - spacing = 8; 66 - 67 - modules-left = ["hyprland/workspaces" "hyprland/window"]; 68 - modules-center = ["clock"]; 69 - 70 - "group/system" = { 71 - orientation = "horizontal"; 72 - modules = ["hyprland/language" "power-profiles-daemon" "idle_inhibitor" "custom/swaync" "pulseaudio" "battery" "tray"]; 73 - }; 74 - 75 - modules-right = 76 - unique (mapAttrsToList (_: fs: "disk#${replaceStrings ["/"] ["_"] fs.device}") 77 - fileSystems) 78 - ++ (attrNames config.meow.workstation.extraWaybarModules) 79 - ++ ["network"] 80 - ++ ["group/system"]; 81 - 82 - "hyprland/workspaces" = { 83 - format = "{icon}"; 84 - format-icons = { 85 - urgent = ""; 86 - active = ""; 87 - visible = ""; 88 - default = ""; 89 - empty = ""; 90 - }; 91 - disable-scroll = true; 92 - active-only = false; 93 - all-outputs = false; 94 - persistent-workspaces = {"*" = 9;}; 95 - }; 96 - 97 - "hyprland/window" = { 98 - format = "{title}"; 99 - max-length = 48; 100 - separate-outputs = true; 101 - empty-format = "Desktop"; 102 - }; 103 - 104 - clock = { 105 - interval = 1; 106 - timezone = "${config.time.timeZone}"; 107 - format = "{:%a, %d %b %H:%M}"; 108 - }; 109 - 110 - "hyprland/language" = { 111 - format = " {short}"; 112 - tooltip-format = "{long}"; 113 - }; 114 - 115 - idle_inhibitor = { 116 - format = "{icon}"; 117 - format-icons = { 118 - activated = ""; 119 - deactivated = ""; 120 - }; 121 - on-click = "hyprctl keyword misc:disable_autoreload 1"; # no-op you can replace 122 - }; 123 - 124 - "custom/swaync" = { 125 - tooltip = false; 126 - format = "{icon}"; 127 - "format-icons" = { 128 - notification = "<span foreground='red'><sup></sup></span>"; 129 - none = ""; 130 - "dnd-notification" = "<span foreground='red'><sup></sup></span>"; 131 - "dnd-none" = ""; 132 - "inhibited-notification" = "<span foreground='red'><sup></sup></span>"; 133 - "inhibited-none" = ""; 134 - "dnd-inhibited-notification" = "<span foreground='red'><sup></sup></span>"; 135 - "dnd-inhibited-none" = ""; 136 - }; 137 - "return-type" = "json"; 138 - exec = "swaync-client -swb"; 139 - "on-click" = "swaync-client -t -sw"; 140 - "on-click-right" = "swaync-client -d -sw"; 141 - escape = true; 142 - }; 143 - 144 - power-profiles-daemon = { 145 - format = " {icon} "; 146 - tooltip-format = "Profile: {profile}\nDriver: {driver}"; 147 - tooltip = true; 148 - format-icons = { 149 - default = "󰚥"; 150 - performance = "󰚥"; 151 - balanced = ""; 152 - power-saver = ""; 153 - }; 154 - }; 155 - 156 - network = { 157 - format-wifi = " {essid} ({signalStrength}%)"; 158 - format-ethernet = "󰈀 {ifname}: {ipaddr}/{cidr}"; 159 - format-linked = "No Internet ⚠"; 160 - format-disconnected = " Disconnected"; 161 - tooltip-format = "{ifname} {ipaddr}/{cidr}\n{gwaddr}"; 162 - }; 163 - 164 - pulseaudio = { 165 - scroll-step = 3; 166 - format = "{icon} {volume}%"; 167 - format-muted = "󰝟 Muted"; 168 - format-bluetooth = "{icon} {volume}% "; 169 - format-bluetooth-muted = " Muted "; 170 - format-icons = {default = ["" "" ""];}; 171 - escape = true; 172 - on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; 173 - }; 174 - 175 - battery = { 176 - states = { 177 - warning = 30; 178 - critical = 15; 179 - }; 180 - format = "{icon} {capacity}% ({time})"; 181 - format-charging = " {capacity}% ({time})"; 182 - format-plugged = " {capacity}%"; 183 - format-alt = "{capacity}%"; 184 - format-icons = ["" "" "" "" ""]; 185 - }; 186 - 187 - tray = {spacing = 10;}; 188 - } 189 - // disks 190 - // config.meow.workstation.extraWaybarModules) 191 - ]; 192 - }); 193 - }
+1 -1
modules/workstation/environment/niri/default.nix
··· 36 36 37 37 home.packages = [ 38 38 pkgs.nautilus 39 - pkgs.eog 39 + pkgs.loupe 40 40 pkgs.file-roller 41 41 pkgs.blueman 42 42 ];
+116
modules/workstation/environment/waybar.nix
··· 1 + { 2 + mlib, 3 + lib, 4 + config, 5 + pkgs, 6 + ... 7 + }: let 8 + inherit (mlib) homeModule mkOpt; 9 + inherit (lib) mkIf; 10 + inherit (lib.types) listOf str attrsOf anything; 11 + inherit (lib.lists) unique elem; 12 + inherit (lib.attrsets) mapAttrs' mapAttrsToList filterAttrs attrNames; 13 + inherit (builtins) replaceStrings; 14 + 15 + work = config.meow.workstation.enable; 16 + env = config.meow.workstation.environment; 17 + in { 18 + options = { 19 + meow.workstation.waybarDiskFilter = 20 + mkOpt (listOf str) 21 + [] 22 + { 23 + description = "Mountpoints to filter out in waybar."; 24 + }; 25 + 26 + meow.workstation.waybarDiskFormat = mkOpt str "{path} {free}" { 27 + description = "Set the format for disks."; 28 + }; 29 + 30 + meow.workstation.extraWaybarModules = mkOpt (attrsOf anything) {} { 31 + description = "Extra modules to add to waybar."; 32 + }; 33 + }; 34 + 35 + config = mkIf (work && (elem "niri" env)) (homeModule { 36 + programs.waybar.settings = let 37 + diskName = name: 38 + if name == null 39 + then "NULL" 40 + else replaceStrings ["/"] ["_"] name; 41 + 42 + filterList = 43 + ["/boot"] 44 + ++ lib.lists.optional config.meow.impermanence.enable "/" 45 + ++ config.meow.workstation.waybarDiskFilter; 46 + 47 + fileSystems = 48 + filterAttrs (_: d: !elem d.mountPoint filterList) config.fileSystems; 49 + 50 + disks = 51 + mapAttrs' (n: v: { 52 + name = "disk#${diskName v.device}"; 53 + value = { 54 + interval = 30; 55 + format = config.meow.workstation.waybarDiskFormat; 56 + path = n; 57 + warning = 80; 58 + critical = 90; 59 + 60 + on-click = "xdg-open '${n}'"; 61 + }; 62 + }) 63 + fileSystems; 64 + in { 65 + main = 66 + { 67 + modules-left = []; 68 + modules-center = ["clock"]; 69 + 70 + "group/system" = { 71 + orientation = "horizontal"; 72 + modules = ["power-profiles-daemon" "custom/swaync" "pulseaudio" "battery" "tray"]; 73 + }; 74 + 75 + modules-right = 76 + unique (mapAttrsToList (_: fs: "disk#${replaceStrings ["/"] ["_"] fs.device}") 77 + fileSystems) 78 + ++ (attrNames config.meow.workstation.extraWaybarModules) 79 + ++ ["network"] 80 + ++ ["group/system"]; 81 + 82 + clock = { 83 + interval = 1; 84 + timezone = "${config.time.timeZone}"; 85 + format = "{:%a, %d %b %H:%M}"; 86 + }; 87 + 88 + "custom/swaync" = { 89 + tooltip = false; 90 + "return-type" = "json"; 91 + exec = "swaync-client -swb"; 92 + "on-click" = "swaync-client -t -sw"; 93 + "on-click-right" = "swaync-client -d -sw"; 94 + escape = true; 95 + }; 96 + 97 + pulseaudio = { 98 + scroll-step = 3; 99 + escape = true; 100 + on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; 101 + }; 102 + 103 + battery = { 104 + states = { 105 + warning = 30; 106 + critical = 15; 107 + }; 108 + }; 109 + 110 + tray = {spacing = 10;}; 111 + } 112 + // disks 113 + // config.meow.workstation.extraWaybarModules; 114 + }; 115 + }); 116 + }
+2 -1
modules/workstation/rice/default.nix
··· 8 8 inherit (lib.types) enum; 9 9 in { 10 10 options = { 11 - meow.rice = mkOpt (enum ["glass" "none"]) "glass" { 11 + meow.rice = mkOpt (enum ["glass" "minimal" "none"]) "glass" { 12 12 description = "Theme to install"; 13 13 }; 14 14 }; 15 15 16 16 imports = [ 17 17 ./glass 18 + ./minimal 18 19 ]; 19 20 }
+4 -20
modules/workstation/rice/glass/default.nix
··· 1 1 { 2 2 lib, 3 3 config, 4 - pkgs, 5 4 ... 6 5 }: let 7 6 inherit (lib) mkIf mkForce; 8 - inherit (pkgs) replaceVars; 9 - 10 7 cfg = config.meow.rice; 11 8 in { 9 + imports = [ 10 + ./waybar.nix 11 + ]; 12 + 12 13 config = mkIf (cfg == "glass") { 13 14 meow.home.modules = [ 14 15 { 15 - catppuccin.waybar.enable = false; 16 - programs.waybar.style = let 17 - colors = config.meow.workstation.theme.palette.withHashtag; 18 - in 19 - replaceVars ./waybar.css { 20 - accent = colors.base0D; 21 - 22 - fg = colors.base05; 23 - border = colors.base02; 24 - borderHover = colors.base03; 25 - muted = colors.base04; 26 - warn = colors.base0A; 27 - danger = colors.base08; 28 - 29 - inherit (colors) base00 base01 base02; 30 - }; 31 - 32 16 programs.alacritty.settings = { 33 17 window = { 34 18 opacity = mkForce 0.88;
+113
modules/workstation/rice/glass/waybar.nix
··· 1 + { 2 + config, 3 + pkgs, 4 + lib, 5 + ... 6 + }: let 7 + inherit (pkgs) replaceVars; 8 + inherit (lib) mkIf; 9 + 10 + cfg = config.meow.rice; 11 + in { 12 + config = mkIf (cfg == "glass") { 13 + meow.workstation.waybarDiskFormat = " {path} {free}"; 14 + 15 + meow.home.modules = [ 16 + { 17 + catppuccin.waybar.enable = false; 18 + programs.waybar.style = let 19 + colors = config.meow.workstation.theme.palette.withHashtag; 20 + in 21 + replaceVars ./waybar.css { 22 + accent = colors.base0D; 23 + 24 + fg = colors.base05; 25 + border = colors.base02; 26 + borderHover = colors.base03; 27 + muted = colors.base04; 28 + warn = colors.base0A; 29 + danger = colors.base08; 30 + 31 + inherit (colors) base00 base01 base02; 32 + }; 33 + 34 + programs.waybar.settings.main = { 35 + layer = "top"; 36 + position = "top"; 37 + height = 36; 38 + spacing = 8; 39 + 40 + "hyprland/workspaces" = { 41 + format = "{icon}"; 42 + format-icons = { 43 + urgent = ""; 44 + active = ""; 45 + visible = ""; 46 + default = ""; 47 + empty = ""; 48 + }; 49 + }; 50 + "hyprland/language" = { 51 + format = " {short}"; 52 + }; 53 + "idle_inhibitor" = { 54 + format = "{icon}"; 55 + format-icons = { 56 + activated = ""; 57 + deactivated = ""; 58 + }; 59 + }; 60 + 61 + network = { 62 + format-wifi = " {essid} ({signalStrength}%)"; 63 + format-ethernet = "󰈀 {ifname}: {ipaddr}/{cidr}"; 64 + format-linked = "No Internet ⚠"; 65 + format-disconnected = " Disconnected"; 66 + tooltip-format = "{ifname} {ipaddr}/{cidr}\n{gwaddr}"; 67 + }; 68 + 69 + "custom/swaync" = { 70 + format = "{icon}"; 71 + "format-icons" = { 72 + notification = "<span foreground='red'><sup></sup></span>"; 73 + none = ""; 74 + "dnd-notification" = "<span foreground='red'><sup></sup></span>"; 75 + "dnd-none" = ""; 76 + "inhibited-notification" = "<span foreground='red'><sup></sup></span>"; 77 + "inhibited-none" = ""; 78 + "dnd-inhibited-notification" = "<span foreground='red'><sup></sup></span>"; 79 + "dnd-inhibited-none" = ""; 80 + }; 81 + }; 82 + 83 + pulseaudio = { 84 + format = "{icon} {volume}%"; 85 + format-muted = "󰝟 Muted"; 86 + format-bluetooth = "{icon} {volume}% "; 87 + format-bluetooth-muted = " Muted "; 88 + format-icons = {default = ["" "" ""];}; 89 + }; 90 + 91 + power-profiles-daemon = { 92 + format = " {icon} "; 93 + tooltip-format = "Profile: {profile}\nDriver: {driver}"; 94 + tooltip = true; 95 + format-icons = { 96 + default = "󰚥"; 97 + performance = "󰚥"; 98 + balanced = ""; 99 + power-saver = ""; 100 + }; 101 + }; 102 + 103 + battery = { 104 + format = "{icon} {capacity}% ({time})"; 105 + format-charging = " {capacity}% ({time})"; 106 + format-plugged = " {capacity}%"; 107 + format-icons = ["" "" "" "" ""]; 108 + }; 109 + }; 110 + } 111 + ]; 112 + }; 113 + }
+33
modules/workstation/rice/minimal/default.nix
··· 1 + { 2 + lib, 3 + config, 4 + ... 5 + }: let 6 + inherit (lib) mkIf mkForce; 7 + cfg = config.meow.rice; 8 + in { 9 + imports = [ 10 + ./waybar.nix 11 + ]; 12 + 13 + config = mkIf (cfg == "glass") { 14 + meow.home.modules = [ 15 + { 16 + programs.alacritty.settings = { 17 + window = { 18 + opacity = mkForce 1.0; 19 + padding = { 20 + x = 12; 21 + y = 12; 22 + }; 23 + dynamic_padding = true; 24 + }; 25 + 26 + colors = { 27 + transparent_background_colors = false; 28 + }; 29 + }; 30 + } 31 + ]; 32 + }; 33 + }
+55
modules/workstation/rice/minimal/waybar.css
··· 1 + @define-color fg @fg@; 2 + @define-color bg @bg@; 3 + @define-color inactive @inactive@; 4 + @define-color accent @accent@; 5 + 6 + * { 7 + border: none; 8 + border-radius: 0; 9 + font-family: monospace, "Symbols Nerd Font", sans-serif; 10 + font-size: 13px; 11 + font-weight: normal; 12 + min-height: 0; 13 + margin: 0; 14 + padding: 0; 15 + box-shadow: none; 16 + } 17 + 18 + window#waybar { 19 + background: @bg; 20 + color: @fg; 21 + } 22 + 23 + widget > * { 24 + background: transparent; 25 + } 26 + 27 + /* Window title formatting */ 28 + #window { 29 + background: @accent; 30 + color: @bg; 31 + padding: 0 8px; 32 + } 33 + 34 + /* Remove the colored highlight if there is no active window */ 35 + #window.empty { 36 + background: transparent; 37 + padding: 0; 38 + } 39 + 40 + .modules-right > widget > * { 41 + padding: 0; 42 + } 43 + 44 + #tray { 45 + padding: 0 4px; 46 + } 47 + 48 + tooltip { 49 + background: @bg; 50 + border: 1px solid @inactive; 51 + border-radius: 0; 52 + } 53 + tooltip label { 54 + color: @fg; 55 + }
+84
modules/workstation/rice/minimal/waybar.nix
··· 1 + { 2 + config, 3 + pkgs, 4 + lib, 5 + ... 6 + }: let 7 + inherit (pkgs) replaceVars; 8 + inherit (lib) mkIf mkForce; 9 + 10 + cfg = config.meow.rice; 11 + in { 12 + config = mkIf (cfg == "minimal") { 13 + meow.workstation.waybarDiskFormat = "{path} {free}"; 14 + 15 + meow.home.modules = [ 16 + { 17 + catppuccin.waybar.enable = false; 18 + programs.waybar.style = let 19 + colors = config.meow.workstation.theme.palette.withHashtag; 20 + in 21 + replaceVars ./waybar.css { 22 + accent = colors.base0D; 23 + bg = colors.base00; 24 + fg = colors.base05; 25 + inactive = colors.base03; 26 + }; 27 + 28 + programs.waybar.settings.main = { 29 + layer = "top"; 30 + position = "top"; 31 + height = 24; 32 + spacing = 0; 33 + 34 + modules-left = mkForce ["niri/window"]; 35 + modules-center = mkForce []; 36 + modules-right = mkForce [ 37 + "network" 38 + "pulseaudio" 39 + "battery" 40 + "tray" 41 + "clock" 42 + ]; 43 + 44 + "niri/window" = { 45 + format = " {title}"; 46 + # DWM title expands, so we can remove max-length or set it very high 47 + max-length = 200; 48 + }; 49 + 50 + clock = { 51 + # Separator baked into the format 52 + format = mkForce " | {:%a %d %b %H:%M}"; 53 + }; 54 + 55 + network = { 56 + format-wifi = "W: {signalStrength}%"; 57 + format-ethernet = "E: {ipaddr}"; 58 + format-disconnected = "No Net"; 59 + }; 60 + 61 + pulseaudio = { 62 + # next to tray 63 + format = " | V: {volume}% | "; 64 + format-muted = " | V: Mute | "; 65 + }; 66 + 67 + battery = { 68 + format = " | B: {capacity}%"; 69 + format-charging = " | C: {capacity}%"; 70 + format-plugged = " | P: {capacity}%"; 71 + states = { 72 + warning = 30; 73 + critical = 15; 74 + }; 75 + }; 76 + 77 + tray = { 78 + spacing = mkForce 4; 79 + }; 80 + }; 81 + } 82 + ]; 83 + }; 84 + }