From 000b5fe81a60f906fc72371fef0d981c936fe9e3 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sat, 15 Feb 2025 12:02:23 +0100 Subject: [PATCH 01/11] Zen theme, Updated dependencies, moved fortune and cowsay pkgs --- configuration.nix | 2 - flake.lock | 48 +++---- home-manager/default.nix | 1 + home-manager/development/zed.nix | 7 +- home-manager/fish.nix | 2 +- home-manager/zen/chrome/userChrome.css | 113 +++++++++++++++++ home-manager/zen/chrome/userContent.css | 158 ++++++++++++++++++++++++ home-manager/zen/chrome/zen-logo.svg | 13 ++ home-manager/zen/default.nix | 7 ++ 9 files changed, 323 insertions(+), 28 deletions(-) create mode 100644 home-manager/zen/chrome/userChrome.css create mode 100644 home-manager/zen/chrome/userContent.css create mode 100644 home-manager/zen/chrome/zen-logo.svg create mode 100644 home-manager/zen/default.nix diff --git a/configuration.nix b/configuration.nix index cac4d50..e6b52f3 100644 --- a/configuration.nix +++ b/configuration.nix @@ -51,8 +51,6 @@ in gimp vlc vdhcoapp - fortune - cowsay inputs.zen-browser.packages.${system}.default # beta onlyoffice-desktopeditors ]; diff --git a/flake.lock b/flake.lock index 2026036..d54a22c 100644 --- a/flake.lock +++ b/flake.lock @@ -49,11 +49,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1739094937, - "narHash": "sha256-LemSQ5AZHwl4ZVlirdpAytDWgS96OZsct7Akx/REdGA=", + "lastModified": 1739283129, + "narHash": "sha256-GXJllf1wY7tOF6uei9S3PnSEghFbnJP1vkxM0kkMOoI=", "owner": "catppuccin", "repo": "nix", - "rev": "aee0cec463e62702751adaeb9f4fc00f2f72879b", + "rev": "d4e258e29075a86a82dacaf4f5e0985935ae4658", "type": "github" }, "original": { @@ -191,11 +191,11 @@ ] }, "locked": { - "lastModified": 1736373539, - "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", + "lastModified": 1739570999, + "narHash": "sha256-eCc0/Q4bPpe4/AS+uzIrHLJcR6BxPQ69q2kD0/Qe6rU=", "owner": "nix-community", "repo": "home-manager", - "rev": "bd65bc3cde04c16755955630b344bc9e35272c56", + "rev": "254d47082e23dbf72fdeca1da6fe1da420f478d8", "type": "github" }, "original": { @@ -234,11 +234,11 @@ ] }, "locked": { - "lastModified": 1739002652, - "narHash": "sha256-W83O9ASWUFaDAFY7H9vvW/Gm9PN5Lkh0McYW3bA/6aU=", + "lastModified": 1739606511, + "narHash": "sha256-ywkv5Pm6p4Taavp3yX9SjoLVf/mIHS3fRXSHjXqaJHQ=", "owner": "Jas-SinghFSU", "repo": "HyprPanel", - "rev": "0d5f80ff5cd525b8f27adfb84cef67d90e3d7f10", + "rev": "c309a73d2d9821c90864447058b627c02bd82165", "type": "github" }, "original": { @@ -314,11 +314,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1739020877, - "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", + "lastModified": 1739446958, + "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547", + "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", "type": "github" }, "original": { @@ -330,11 +330,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1738843498, - "narHash": "sha256-7x+Q4xgFj9UxZZO9aUDCR8h4vyYut4zPUvfj3i+jBHE=", + "lastModified": 1739357830, + "narHash": "sha256-9xim3nJJUFbVbJCz48UP4fGRStVW5nv4VdbimbKxJ3I=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f5a32fa27df91dfc4b762671a0e0a859a8a0058f", + "rev": "0ff09db9d034a04acd4e8908820ba0b410d7a33a", "type": "github" }, "original": { @@ -375,11 +375,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1738966895, - "narHash": "sha256-OXOh35rTEnFSO4vj/SDMIlDvFPGW0ba1XhZkfx+AlL0=", + "lastModified": 1739527837, + "narHash": "sha256-dsb5iSthp5zCWhdV0aXPunFSCkS0pCvRXMMgTEFjzew=", "owner": "nix-community", "repo": "nixvim", - "rev": "e7f20a602f6e08a70045f36c531bc44ba1baed07", + "rev": "a39e0a651657046f3b936d842147fa51523b6818", "type": "github" }, "original": { @@ -431,11 +431,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1739074574, - "narHash": "sha256-dLfT4/nIU3RzMHk7I5UigRehSWzq7wGkZxwuQdflO6s=", + "lastModified": 1739223162, + "narHash": "sha256-YrbYTM0CkZQG38Ysr2gF4BYdsQDNQtQ4YdQTDgw/zWM=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "366191fe8e9375d280e9a6b0ed9823468b49f6e7", + "rev": "dea717737d04a2a3e877c082bfd2c7f91c1a33ff", "type": "github" }, "original": { @@ -500,11 +500,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1739071251, - "narHash": "sha256-Kj4grI7YpHk2RIsy73Dwg7ikDn94MI7zKrWN0BXrvJI=", + "lastModified": 1739582274, + "narHash": "sha256-qDVcTrCMixPzxb9rzgTXkHaF9jxz6ptmGbuzO6RhAhc=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "410d6e9a8ba0edd163d0828a4cda1b1f267f2e1a", + "rev": "66976a3e4a8ee9bf29f89c81b48b4f4126c619e3", "type": "github" }, "original": { diff --git a/home-manager/default.nix b/home-manager/default.nix index 968c2dd..e7e716a 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -28,6 +28,7 @@ in ./hyprland ./spicetify.nix # TODO env conflict on latest version ./yazi + ./zen ]; dconf = { diff --git a/home-manager/development/zed.nix b/home-manager/development/zed.nix index af1799f..0d3a825 100644 --- a/home-manager/development/zed.nix +++ b/home-manager/development/zed.nix @@ -23,7 +23,12 @@ autosave = "on_focus_change"; base_keymap = "JetBrains"; buffer_font_family = font; - icon-theme = "Catppuccin Mocha"; # TODO doesn't work? + icon_theme = "Catppuccin Mocha"; + # icon_theme = { TODO replace icon theme above with below + # mode = theme.mode; + # light = "Catppuccin Mocha"; + # dark = "Catppuccin Mocha"; + # }; ui_font_family = font; ui_font_size = fontSize; buffer_font_size = fontSize; diff --git a/home-manager/fish.nix b/home-manager/fish.nix index e041567..7611f35 100644 --- a/home-manager/fish.nix +++ b/home-manager/fish.nix @@ -20,7 +20,7 @@ in # Start starship when creating a new shell interactiveShellInit = '' starship init fish | source - fortune | cowsay -f tux + ${pkgs.fortune}/bin/fortune | ${pkgs.cowsay}/bin/cowsay -f tux ''; plugins = [ { diff --git a/home-manager/zen/chrome/userChrome.css b/home-manager/zen/chrome/userChrome.css new file mode 100644 index 0000000..b37a865 --- /dev/null +++ b/home-manager/zen/chrome/userChrome.css @@ -0,0 +1,113 @@ +/* Catppuccin Mocha Blue userChrome.css*/ + +@media (prefers-color-scheme: dark) { + :root { + --zen-colors-primary: #313244 !important; + --zen-primary-color: #89b4fa !important; + --zen-colors-secondary: #313244 !important; + --zen-colors-tertiary: #181825 !important; + --zen-colors-border: #89b4fa !important; + --toolbarbutton-icon-fill: #89b4fa !important; + --lwt-text-color: #cdd6f4 !important; + --toolbar-field-color: #cdd6f4 !important; + --tab-selected-textcolor: rgb(171, 197, 247) !important; + --toolbar-field-focus-color: #cdd6f4 !important; + --toolbar-color: #cdd6f4 !important; + --newtab-text-primary-color: #cdd6f4 !important; + --arrowpanel-color: #cdd6f4 !important; + --arrowpanel-background: #1e1e2e !important; + --sidebar-text-color: #cdd6f4 !important; + --lwt-sidebar-text-color: #cdd6f4 !important; + --lwt-sidebar-background-color: #11111b !important; + --toolbar-bgcolor: #313244 !important; + --newtab-background-color: #1e1e2e !important; + --zen-themed-toolbar-bg: #181825 !important; + --zen-main-browser-background: #181825 !important; + } + + #permissions-granted-icon { + color: #181825 !important; + } + + .sidebar-placesTree { + background-color: #1e1e2e !important; + } + + #zen-workspaces-button { + background-color: #1e1e2e !important; + } + + #TabsToolbar { + background-color: #181825 !important; + } + + #urlbar-background { + background-color: #1e1e2e !important; + } + + .content-shortcuts { + background-color: #1e1e2e !important; + border-color: #89b4fa !important; + } + + .urlbarView-url { + color: #89b4fa !important; + } + + #zenEditBookmarkPanelFaviconContainer { + background: #11111b !important; + } + + toolbar .toolbarbutton-1 { + &:not([disabled]) { + &:is([open], [checked]) + > :is( + .toolbarbutton-icon, + .toolbarbutton-text, + .toolbarbutton-badge-stack + ) { + fill: #11111b; + } + } + } + + .identity-color-blue { + --identity-tab-color: #89b4fa !important; + --identity-icon-color: #89b4fa !important; + } + + .identity-color-turquoise { + --identity-tab-color: #94e2d5 !important; + --identity-icon-color: #94e2d5 !important; + } + + .identity-color-green { + --identity-tab-color: #a6e3a1 !important; + --identity-icon-color: #a6e3a1 !important; + } + + .identity-color-yellow { + --identity-tab-color: #f9e2af !important; + --identity-icon-color: #f9e2af !important; + } + + .identity-color-orange { + --identity-tab-color: #fab387 !important; + --identity-icon-color: #fab387 !important; + } + + .identity-color-red { + --identity-tab-color: #f38ba8 !important; + --identity-icon-color: #f38ba8 !important; + } + + .identity-color-pink { + --identity-tab-color: #f5c2e7 !important; + --identity-icon-color: #f5c2e7 !important; + } + + .identity-color-purple { + --identity-tab-color: #cba6f7 !important; + --identity-icon-color: #cba6f7 !important; + } +} diff --git a/home-manager/zen/chrome/userContent.css b/home-manager/zen/chrome/userContent.css new file mode 100644 index 0000000..036655d --- /dev/null +++ b/home-manager/zen/chrome/userContent.css @@ -0,0 +1,158 @@ +/* Catppuccin Mocha Blue userContent.css*/ + +@media (prefers-color-scheme: dark) { + /* Common variables affecting all pages */ + @-moz-document url-prefix("about:") { + :root { + --in-content-page-color: #cdd6f4 !important; + --color-accent-primary: #89b4fa !important; + --color-accent-primary-hover: rgb(163, 197, 251) !important; + --color-accent-primary-active: rgb(138, 153, 250) !important; + background-color: #1e1e2e !important; + --in-content-page-background: #1e1e2e !important; + } + } + + /* Variables and styles specific to about:newtab and about:home */ + @-moz-document url("about:newtab"), url("about:home") { + :root { + --newtab-background-color: #1e1e2e !important; + --newtab-background-color-secondary: #313244 !important; + --newtab-element-hover-color: #313244 !important; + --newtab-text-primary-color: #cdd6f4 !important; + --newtab-wordmark-color: #cdd6f4 !important; + --newtab-primary-action-background: #89b4fa !important; + } + + .icon { + color: #89b4fa !important; + } + + .search-wrapper .logo-and-wordmark .logo { + background: + url("zen-logo-mocha.svg"), + url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Blue/zen-logo-mocha.svg") + no-repeat center !important; + display: inline-block !important; + height: 82px !important; + width: 82px !important; + background-size: 82px !important; + } + + @media (max-width: 609px) { + .search-wrapper .logo-and-wordmark .logo { + background-size: 64px !important; + height: 64px !important; + width: 64px !important; + } + } + + .card-outer:is(:hover, :focus, .active):not(.placeholder) .card-title { + color: #89b4fa !important; + } + + .top-site-outer .search-topsite { + background-color: #89b4fa !important; + } + + .compact-cards .card-outer .card-context .card-context-icon.icon-download { + fill: #a6e3a1 !important; + } + } + + /* Variables and styles specific to about:preferences */ + @-moz-document url-prefix("about:preferences") { + :root { + --zen-colors-tertiary: #181825 !important; + --in-content-text-color: #cdd6f4 !important; + --link-color: #89b4fa !important; + --link-color-hover: rgb(163, 197, 251) !important; + --zen-colors-primary: #313244 !important; + --in-content-box-background: #313244 !important; + --zen-primary-color: #89b4fa !important; + } + + groupbox, + moz-card { + background: #1e1e2e !important; + } + + button, + groupbox menulist { + background: #313244 !important; + color: #cdd6f4 !important; + } + + .main-content { + background-color: #11111b !important; + } + + .identity-color-blue { + --identity-tab-color: #8aadf4 !important; + --identity-icon-color: #8aadf4 !important; + } + + .identity-color-turquoise { + --identity-tab-color: #8bd5ca !important; + --identity-icon-color: #8bd5ca !important; + } + + .identity-color-green { + --identity-tab-color: #a6da95 !important; + --identity-icon-color: #a6da95 !important; + } + + .identity-color-yellow { + --identity-tab-color: #eed49f !important; + --identity-icon-color: #eed49f !important; + } + + .identity-color-orange { + --identity-tab-color: #f5a97f !important; + --identity-icon-color: #f5a97f !important; + } + + .identity-color-red { + --identity-tab-color: #ed8796 !important; + --identity-icon-color: #ed8796 !important; + } + + .identity-color-pink { + --identity-tab-color: #f5bde6 !important; + --identity-icon-color: #f5bde6 !important; + } + + .identity-color-purple { + --identity-tab-color: #c6a0f6 !important; + --identity-icon-color: #c6a0f6 !important; + } + } + + /* Variables and styles specific to about:addons */ + @-moz-document url-prefix("about:addons") { + :root { + --zen-dark-color-mix-base: #181825 !important; + --background-color-box: #1e1e2e !important; + } + } + + /* Variables and styles specific to about:protections */ + @-moz-document url-prefix("about:protections") { + :root { + --zen-primary-color: #1e1e2e !important; + --social-color: #cba6f7 !important; + --coockie-color: #89dceb !important; + --fingerprinter-color: #f9e2af !important; + --cryptominer-color: #b4befe !important; + --tracker-color: #a6e3a1 !important; + --in-content-primary-button-background-hover: rgb(81, 83, 105) !important; + --in-content-primary-button-text-color-hover: #cdd6f4 !important; + --in-content-primary-button-background: #45475a !important; + --in-content-primary-button-text-color: #cdd6f4 !important; + } + + .card { + background-color: #313244 !important; + } + } +} diff --git a/home-manager/zen/chrome/zen-logo.svg b/home-manager/zen/chrome/zen-logo.svg new file mode 100644 index 0000000..3038ff2 --- /dev/null +++ b/home-manager/zen/chrome/zen-logo.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/home-manager/zen/default.nix b/home-manager/zen/default.nix new file mode 100644 index 0000000..8e27113 --- /dev/null +++ b/home-manager/zen/default.nix @@ -0,0 +1,7 @@ +{ + # TODO programatically get default name + home.file.".zen/audtxq7n.default/chrome" = { + source = ./chrome; + recursive = true; + }; +} From 1ed7ce2e894c18eaf5941eab3179a1f5ffa4659b Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sat, 15 Feb 2025 12:14:03 +0100 Subject: [PATCH 02/11] =?UTF-8?q?=F0=9F=AA=9F=20Move=20windows=20with=20ar?= =?UTF-8?q?rowkeys,=20moved=20zen=20package=20to=20/zen=20dir=20in=20home?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configuration.nix | 1 - home-manager/hyprland/binds.nix | 7 +++++++ home-manager/zen/default.nix | 11 ++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/configuration.nix b/configuration.nix index e6b52f3..9574f83 100644 --- a/configuration.nix +++ b/configuration.nix @@ -51,7 +51,6 @@ in gimp vlc vdhcoapp - inputs.zen-browser.packages.${system}.default # beta onlyoffice-desktopeditors ]; diff --git a/home-manager/hyprland/binds.nix b/home-manager/hyprland/binds.nix index 205263c..d9e3b82 100644 --- a/home-manager/hyprland/binds.nix +++ b/home-manager/hyprland/binds.nix @@ -7,6 +7,7 @@ in wayland.windowManager.hyprland.settings = { "$mainMod" = "SUPER"; "$shiftMod" = "$mainMod SHIFT"; + "$ctrlMod" = "$mainMod CTRL"; "$menu" = "rofi -show drun"; bind = [ @@ -29,6 +30,12 @@ in "$mainMod, up, movefocus, u" "$mainMod, down, movefocus, d" + # Move window with ctrl + mainMod + arrow keys + "$ctrlMod, left, movewindow, l" + "$ctrlMod, right, movewindow, r" + "$ctrlMod, up, movewindow, u" + "$ctrlMod, down, movewindow, d" + # Switch workspaces with mainMod + [0-9] "$mainMod, 1, workspace, 1" "$mainMod, 2, workspace, 2" diff --git a/home-manager/zen/default.nix b/home-manager/zen/default.nix index 8e27113..b8d3278 100644 --- a/home-manager/zen/default.nix +++ b/home-manager/zen/default.nix @@ -1,7 +1,12 @@ +{ pkgs, inputs, ... }: + { # TODO programatically get default name - home.file.".zen/audtxq7n.default/chrome" = { - source = ./chrome; - recursive = true; + home = { + file.".zen/audtxq7n.default/chrome" = { + source = ./chrome; + recursive = true; + }; + packages = with pkgs; [ inputs.zen-browser.packages.${system}.default ]; # Beta }; } From 056012a288a5aed38617e756c096f9e7912b016a Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Tue, 18 Feb 2025 21:56:34 +0100 Subject: [PATCH 03/11] =?UTF-8?q?=E2=9C=A8=20Gaming=20dir=20with=20heroic?= =?UTF-8?q?=20and=20wind,=20moved=20steam=20to=20dir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configuration.nix | 1 - home-manager/development/zed.nix | 10 ++++++++++ modules/default.nix | 2 +- modules/gaming/default.nix | 12 ++++++++++++ modules/{ => gaming}/steam.nix | 0 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 modules/gaming/default.nix rename modules/{ => gaming}/steam.nix (100%) diff --git a/configuration.nix b/configuration.nix index 9574f83..7336a34 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,6 +1,5 @@ { pkgs, - inputs, outputs, ... }: diff --git a/home-manager/development/zed.nix b/home-manager/development/zed.nix index 0d3a825..d74bb74 100644 --- a/home-manager/development/zed.nix +++ b/home-manager/development/zed.nix @@ -20,9 +20,19 @@ fontSize = 14; in { + assistant = { + default_model = { + provider = "ollama"; + model = "deepseek-r1:8b"; + }; + version = "2"; + }; autosave = "on_focus_change"; base_keymap = "JetBrains"; buffer_font_family = font; + features = { + inline_completion_provider = "zed"; + }; icon_theme = "Catppuccin Mocha"; # icon_theme = { TODO replace icon theme above with below # mode = theme.mode; diff --git a/modules/default.nix b/modules/default.nix index 7830ab7..6db9ad7 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -2,6 +2,7 @@ imports = [ ./development.nix ./fonts.nix + ./gaming ./gnome ./hardware ./locale.nix @@ -11,7 +12,6 @@ ./sddm.nix ./security.nix ./shell.nix - ./steam.nix ./qt.nix ]; } diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix new file mode 100644 index 0000000..79f3794 --- /dev/null +++ b/modules/gaming/default.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: + +{ + imports = [ + ./steam.nix + ]; + + environment.systemPackages = with pkgs; [ + heroic + wine + ]; +} diff --git a/modules/steam.nix b/modules/gaming/steam.nix similarity index 100% rename from modules/steam.nix rename to modules/gaming/steam.nix From 5a36e23ae741c0ca66faa1fa16d72b644cff81a9 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Thu, 27 Feb 2025 18:44:59 +0100 Subject: [PATCH 04/11] =?UTF-8?q?=F0=9F=93=A6=20Updated=20packages,=20prot?= =?UTF-8?q?onmail=20and=20freetube=20on=20unstable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configuration.nix | 2 +- flake.lock | 12 ++++++------ home-manager/freetube.nix | 3 +++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/configuration.nix b/configuration.nix index 7336a34..2165d84 100644 --- a/configuration.nix +++ b/configuration.nix @@ -42,7 +42,7 @@ in xdg-utils xdg-desktop-portal xdg-desktop-portal-gtk - protonmail-desktop + unstable.protonmail-desktop stremio fastfetch discord diff --git a/flake.lock b/flake.lock index d54a22c..af3edba 100644 --- a/flake.lock +++ b/flake.lock @@ -314,11 +314,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1739446958, - "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", + "lastModified": 1740560979, + "narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", + "rev": "5135c59491985879812717f4c9fea69604e7f26f", "type": "github" }, "original": { @@ -500,11 +500,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1739582274, - "narHash": "sha256-qDVcTrCMixPzxb9rzgTXkHaF9jxz6ptmGbuzO6RhAhc=", + "lastModified": 1740554227, + "narHash": "sha256-xpwZeMw2gGenixGQDyVv+ja+epcR+EJ1BPuGFdgFS18=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "66976a3e4a8ee9bf29f89c81b48b4f4126c619e3", + "rev": "7de16ae319e6f6852274fa90b0d41c00049767c9", "type": "github" }, "original": { diff --git a/home-manager/freetube.nix b/home-manager/freetube.nix index 4d231c6..aad9f56 100644 --- a/home-manager/freetube.nix +++ b/home-manager/freetube.nix @@ -1,8 +1,11 @@ +{ pkgs, ... }: + { catppuccin.freetube.enable = true; programs.freetube = { enable = true; + package = pkgs.unstable.freetube; settings = { allowDashAv1Formats = true; checkForUpdates = false; From 443530b667e3a0e4cc52d2801e4954fcae698e14 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sat, 1 Mar 2025 14:25:51 +0100 Subject: [PATCH 05/11] :sparkles: Added git-crypt and .gitattributes --- .gitattributes | 1 + home-manager/development/git.nix | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e116224 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +home-manager/secrets/weather-api-key filter=git-crypt diff=git-crypt diff --git a/home-manager/development/git.nix b/home-manager/development/git.nix index 4632050..1b881cf 100644 --- a/home-manager/development/git.nix +++ b/home-manager/development/git.nix @@ -1,4 +1,8 @@ +{ pkgs, ... }: + { + home.packages = with pkgs; [ git-crypt ]; + programs.git = { enable = true; userName = "Martin Berg Alstad"; From fd03c87c18c646a8b7f3ece8ddef890973abed02 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sat, 1 Mar 2025 14:31:54 +0100 Subject: [PATCH 06/11] =?UTF-8?q?=F0=9F=94=90=20Add=20weather=20API=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home-manager/secrets/weather-api-key | Bin 0 -> 54 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 home-manager/secrets/weather-api-key diff --git a/home-manager/secrets/weather-api-key b/home-manager/secrets/weather-api-key new file mode 100644 index 0000000000000000000000000000000000000000..f1b9cc27d2a72c3987c6fcac4a3d9f382317f220 GIT binary patch literal 54 zcmV-60LlLVM@dveQdv+`0Nwxs<{Qv*} literal 0 HcmV?d00001 From 7ab89cda7c2cf01a6fbb341b74eb1d232d15b463 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sat, 1 Mar 2025 15:04:56 +0100 Subject: [PATCH 07/11] :sparkles: Wildcard encrypt files in secrets dir, util function to load secrets, use apu-key in weather widget --- .gitattributes | 2 +- home-manager/hyprland/hyprpanel/default.nix | 11 +++++++++-- home-manager/secretsLoader.nix | 6 ++++++ 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 home-manager/secretsLoader.nix diff --git a/.gitattributes b/.gitattributes index e116224..2f4eec3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -home-manager/secrets/weather-api-key filter=git-crypt diff=git-crypt +home-manager/secrets/* filter=git-crypt diff=git-crypt diff --git a/home-manager/hyprland/hyprpanel/default.nix b/home-manager/hyprland/hyprpanel/default.nix index da6843f..a6a683b 100644 --- a/home-manager/hyprland/hyprpanel/default.nix +++ b/home-manager/hyprland/hyprpanel/default.nix @@ -1,7 +1,13 @@ -{ pkgs, inputs, ... }: +{ + pkgs, + inputs, + lib, + ... +}: let common = import ../../../common.nix; theme = import ../../../theme.nix; + loader = import ../../secretsLoader.nix lib; in { imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ]; @@ -74,7 +80,8 @@ in }; weather = { unit = "metric"; - location = "Bergen, Norway"; # TODO not working + location = "Bergen, Norway"; + key = loader.loadSecret ../../secrets/weather-api-key; }; }; diff --git a/home-manager/secretsLoader.nix b/home-manager/secretsLoader.nix new file mode 100644 index 0000000..6ab9e0f --- /dev/null +++ b/home-manager/secretsLoader.nix @@ -0,0 +1,6 @@ +lib: + +{ + loadSecret = + filePath: lib.strings.trim (lib.strings.removeSuffix "\n" (builtins.readFile filePath)); +} From adb963a48d21dfef0d048cc849b09d17a939690e Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sat, 1 Mar 2025 15:11:42 +0100 Subject: [PATCH 08/11] :sparkles: Added lock and unlock to justfile --- justfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/justfile b/justfile index 931e3dc..74f63c2 100644 --- a/justfile +++ b/justfile @@ -22,3 +22,9 @@ update: nix flake update just switch + +lock: + git-crypt lock + +unlock: + git-crypt unlock ~/.config/git/crypt-key From 3552314e69eca65737c86c20d185202799811aea Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sat, 1 Mar 2025 22:33:42 +0100 Subject: [PATCH 09/11] :sparkles: Store git secrets using libsecret --- home-manager/development/git.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/home-manager/development/git.nix b/home-manager/development/git.nix index 1b881cf..eedb85f 100644 --- a/home-manager/development/git.nix +++ b/home-manager/development/git.nix @@ -1,7 +1,10 @@ { pkgs, ... }: { - home.packages = with pkgs; [ git-crypt ]; + home.packages = with pkgs; [ + git-crypt + libsecret + ]; programs.git = { enable = true; @@ -22,6 +25,7 @@ extraConfig = { push.autoSetupRemote = true; safe.directory = "/etc/nixos"; + credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret"; }; }; } From 909d3b9b210abf86f67b1354d19bb1aa9c3d6033 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sat, 1 Mar 2025 23:00:24 +0100 Subject: [PATCH 10/11] :sparkles: Use same package of git --- home-manager/development/git.nix | 50 +++++++++++++++++--------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/home-manager/development/git.nix b/home-manager/development/git.nix index eedb85f..dc7673c 100644 --- a/home-manager/development/git.nix +++ b/home-manager/development/git.nix @@ -1,31 +1,33 @@ { pkgs, ... }: { - home.packages = with pkgs; [ - git-crypt - libsecret - ]; + home.packages = with pkgs; [ git-crypt ]; - programs.git = { - enable = true; - userName = "Martin Berg Alstad"; - userEmail = "git@martials.no"; + programs.git = + let + package = pkgs.git.override { withLibsecret = true; }; + in + { + enable = true; + package = package; + userName = "Martin Berg Alstad"; + userEmail = "git@martials.no"; - aliases = { - amend = "commit --amend"; - cm = "commit"; - s = "status"; + aliases = { + amend = "commit --amend"; + cm = "commit"; + s = "status"; + }; + + signing = { + signByDefault = true; + key = "706F53DD087A91DE"; + }; + + extraConfig = { + push.autoSetupRemote = true; + safe.directory = "/etc/nixos"; + credential.helper = "${package}/bin/git-credential-libsecret"; + }; }; - - signing = { - signByDefault = true; - key = "706F53DD087A91DE"; - }; - - extraConfig = { - push.autoSetupRemote = true; - safe.directory = "/etc/nixos"; - credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret"; - }; - }; } From a6cb4a5cf68a37e1f10d27fc410ba03d6bdd85a4 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sun, 2 Mar 2025 08:19:45 +0100 Subject: [PATCH 11/11] :bug: Disable wallpaper by Hyprpanel, comments on justfile --- home-manager/hyprland/hyprpanel/default.nix | 2 +- justfile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/home-manager/hyprland/hyprpanel/default.nix b/home-manager/hyprland/hyprpanel/default.nix index a6a683b..7aced3b 100644 --- a/home-manager/hyprland/hyprpanel/default.nix +++ b/home-manager/hyprland/hyprpanel/default.nix @@ -116,7 +116,7 @@ in }; }; - wallpaper.enable = true; + wallpaper.enable = false; }; }; } diff --git a/justfile b/justfile index 74f63c2..b4c4848 100644 --- a/justfile +++ b/justfile @@ -23,8 +23,10 @@ update: just switch +# Encrypt all files in the repo using git-crypt lock: git-crypt lock +# Decrypt all files in the repo using git-crypt and the user's GPG key unlock: git-crypt unlock ~/.config/git/crypt-key