From b68586cd0b39e590efba6a5e71651fb5e1e02f5c Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 18 Oct 2024 13:23:42 +0200 Subject: t14: 88 current 2024-10-18 13:23:35 24.05.20241004.6e6b3dd 6.6.54 * --- flake.lock | 145 ++++++++++++++++++++++++++++++++++++++---- flake.nix | 5 ++ machines/t14/default.nix | 6 ++ modules/obsidian-livesync.nix | 4 +- 4 files changed, 144 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index 0fedf22..0a4b8e4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,48 @@ { "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1723293904, + "narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", + "owner": "ryantm", + "repo": "agenix", + "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1700795494, + "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, "devshell": { "inputs": { "flake-utils": "flake-utils", @@ -115,7 +158,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1701680307, @@ -184,6 +227,27 @@ } }, "home-manager": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1703113217, + "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -204,7 +268,7 @@ "type": "github" } }, - "home-manager_2": { + "home-manager_3": { "inputs": { "nixpkgs": [ "ronvim", @@ -283,6 +347,26 @@ "type": "github" } }, + "nix-ld": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728031945, + "narHash": "sha256-NRkLjdMtVfC6dD1gEbYZWFEtbmC2xfD6ft1IP7l76Vw=", + "owner": "Mic92", + "repo": "nix-ld", + "rev": "4524c512e8729ccb5a1b9239d01e1474cbf074a2", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-ld", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1728056216, @@ -301,16 +385,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728067476, - "narHash": "sha256-/uJcVXuBt+VFCPQIX+4YnYrHaubJSx4HoNsJVNRgANM=", - "owner": "nixos", + "lastModified": 1703013332, + "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "6e6b3dd395c3b1eb9be9f2d096383a8d05add030", + "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-24.05", + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -328,6 +412,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1728067476, + "narHash": "sha256-/uJcVXuBt+VFCPQIX+4YnYrHaubJSx4HoNsJVNRgANM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "6e6b3dd395c3b1eb9be9f2d096383a8d05add030", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1717786204, "narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=", @@ -343,7 +443,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1717786204, "narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=", @@ -365,9 +465,9 @@ "flake-compat": "flake-compat", "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", - "home-manager": "home-manager_2", + "home-manager": "home-manager_3", "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -387,7 +487,7 @@ "ronvim": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixvim": "nixvim" }, "locked": { @@ -407,12 +507,14 @@ }, "root": { "inputs": { + "agenix": "agenix", "disko": "disko", - "home-manager": "home-manager", + "home-manager": "home-manager_2", "impermanence": "impermanence", "nix-index-database": "nix-index-database", + "nix-ld": "nix-ld", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "ronvim": "ronvim" } }, @@ -431,6 +533,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 30a179c..55f72f1 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,9 @@ disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; impermanence.url = "github:nix-community/impermanence"; + agenix.url = "github:ryantm/agenix"; + nix-ld.url = "github:Mic92/nix-ld"; + nix-ld.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, ... }@inputs: @@ -54,6 +57,8 @@ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen2 inputs.home-manager.nixosModules.default inputs.nix-index-database.nixosModules.nix-index + inputs.agenix.nixosModules.default + inputs.nix-ld.nixosModules.nix-ld { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; diff --git a/machines/t14/default.nix b/machines/t14/default.nix index acb9b2c..6619ebd 100644 --- a/machines/t14/default.nix +++ b/machines/t14/default.nix @@ -62,6 +62,12 @@ services.udev.packages = [ pkgs.sane-airscan ]; hardware.sane.disabledDefaultBackends = [ "escl" ]; + programs.nix-ld.dev = { + enable = true; + libraries = [ + pkgs.libgcc.lib + ]; + }; programs.appimage = { enable = true; diff --git a/modules/obsidian-livesync.nix b/modules/obsidian-livesync.nix index 5841202..3925bd2 100644 --- a/modules/obsidian-livesync.nix +++ b/modules/obsidian-livesync.nix @@ -81,14 +81,14 @@ in proxy_set_header X-Real-IP "$remote_addr"; proxy_set_header X-Forwarded-For "$proxy_add_x_forwarded_for"; proxy_set_header X-Forwarded-Proto "$scheme"; - add_header Access-Control-Allow-Origin "app://obsidian.md"; + # add_header Access-Control-Allow-Origin "app://obsidian.md"; add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"; add_header Access-Control-Allow-Headers "Content-Type, Authorization"; add_header Access-Control-Allow-Credentials "true"; add_header Access-Control-Max-Age 86400; if ($request_method = OPTIONS) { - add_header Access-Control-Allow-Origin "app://obsidian.md"; + # add_header Access-Control-Allow-Origin "app://obsidian.md"; add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"; add_header Access-Control-Allow-Headers "Content-Type, Authorization"; add_header Access-Control-Allow-Credentials "true"; -- cgit 1.4.1 From 10dad4f3117a64893df756acc017abc25d563694 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Wed, 23 Oct 2024 23:17:09 +0200 Subject: t14: 89 current 2024-10-23 23:17:03 24.05.20241004.6e6b3dd 6.6.54 * --- machines/t14/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/machines/t14/default.nix b/machines/t14/default.nix index 6619ebd..9dc4265 100644 --- a/machines/t14/default.nix +++ b/machines/t14/default.nix @@ -53,6 +53,11 @@ # enableSSHSupport = true; # }; + services.locate = { + enable = true; + package = pkgs.plocate; + }; + services.printing.drivers = with pkgs; [ cnijfilter2 ]; services.printing.logLevel = "debug"; services.avahi.enable = true; -- cgit 1.4.1 From ff80d6cae5edb49c8d257ab4687170b92affe086 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Wed, 23 Oct 2024 23:31:06 +0200 Subject: t14: 90 current 2024-10-23 23:31:00 24.05.20241004.6e6b3dd 6.6.54 * --- home.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/home.nix b/home.nix index 10e5c0c..84d1e3c 100644 --- a/home.nix +++ b/home.nix @@ -29,10 +29,17 @@ in home.username = "pn"; home.homeDirectory = "/home/pn"; - programs.chromium.enable = true; - programs.chromium.extensions = [ - { id = "fjcldmjmjhkklehbacihaiopjklihlgg"; } - ]; + programs.brave = { + enable = true; + package = pkgs.brave.overrideAttrs (oldAttrs: { + commandLineArgs = [ + "--profile-directory=${config.home.homeDirectory}/.config/BraveSoftware/Brave-Browser/Default" + ]; + }); + extensions = [ + { id = "fjcldmjmjhkklehbacihaiopjklihlgg"; } + ]; + }; xdg.userDirs = { enable = true; -- cgit 1.4.1 From 9e8d32d00f2c1d96a21367e2a042c1d7bd5f4923 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Wed, 23 Oct 2024 23:32:33 +0200 Subject: t14: 91 current 2024-10-23 23:32:28 24.05.20241004.6e6b3dd 6.6.54 * --- modules/gnome.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gnome.nix b/modules/gnome.nix index f625534..7e2f843 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -115,7 +115,7 @@ in gnome.gnome-boxes gnome.file-roller gnomeExtensions.hibernate-status-button - brave + #brave #specified in home.nix newsflash spotify fragments -- cgit 1.4.1 From 3013c17932789b09e927c6fd560b304e94678cf9 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Wed, 23 Oct 2024 23:41:18 +0200 Subject: t14: 92 current 2024-10-23 23:41:12 24.05.20241004.6e6b3dd 6.6.54 * --- modules/gnome.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/gnome.nix b/modules/gnome.nix index 7e2f843..68d3a31 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -116,6 +116,12 @@ in gnome.file-roller gnomeExtensions.hibernate-status-button #brave #specified in home.nix + (pkgs.brave.overrideAttrs (oldAttrs: { + commandLineArgs = [ + "--profile-directory=$HOME/.config/BraveSoftware/Brave-Browser/Default" + ]; + })) + newsflash spotify fragments -- cgit 1.4.1 From aa863bedca8a763618d06ce203bab20d9484a9eb Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Wed, 23 Oct 2024 23:50:16 +0200 Subject: t14: 93 current 2024-10-23 23:50:11 24.05.20241004.6e6b3dd 6.6.54 * --- modules/gnome.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/gnome.nix b/modules/gnome.nix index 68d3a31..0c45130 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -117,9 +117,10 @@ in gnomeExtensions.hibernate-status-button #brave #specified in home.nix (pkgs.brave.overrideAttrs (oldAttrs: { - commandLineArgs = [ - "--profile-directory=$HOME/.config/BraveSoftware/Brave-Browser/Default" - ]; + installPhase = oldAttrs.installPhase + '' + substituteInPlace $out/share/applications/brave-browser.desktop \ + --replace %U "%U --profile-directory=$HOME/.config/BraveSoftware/Brave-Browser/Default" + ''; })) newsflash -- cgit 1.4.1 From ffc0d4df3ce30b64d1ff0fdbe45847135bbdb91b Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Wed, 23 Oct 2024 23:52:12 +0200 Subject: t14: 94 current 2024-10-23 23:52:06 24.05.20241004.6e6b3dd 6.6.54 * --- modules/gnome.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gnome.nix b/modules/gnome.nix index 0c45130..5488d29 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -119,7 +119,7 @@ in (pkgs.brave.overrideAttrs (oldAttrs: { installPhase = oldAttrs.installPhase + '' substituteInPlace $out/share/applications/brave-browser.desktop \ - --replace %U "%U --profile-directory=$HOME/.config/BraveSoftware/Brave-Browser/Default" + --replace %U "%U --profile-directory=/home/pn/.config/BraveSoftware/Brave-Browser/Default" ''; })) -- cgit 1.4.1 From 82bf4521600ed33d3266896c65e6d01f62c23f33 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Wed, 23 Oct 2024 23:58:52 +0200 Subject: t14: 95 current 2024-10-23 23:58:47 24.05.20241004.6e6b3dd 6.6.54 * --- modules/gnome.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gnome.nix b/modules/gnome.nix index 5488d29..ba4014c 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -119,7 +119,7 @@ in (pkgs.brave.overrideAttrs (oldAttrs: { installPhase = oldAttrs.installPhase + '' substituteInPlace $out/share/applications/brave-browser.desktop \ - --replace %U "%U --profile-directory=/home/pn/.config/BraveSoftware/Brave-Browser/Default" + --replace %U "--profile-directory=Default %U" ''; })) -- cgit 1.4.1 From 39238b9537384f5987c0a8cae492c54786da86d7 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 24 Oct 2024 00:00:17 +0200 Subject: t14: 96 current 2024-10-24 00:00:11 24.05.20241004.6e6b3dd 6.6.54 * --- home.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home.nix b/home.nix index 84d1e3c..66466b8 100644 --- a/home.nix +++ b/home.nix @@ -30,7 +30,7 @@ in home.homeDirectory = "/home/pn"; programs.brave = { - enable = true; + enable = false; package = pkgs.brave.overrideAttrs (oldAttrs: { commandLineArgs = [ "--profile-directory=${config.home.homeDirectory}/.config/BraveSoftware/Brave-Browser/Default" -- cgit 1.4.1 From cd22698c52f3b93f014710fa6396ccae9870fb4f Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 24 Oct 2024 08:36:07 +0200 Subject: t14: 97 current 2024-10-24 08:36:02 24.05.20241004.6e6b3dd 6.6.54 * --- machines/base.nix | 2 +- machines/t14/default.nix | 1 + modules/appset-dev.nix | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 modules/appset-dev.nix diff --git a/machines/base.nix b/machines/base.nix index a00f178..306fcaf 100755 --- a/machines/base.nix +++ b/machines/base.nix @@ -14,7 +14,7 @@ environment.systemPackages = with pkgs; [ wget vim curl htop file stdenv git zip unzip - dnsutils ripgrep jq + dnsutils ripgrep any-nix-shell fd fzf translate-shell ]; diff --git a/machines/t14/default.nix b/machines/t14/default.nix index 9dc4265..d2a41a8 100644 --- a/machines/t14/default.nix +++ b/machines/t14/default.nix @@ -7,6 +7,7 @@ ../x220-gnome/pass.nix ./hardware-configuration.nix ../x220-gnome/pn.nix + ../../modules/appset-dev.nix ]; # Enable networking diff --git a/modules/appset-dev.nix b/modules/appset-dev.nix new file mode 100644 index 0000000..1682e45 --- /dev/null +++ b/modules/appset-dev.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + vscode + vim + jq + python3 + nodejs + ]; +} -- cgit 1.4.1