diff --git a/modules/mlaga97-home-manager/.gitignore b/modules/mlaga97-home-manager/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/modules/mlaga97-home-manager/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/modules/mlaga97-home-manager/README.md b/modules/mlaga97-home-manager/README.md new file mode 100644 index 0000000..7aca23d --- /dev/null +++ b/modules/mlaga97-home-manager/README.md @@ -0,0 +1,8 @@ +# Bootstrapping +``` +nix-shell -p git -p home-manager +cd .config +# git clone ssh://git@git.mlaga97.space:2222/mlaga97/home-manager +git clone https://git.mlaga97.space/mlaga97/home-manager +home-manager switch +``` \ No newline at end of file diff --git a/modules/mlaga97-home-manager/apply.sh b/modules/mlaga97-home-manager/apply.sh new file mode 100755 index 0000000..eba355e --- /dev/null +++ b/modules/mlaga97-home-manager/apply.sh @@ -0,0 +1 @@ +home-manager switch --flake .?submodules=1 -b backup diff --git a/modules/mlaga97-home-manager/assets/QtPass.conf b/modules/mlaga97-home-manager/assets/QtPass.conf new file mode 100644 index 0000000..fd0c8bf --- /dev/null +++ b/modules/mlaga97-home-manager/assets/QtPass.conf @@ -0,0 +1,36 @@ +[General] +addGPGId=true +alwaysOnTop=true +autoPull=true +autoPush=true +autoclearPanelSeconds=10 +autoclearSeconds=10 +avoidCapitals=false +avoidNumbers=false +clipBoardType=2 +gitExecutable=/home/lauren_lagarde/.nix-profile/bin/git +gpgExecutable=/home/lauren_lagarde/.nix-profile/bin/gpg2 +hideContent=false +hideOnClose=true +hidePassword=false +lessRandom=false +passExecutable=/run/current-system/sw/bin/pass +passStore=/home/lauren_lagarde/.password-store/ +passTemplate=login\nurl +passwordChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890~!@#$%^&*()_-+={}[]|:;<>,.?" +passwordCharsselection=0 +passwordLength=8 +pwgenExecutable=/run/current-system/sw/bin/pwgen +startMinimized=false +templateAllFields=false +useAutoclear=true +useAutoclearPanel=true +useGit=true +useOtp=true +usePass=true +usePwgen=true +useQrencode=false +useSelection=false +useSymbols=false +useTemplate=false +useTrayIcon=true diff --git a/modules/mlaga97-home-manager/assets/resetbluetooth.sh b/modules/mlaga97-home-manager/assets/resetbluetooth.sh new file mode 100644 index 0000000..4533f4f --- /dev/null +++ b/modules/mlaga97-home-manager/assets/resetbluetooth.sh @@ -0,0 +1,2 @@ +systemctl --user restart pipewire && sudo systemctl restart bluetooth +i3-msg restart diff --git a/modules/mlaga97-home-manager/base.nix b/modules/mlaga97-home-manager/base.nix new file mode 100644 index 0000000..7841b6c --- /dev/null +++ b/modules/mlaga97-home-manager/base.nix @@ -0,0 +1,12 @@ +{ ... }: { + home.stateVersion = "24.11"; + + imports = [ + ./programs/vim.nix + ./programs/gpg.nix + ]; + + # Self-hosting + programs.bash.enable = true; + programs.home-manager.enable = true; +} diff --git a/modules/mlaga97-home-manager/clear_secrets.sh b/modules/mlaga97-home-manager/clear_secrets.sh new file mode 100755 index 0000000..19d878b --- /dev/null +++ b/modules/mlaga97-home-manager/clear_secrets.sh @@ -0,0 +1 @@ +rm -rf ./secrets diff --git a/modules/mlaga97-home-manager/default.nix b/modules/mlaga97-home-manager/default.nix new file mode 100644 index 0000000..50510bf --- /dev/null +++ b/modules/mlaga97-home-manager/default.nix @@ -0,0 +1,7 @@ +(import ( + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/12c64ca55c1014cdc1b16ed5a804aa8576601ff2.tar.gz"; + sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5"; } +) { + src = ./.; +}).defaultNix diff --git a/modules/mlaga97-home-manager/flake.lock b/modules/mlaga97-home-manager/flake.lock new file mode 100644 index 0000000..c4f502e --- /dev/null +++ b/modules/mlaga97-home-manager/flake.lock @@ -0,0 +1,66 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744117652, + "narHash": "sha256-t7dFCDl4vIOOUMhEZnJF15aAzkpaup9x4ZRGToDFYWI=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "b4e98224ad1336751a2ac7493967a4c9f6d9cb3f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.11", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1744440957, + "narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1744463964, + "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/modules/mlaga97-home-manager/flake.nix b/modules/mlaga97-home-manager/flake.nix new file mode 100644 index 0000000..3bcfc54 --- /dev/null +++ b/modules/mlaga97-home-manager/flake.nix @@ -0,0 +1,60 @@ +{ + description = "Lauren's Home Manager Flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + + home-manager.url = "github:nix-community/home-manager/release-24.11"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { self, home-manager, nixpkgs, nixpkgs-unstable, ... }@inputs: let + system = "x86_64-linux"; + + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + pkgs-unstable = import nixpkgs-unstable { + inherit system; + }; + in { + # Enables all of these be used in a system flake + # https://discourse.nixos.org/t/nixos-home-manager-config-where-both-use-flakes/41410/2 + homeManagerModules = { + #inherit pkgs-unstable; #TODO: ???? + + "lauren_lagarde" = [ + { + home.username = "lauren_lagarde"; + home.homeDirectory = "/home/lauren_lagarde"; + } + ./base.nix + ]; + + "lauren_lagarde@ll-latitude-e5591" = self.homeManagerModules."lauren_lagarde" ++ [ + ./i3.nix + + ./secrets/dotspace.nix + ./secrets/dotspace_gui.nix + + ./systems/ll-latitude-e5591.nix + ]; + }; + + homeConfigurations = { + "lauren_lagarde" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = self.homeManagerModules."lauren_lagarde"; + extraSpecialArgs = { inherit inputs pkgs-unstable; }; + }; + + "lauren_lagarde@ll-latitude-e5591" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = self.homeManagerModules."lauren_lagarde@ll-latitude-e5591"; + extraSpecialArgs = { inherit inputs pkgs-unstable; }; + }; + }; + }; +} diff --git a/modules/mlaga97-home-manager/i3.nix b/modules/mlaga97-home-manager/i3.nix new file mode 100644 index 0000000..6f5057b --- /dev/null +++ b/modules/mlaga97-home-manager/i3.nix @@ -0,0 +1,278 @@ +{ lib, pkgs, ... }: { + imports = [ + ./programs/kitty.nix + ./programs/firefox.nix + ./programs/polybar.nix + ./programs/chromium.nix + ./programs/gnome-terminal.nix + ]; + + programs.browserpass.enable = true; + + home.packages = with pkgs; [ + feh + arandr + brightnessctl + pavucontrol + blueman + rofi + pinentry-qt + gnome-terminal + networkmanagerapplet + loupe + xorg.xkill + ]; + + home.file = { + ".config/IJHack/QtPass.conf".source = ./assets/QtPass.conf; + }; + + # picom --vsync --experimental-backend + xsession.windowManager.i3 = { + enable = true; + + config = { + bars = []; + keybindings = lib.mkForce {}; + }; + + extraConfig = '' + ################################################################################ + set $mod Mod4 + + # Font for window titles. + font pango:monospace 8 + + # Bar + exec_always --no-startup-id systemctl --user restart polybar + + # Background + #exec_always --no-startup-id feh --bg-scale $HOME/Archive/Multimedia/Pictures/Firewatch\ Wallpapers/3\ -\ NAQ0dTR.png + #exec_always --no-startup-id feh --bg-scale $HOME/Archive/Multimedia/Pictures/Other\ Wallpapers/EMwduGkh_o.png + #exec_always --no-startup-id feh --bg-scale $HOME/Archive/Multimedia/Pictures/Other\ Wallpapers/1345403996113.jpg + #exec_always --no-startup-id feh --bg-scale $HOME/tmp/backgrounds/dcrhoj0-e922ac66-5611-43af-a35e-e5068ab642c3.png + #exec_always --no-startup-id feh --bg-scale $HOME/Archive/Multimedia/Pictures/Wallpapers/ae4xtKY.jpg + + ################################################################################ + # Hardware Control + + # Desk Lights + bindsym $mod+Shift+d exec curl -X POST https://homeassistant.mlaga97.space/api/webhook/--caDGWR8KXLTM3yZ6Y01XPe6 + bindsym $mod+Shift+w exec curl -X POST https://homeassistant.mlaga97.space/api/webhook/-tbHkUPb8aLVcFaOQcXbBdIJb + bindsym $mod+Shift+o exec curl -X POST https://homeassistant.mlaga97.space/api/webhook/-fmYa59UtZaMXythyEsda_ulo + + # Network Manager + exec nm-applet + + # Allow gnome apps to prompt for password + #exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 & + + # Various gnome-settings-daemon helpers + exec --no-startup-id /usr/libexec/gsd-backlight-helper & + #exec --no-startup-id /usr/libexec/gsd-usb-protection & + #exec --no-startup-id /usr/libexec/gsd-sound & + #exec --no-startup-id /usr/libexec/gsd-disk-utility-notify & + #exec --no-startup-id /usr/libexec/gsd-power & + #exec --no-startup-id /usr/libexec/gsd-screensaver-proxy & + #exec --no-startup-id /usr/libexec/gsd-wacom & + #exec --no-startup-id /usr/libexec/gsd-xsettings & + #exec --no-startup-id /usr/libexec/gsd-printer & + #exec --no-startup-id /usr/libexec/gsd-sharing & + #exec --no-startup-id /usr/libexec/gsd-color & + #exec --no-startup-id /usr/libexec/gsd-wwan & + #exec --no-startup-id /usr/libexec/gsd-datetime & + #exec --no-startup-id /usr/libexec/gsd-wacom-oled-helper & + #exec --no-startup-id /usr/libexec/gsd-keyboard & + #exec --no-startup-id /usr/libexec/gsd-smartcard & + #exec --no-startup-id /usr/libexec/gsd-a11y-settings & + #exec --no-startup-id /usr/libexec/gsd-media-keys & + #exec --no-startup-id /usr/libexec/gsd-rfkill & + #exec --no-startup-id /usr/libexec/gsd-housekeeping & + #exec --no-startup-id /usr/libexec/gsd-print-notifications & + + # Screen Brightness Controls + bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5% + bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%- + + # Monitor Layout Controls + bindsym $mod+Control+d exec arandr + + # Pulse Audio Controls + bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +5% #increase sound volume + bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -5% #decrease sound volume + bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle # mute sound + + # Sound Device Control + bindsym $mod+Control+a exec pavucontrol + bindsym $mod+Control+b exec blueman-manager + + # Fast calculator + bindsym $mod+c exec rofi -theme solarized -font "ubuntu mono 16" -show calc -modi "calc:qalc +u8 -nocurrencies" + + ################################################################################ + # Session Management + + # Reload Config + bindsym $mod+Shift+c reload + + # Restart i3 In Place + bindsym $mod+Shift+r restart + + # Reload Monitors + bindsym $mod+Control+Mod1+Shift+x exec xrandr --auto --rate 30 + bindsym $mod+Control+Mod1+Shift+a exec autorandr --cycle + + # Lock Screen + #exec --no-startup-id xidlehook --not-when-fullscreen --not-when-audio --timer normal 30 ~/Applications/lock_then_off.sh + #bindsym $mod+Control+Mod1+Shift+l exec ~/Applications/lock_then_off.sh + bindsym $mod+Control+Mod1+Shift+l exec dm-tool lock + + # Logout + bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + + # Shutdown + bindsym $mod+Ctrl+Mod1+Shift+p exec "i3-nagbar -t warning -m 'Really Shutdown?' -b 'Yes' 'systemctl poweroff -i'" + + ################################################################################ + + # toggle fullscreen + bindsym $mod+f fullscreen toggle + + # Picture-in-Picture + bindsym $mod+p exec "i3-msg 'floating toggle; sticky toggle; resize shrink width 10000px; resize grow width 200px; resize shrink height 10000px; resize grow height 250px; move position 6950px 1750px;'" + + # change container layout (stacked, tabbed, toggle split) + bindsym $mod+s layout stacking + bindsym $mod+t layout tabbed + bindsym $mod+e layout toggle split + + # toggle floating + bindsym $mod+Shift+space floating toggle + + # change focus between tiling / floating windows + bindsym $mod+space focus mode_toggle + + # focus the parent container + bindsym $mod+a focus parent + + # Use Mouse+$mod to drag floating windows to their wanted position + floating_modifier $mod + + # resize mode + mode "resize" { + #bindsym j resize shrink width 10 px or 10 ppt + #bindsym k resize grow height 10 px or 10 ppt + #bindsym l resize shrink height 10 px or 10 ppt + #bindsym semicolon resize grow width 10 px or 10 ppt + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym Control+[ mode "default" + } + + bindsym $mod+r mode "resize" + + ################################################################################ + + # Terminal + bindsym $mod+Return exec kitty + + # Exit Current Window + bindsym $mod+Shift+q kill + + # Run a Program + bindsym $mod+d exec rofi -combi-modi run#window#ssh -theme solarized -font "ubuntu mono 10" -show combi + + # Cycle Through Windows + bindsym $mod+h focus left + bindsym $mod+j focus down + bindsym $mod+k focus up + bindsym $mod+l focus right + + # Move Current Window + #bindsym $mod+Shift+j move left + #bindsym $mod+Shift+k move down + #bindsym $mod+Shift+l move up + #bindsym $mod+Shift+semicolon move right + bindsym $mod+Shift+h move left + bindsym $mod+Shift+j move down + bindsym $mod+Shift+k move up + bindsym $mod+Shift+l move right + + # Horizontal Split + # bindsym $mod+h split h + bindsym $mod+b split h + + # Vertical Split + bindsym $mod+v split v + + # switch to workspace + bindsym $mod+1 workspace 1 + bindsym $mod+2 workspace 2 + bindsym $mod+3 workspace 3 + bindsym $mod+4 workspace 4 + bindsym $mod+5 workspace 5 + bindsym $mod+6 workspace 6 + bindsym $mod+7 workspace 7 + bindsym $mod+8 workspace 8 + bindsym $mod+9 workspace 9 + bindsym $mod+0 workspace 10 + bindsym $mod+Ctrl+1 workspace 11 + bindsym $mod+Ctrl+2 workspace 12 + bindsym $mod+Ctrl+3 workspace 13 + bindsym $mod+Ctrl+4 workspace 14 + bindsym $mod+Ctrl+5 workspace 15 + bindsym $mod+Ctrl+6 workspace 16 + bindsym $mod+Ctrl+7 workspace 17 + bindsym $mod+Ctrl+8 workspace 18 + bindsym $mod+Ctrl+9 workspace 19 + bindsym $mod+Ctrl+0 workspace 20 + + # move focused container to workspace + bindsym $mod+Shift+1 move container to workspace 1 + bindsym $mod+Shift+2 move container to workspace 2 + bindsym $mod+Shift+3 move container to workspace 3 + bindsym $mod+Shift+4 move container to workspace 4 + bindsym $mod+Shift+5 move container to workspace 5 + bindsym $mod+Shift+6 move container to workspace 6 + bindsym $mod+Shift+7 move container to workspace 7 + bindsym $mod+Shift+8 move container to workspace 8 + bindsym $mod+Shift+9 move container to workspace 9 + bindsym $mod+Shift+0 move container to workspace 10 + bindsym $mod+Ctrl+Shift+1 move container to workspace 11 + bindsym $mod+Ctrl+Shift+2 move container to workspace 12 + bindsym $mod+Ctrl+Shift+3 move container to workspace 13 + bindsym $mod+Ctrl+Shift+4 move container to workspace 14 + bindsym $mod+Ctrl+Shift+5 move container to workspace 15 + bindsym $mod+Ctrl+Shift+6 move container to workspace 16 + bindsym $mod+Ctrl+Shift+7 move container to workspace 17 + bindsym $mod+Ctrl+Shift+8 move container to workspace 18 + bindsym $mod+Ctrl+Shift+9 move container to workspace 19 + bindsym $mod+Ctrl+Shift+0 move container to workspace 20 + + ################################################################################ + # Other + + # Workspace Movement + #bindsym $mod+Control+Shift+j move workspace to output left + #bindsym $mod+Control+Shift+semicolon move workspace to output right + bindsym $mod+Control+Shift+h move workspace to output left + bindsym $mod+Control+Shift+l move workspace to output right + + # Cycle Through Workspaces + bindsym $mod+Ctrl+h focus workspace prevonoutput + bindsym $mod+Ctrl+l focus workspace nextonoutput + + # Custom Workspace Names + bindsym $mod+Control+r exec i3-input -F 'rename workspace to "%s"' -P 'Rename workspace to: ' + + # Move Windows through cycle + bindsym $mod+Ctrl+Shift+Left move container to workspace prevonoutput + bindsym $mod+Ctrl+Shift+Right move container to workspace nextonoutput + ''; + }; +} diff --git a/modules/mlaga97-home-manager/monitor_configs.nix b/modules/mlaga97-home-manager/monitor_configs.nix new file mode 100644 index 0000000..10e5eee --- /dev/null +++ b/modules/mlaga97-home-manager/monitor_configs.nix @@ -0,0 +1,80 @@ +{ home-manager, ... }: { + home.file = { + "xps/standalone" = { + executable = true; + text = '' + xrandr \ + --output eDP-1 --mode 1920x1200 --primary \ + --output DP-1-1 --off \ + --output DP-1-2 --off \ + --output DP-1-3 --off + i3-msg restart + ''; + }; + "xps/desk" = { + executable = true; + text = '' + xrandr \ + --output eDP-1 --off \ + --output DP-1-1 --mode 1920x1080 --rate 30 --left-of DP-1-2 \ + --output DP-1-2 --mode 3840x2160 --rate 30 --primary \ + --output DP-1-3 --mode 3840x2160 --rate 30 --right-of DP-1-2 + i3-msg restart + ''; + }; + "xps/workbench" = { + executable = true; + text = '' + xrandr \ + --output eDP-1 --off \ + --output DP-1-1 --mode 3840x2160 --rate 30 --left-of DP-1-2 \ + --output DP-1-2 --mode 3840x2160 --rate 30 --primary \ + --output DP-1-3 --mode 1920x1080 --rate 30 --right-of DP-1-2 + i3-msg restart + ''; + }; + + "precision/tv" = { + executable = true; + text = '' + xrandr \ + --output eDP-1 --mode 1920x1080 --primary \ + --output DP-4 --mode 1920x1080 --rate 60 + i3-msg restart + ''; + }; + "precision/desk" = { + executable = true; + text = '' + xrandr \ + --output DP-4-3 --mode 3840x2160 --rate 30 --primary \ + --output DP-4-1 --mode 3840x2160 --rate 30 --right-of DP-4-3 \ + --output eDP-1 --off + i3-msg restart + ''; + }; + "precision/work" = { + executable = true; + text = '' + xrandr \ + --output DP-2-2 --mode 3840x2160 --rate 30 --primary \ + --output DP-2-1 --mode 3840x2160 --rate 30 --right-of DP-2-2 \ + --output eDP-1 --off + i3-msg restart + ''; + }; + "precision/standalone" = { + executable = true; + text = '' + xrandr \ + --output eDP-1 --mode 1920x1200 --primary \ + --output DP-4 --off \ + --output DP-2-1 --off \ + --output DP-2-2 --off \ + --output DP-4-1 --off \ + --output DP-4-3 --off + i3-msg restart + ''; + }; + }; +} diff --git a/modules/mlaga97-home-manager/pop_secrets.sh b/modules/mlaga97-home-manager/pop_secrets.sh new file mode 100755 index 0000000..df5fe60 --- /dev/null +++ b/modules/mlaga97-home-manager/pop_secrets.sh @@ -0,0 +1 @@ +cat secrets.tar.zst.gpg | gpg -d | tar --zstd -xv diff --git a/modules/mlaga97-home-manager/programs/chromium.nix b/modules/mlaga97-home-manager/programs/chromium.nix new file mode 100644 index 0000000..0c965b6 --- /dev/null +++ b/modules/mlaga97-home-manager/programs/chromium.nix @@ -0,0 +1,10 @@ +{ ... }: { + programs.chromium = { + enable = true; + extensions = [ + { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # UBlock Origin + { id = "dbepggeogbaibhgnhhndojpepiihcmeb"; } # Vimium + { id = "naepdomgkenhinolocfifgehidddafch"; } # Browserpass + ]; + }; +} diff --git a/modules/mlaga97-home-manager/programs/firefox.nix b/modules/mlaga97-home-manager/programs/firefox.nix new file mode 100644 index 0000000..f3f0ce9 --- /dev/null +++ b/modules/mlaga97-home-manager/programs/firefox.nix @@ -0,0 +1,61 @@ +#{ pkgs-unstable, ... }: { +{ ... }: { + programs.firefox = { + enable = true; + #package = pkgs-unstable.firefox; + policies = { + DisableTelemetry = false; + DisablePocket = true; + DisableFirefoxStudies = true; + DontCheckDefaultBrowser = true; + SearchBar = "unified"; + + Preferences = {}; + + # about:debugging#/runtime/this-firefox + ExtensionSettings = { + # uBlock Origin + "uBlock0@raymondhill.net" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "force_installed"; + }; + # Vimium + "{d7742d87-e61d-4b78-b8a1-b469842139fa}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4191523/vimium_ff-2.0.6.xpi"; + installation_mode = "force_installed"; + }; + # New Tab Homepage + "{66E978CD-981F-47DF-AC42-E3CF417C1467}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4270256/new_tab_homepage-0.6.3resigned1.xpi"; + installation_mode = "force_installed"; + }; + }; + }; + + profiles.lauren.settings = { + "browser.uiCustomization.state" = '' + {"placements":{"widget-overflow-fixed-list":[],"unified-extensions-area":[],"nav-bar":["back-button","forward-button","stop-reload-button","customizableui-special-spring1","urlbar-container","customizableui-special-spring2","save-to-pocket-button","downloads-button","fxa-toolbar-menu-button","unified-extensions-button","browserpass_maximbaz_com-browser-action","_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action","ublock0_raymondhill_net-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["firefox-view-button","tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["import-button","personal-bookmarks"]},"seen":["developer-button","_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action","browserpass_maximbaz_com-browser-action","ublock0_raymondhill_net-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action"],"dirtyAreaCache":["nav-bar","PersonalToolbar","unified-extensions-area","toolbar-menubar","TabsToolbar"],"currentVersion":20,"newElementCount":2} + ''; + "signon.rememberSignons" = false; + "browser.aboutConfig.showWarning" = false; + "widget.disable-workspace-management" = true; + "browser.toolbars.bookmarks.visibility" = "always"; + + # Attempting to minimize the amount of crap that happens at first startup + "app.normandy.first_run" = false; + "browser.startup.firstrunSkipsHomepage" = false; + "doh-rollout.doneFirstRun" = true; + "toolkit.telemetry.reportingpolicy.firstRun" = false; + "trailhead.firstrun.didSeeAboutWelcome" = true; + "trailhead.firstrun.branches" = "nofirstrun-empty"; + "browser.aboutwelcome.enabled" = false; + "browser.newtab.extensionControlled" = true; + + # Allow declarative management of extensions + # See: https://github.com/nix-community/home-manager/pull/6389 + "extensions.webextensions.ExtensionStorageIDB.enabled" = false; + + "browser.tabs.groups.enabled" = true; + }; + }; +} diff --git a/modules/mlaga97-home-manager/programs/gnome-terminal.nix b/modules/mlaga97-home-manager/programs/gnome-terminal.nix new file mode 100644 index 0000000..a1829ee --- /dev/null +++ b/modules/mlaga97-home-manager/programs/gnome-terminal.nix @@ -0,0 +1,38 @@ +{ pkgs, home-manager, ... }: { + programs.gnome-terminal = { + enable = true; + themeVariant = "system"; + + profile."0403cfe3-f423-4b1c-97f5-e0a581056e7e" = { + default = true; + visibleName = "Elementary"; + audibleBell = false; + backspaceBinding = "ascii-backspace"; + #scrollbackLines = null; #TODO + + colors = { + palette = [ + "#303030" + "#E1321A" + "#6AB017" + "#FFC005" + "#004F9E" + "#EC0048" + "#2AA7E7" + "#F2F2F2" + "#5D5D5D" + "#FF361E" + "#7BC91F" + "#FFD00A" + "#0071FF" + "#FF1D62" + "#4BB8FD" + "#A020F0" + ]; + + foregroundColor = "#F2F2F2"; + backgroundColor = "#101010"; + }; + }; + }; +} diff --git a/modules/mlaga97-home-manager/programs/gpg.nix b/modules/mlaga97-home-manager/programs/gpg.nix new file mode 100644 index 0000000..0d49532 --- /dev/null +++ b/modules/mlaga97-home-manager/programs/gpg.nix @@ -0,0 +1,17 @@ +{ ... }: { + programs.gpg = { + enable = true; + mutableKeys = true; + mutableTrust = true; + publicKeys = [ + { + source = ../pubkeys/mlaga97_pubkey_20240419.asc; + trust = 5; + } + { + source = ../pubkeys/ajfunk27_pubkey_20240129.asc; + trust = 4; + } + ]; + }; +} diff --git a/modules/mlaga97-home-manager/programs/kitty.nix b/modules/mlaga97-home-manager/programs/kitty.nix new file mode 100644 index 0000000..070ea0b --- /dev/null +++ b/modules/mlaga97-home-manager/programs/kitty.nix @@ -0,0 +1,36 @@ +{ pkgs, home-manager, ... }: { + programs.kitty = { + enable = true; + settings = { + enable_audio_bell = false; + + background = "#101010"; + foreground = "#f2f2f2"; + + color0 = "#303030"; + color1 = "#E1321A"; + color2 = "#6AB017"; + color3 = "#FFC005"; + color4 = "#004F9E"; + color5 = "#EC0048"; + color6 = "#2AA7E7"; + color7 = "#F2F2F2"; + color8 = "#5D5D5D"; + color9 = "#FF361E"; + color10 = "#7BC91F"; + color11 = "#FFD00A"; + color12 = "#0071FF"; + color13 = "#FF1D62"; + color14 = "#4BB8FD"; + color15 = "#A020F0"; + #cursor #facb7f"; + #selection_background #403729 + #selection_foreground #21211c + }; + }; + + programs.bash.bashrcExtra = '' + # Fix KiTTY SSH Misbehavior + [[ "$TERM" == "xterm-kitty" ]] && alias ssh="TERM=xterm-256color ssh" + ''; +} diff --git a/modules/mlaga97-home-manager/programs/polybar.nix b/modules/mlaga97-home-manager/programs/polybar.nix new file mode 100644 index 0000000..112c4d4 --- /dev/null +++ b/modules/mlaga97-home-manager/programs/polybar.nix @@ -0,0 +1,411 @@ +{ pkgs, home-manager, ... }: { + home.packages = with pkgs; [ + # TODO: Why no work? + #nerdfonts + + siji + font-awesome + font-awesome_5 + ]; + + services.polybar = { + enable = true; + package = pkgs.polybar.override { + i3Support = true; + pulseSupport = true; + }; + script = '' + PATH="$PATH:/run/current-system/sw/bin" + + # Terminate already running bar instances + killall -q polybar + + # Wait until the processes have been shut down + while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + + IFS=$'\n' + for m in $(xrandr --query | grep " connected"); do + MONITOR=$(echo $m | cut -d" " -f1) + BARSUFFIX="" + + if [[ $m = *primary* ]]; then + BARSUFFIX=$BARSUFFIX"_main" + fi + + if [[ $m = *1920x* ]]; then + BARSUFFIX=$BARSUFFIX"_1920" + fi + + echo $BARSUFFIX + MONITOR=$MONITOR polybar --reload "bottom$BARSUFFIX" & + done + ''; + settings = { + "colors" = { + background = "#222"; + background-alt = "#444"; + foreground = "#dfdfdf"; + foreground-alt = "#999"; + primary = "#ffb52a"; + secondary = "#e60053"; + alert = "#bd2c40"; + }; + + "bar/bottom" = { + monitor = "\${env:MONITOR:}"; + bottom = true; + + radius = 0; + height = 25; + width = "100%"; + + padding = 1; + line-size = 3; + module-margin = 1; + + background = "\${colors.background}"; + foreground = "\${colors.foreground}"; + + font = [ + "fixed:pixelsize=14;1" + "unifont:fontformat=truetype:size=12:antialias=false;0" + "FontAwesome5Free-Solid:weight=heavy:size=12" + #"siji:pixelsize=14;1" + ]; + + modules-left = "hostname uptime bspwm i3"; + modules-center = "mpd"; + modules-right = "dirty root xbacklight volume wlan eth zram memory cpu battery date"; + + scroll-up = "i3wm-wsnext"; + scroll-down = "i3wm-wsprev"; + }; + + "bar/bottom_1920" = { + monitor = "\${env:MONITOR:}"; + bottom = true; + + radius = 0; + height = 25; + width = "100%"; + + padding = 1; + line-size = 3; + module-margin = 1; + + background = "\${colors.background}"; + foreground = "\${colors.foreground}"; + + font = [ + "fixed:pixelsize=14;1" + "unifont:fontformat=truetype:size=12:antialias=false;0" + "FontAwesome5Free-Solid:weight=heavy:size=12" + #"siji:pixelsize=14;1" + ]; + + modules-left = "hostname uptime bspwm i3"; + modules-center = "mpd"; + modules-right = "dirty volume wlan eth memory cpu battery date"; + + scroll-up = "i3wm-wsnext"; + scroll-down = "i3wm-wsprev"; + }; + + "bar/bottom_main" = { + monitor = "\${env:MONITOR:}"; + bottom = true; + + radius = 0; + height = 25; + width = "100%"; + + padding = 1; + line-size = 3; + module-margin = 1; + + background = "\${colors.background}"; + foreground = "\${colors.foreground}"; + + font = [ + "fixed:pixelsize=14;1" + "unifont:fontformat=truetype:size=12:antialias=false;0" + "FontAwesome5Free-Solid:weight=heavy:size=12" + #"siji:pixelsize=14;1" + ]; + + modules-left = "hostname uptime bspwm i3"; + modules-center = "mpd"; + modules-right = "dirty root xbacklight volume wlan eth zram memory cpu battery date tray"; + + scroll-up = "i3wm-wsnext"; + scroll-down = "i3wm-wsprev"; + }; + + "bar/bottom_main_1920" = { + monitor = "\${env:MONITOR:}"; + bottom = true; + + radius = 0; + height = 25; + width = "100%"; + + padding = 1; + line-size = 3; + module-margin = 1; + + background = "\${colors.background}"; + foreground = "\${colors.foreground}"; + + font = [ + "fixed:pixelsize=14;1" + "unifont:fontformat=truetype:size=12:antialias=false;0" + "FontAwesome5Free-Solid:weight=heavy:size=12" + #"siji:pixelsize=14;1" + ]; + + modules-left = "hostname uptime bspwm i3"; + modules-center = "mpd"; + modules-right = "dirty volume wlan eth memory cpu battery date tray"; + + scroll-up = "i3wm-wsnext"; + scroll-down = "i3wm-wsprev"; + }; + + "module/tray" = { + type = "internal/tray"; + }; + + "module/root" = { + type = "internal/fs"; + interval = "10"; + + mount = [ "/" ]; + + format-mounted = " "; + format-mounted-underline = "#f876cd"; + + label-mounted = "%mountpoint%%{F-} %free% of %total%"; + label-mounted-foreground = "\${colors.foreground-alt}"; + + bar-used-width = 10; + bar-used-fill = "█"; + bar-used-empty = "█"; + bar-used-indicator = ""; + bar-used-empty-foreground = "#444444"; + + format-prefix = " "; + format-prefix-foreground = "\${colors.foreground-alt}"; + }; + + "module/battery" = { + type = "internal/battery"; + + format-charging = " "; + format-charging-underline = "#ffb52a"; + + format-discharging = " "; + format-discharging-underline = "#ffb52a"; + + format-full-prefix = " "; + format-full-prefix-foreground = "\${colors.foreground-alt}"; + format-full-underline = "#ffb52a"; + + ramp-capacity = [" " " " " " " " " "]; + animation-charging = [" " " " " " " " " "]; + animation-charging-framerate = 750; + }; + + "module/hostname" = { + type = "custom/script"; + exec = "echo $(uname -n)"; + interval = 256; + + format = "