From aa84a59571af8866542aaa66b7d6b975681d5c9e Mon Sep 17 00:00:00 2001 From: solidsnakedev Date: Sun, 17 Sep 2023 09:47:39 -0400 Subject: [PATCH 1/3] add new theme --- home-manager/server/local-modules/neovim.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home-manager/server/local-modules/neovim.nix b/home-manager/server/local-modules/neovim.nix index 62efbaa..c5b003d 100644 --- a/home-manager/server/local-modules/neovim.nix +++ b/home-manager/server/local-modules/neovim.nix @@ -275,6 +275,7 @@ in ''; } papercolor-theme + kanagawa-nvim { plugin = material-nvim; From cbddcd176fba2d4444f7f5e812197a1b31522150 Mon Sep 17 00:00:00 2001 From: solidsnakedev Date: Fri, 29 Sep 2023 12:48:46 -0400 Subject: [PATCH 2/3] update flake, new home-manager font config, add tailscale, add user to docker group --- flake.lock | 18 +++++++++--------- home-manager/server/home.nix | 2 +- nixos/configuration.nix | 9 +++++++-- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 0f336d9..6ea2a65 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ ] }, "locked": { - "lastModified": 1684442239, - "narHash": "sha256-8wD+fQpNULCF9a88E1Knw3MtXWqvyhn8u/859QSSoE4=", + "lastModified": 1695738267, + "narHash": "sha256-LTNAbTQ96xSj17xBfsFrFS9i56U2BMLpD0BduhrsVkU=", "owner": "nix-community", "repo": "home-manager", - "rev": "c10403a5739d6275334710903fe709bc8d587980", + "rev": "0f4e5b4999fd6a42ece5da8a3a2439a50e48e486", "type": "github" }, "original": { @@ -40,11 +40,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1684385584, - "narHash": "sha256-O7y0gK8OLIDqz+LaHJJyeu09IGiXlZIS3+JgEzGmmJA=", + "lastModified": 1695830400, + "narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "48a0fb7aab511df92a17cf239c37f2bd2ec9ae3a", + "rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2", "type": "github" }, "original": { @@ -84,11 +84,11 @@ ] }, "locked": { - "lastModified": 1683057558, - "narHash": "sha256-/kGv1CRaB1g+P1szq8acL0AwtyZMNHixdNFY2PvXViM=", + "lastModified": 1684517665, + "narHash": "sha256-SaAr66uCQ8CF75jIr23FZjk1+9Kfwm5sQnwV25206Gs=", "owner": "msteen", "repo": "nixos-vscode-server", - "rev": "e26b40ef083a9e9d48b5713b0d810fe5f4d0d555", + "rev": "1e1358493df6529d4c7bc4cc3066f76fd16d4ae6", "type": "github" }, "original": { diff --git a/home-manager/server/home.nix b/home-manager/server/home.nix index 9a00ab3..22f3e35 100644 --- a/home-manager/server/home.nix +++ b/home-manager/server/home.nix @@ -14,7 +14,7 @@ # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. - home.stateVersion = "22.11"; + home.stateVersion = "23.05"; # Let Home Manager install and manage itself. programs.home-manager.enable = true; diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 6ddb455..1fba55b 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -75,7 +75,7 @@ users.users.homeserver = { isNormalUser = true; description = "home-server"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ "networkmanager" "wheel" "docker" ]; packages = with pkgs; [ firefox # thunderbird @@ -143,7 +143,7 @@ nix.settings.trusted-users = [ "root" "homeserver" ]; nix.settings.auto-optimise-store = true; - fonts.fonts = with pkgs; [ + fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) ]; @@ -151,4 +151,9 @@ virtualisation.docker = { enable = true; }; + + # Enable tailscale. We manually authenticate when we want with + # "sudo tailscale up". If you don't use tailscale, you should comment + # out or delete all of this. + services.tailscale.enable = true; } From f7e19996cffd28fc08bdd371a6bbc427154cfca3 Mon Sep 17 00:00:00 2001 From: solidsnakedev Date: Wed, 22 Nov 2023 21:23:24 -0500 Subject: [PATCH 3/3] improve structure --- flake.nix | 25 +++++++------------ home-manager/{server => homeserver}/home.nix | 19 ++++++++++---- .../local-modules/neovim.nix | 0 {nixos => hosts/nixos}/configuration.nix | 0 .../nixos}/hardware-configuration.nix | 0 .../common-modules => modules}/bat.nix | 0 .../common-modules => modules}/direnv.nix | 0 .../common-modules => modules}/fish.nix | 0 .../common-modules => modules}/git.nix | 0 .../common-modules => modules}/tmux.nix | 0 10 files changed, 23 insertions(+), 21 deletions(-) rename home-manager/{server => homeserver}/home.nix (75%) rename home-manager/{server => homeserver}/local-modules/neovim.nix (100%) rename {nixos => hosts/nixos}/configuration.nix (100%) rename {nixos => hosts/nixos}/hardware-configuration.nix (100%) rename {home-manager/common-modules => modules}/bat.nix (100%) rename {home-manager/common-modules => modules}/direnv.nix (100%) rename {home-manager/common-modules => modules}/fish.nix (100%) rename {home-manager/common-modules => modules}/git.nix (100%) rename {home-manager/common-modules => modules}/tmux.nix (100%) diff --git a/flake.nix b/flake.nix index ff7b109..2802c3f 100644 --- a/flake.nix +++ b/flake.nix @@ -14,32 +14,25 @@ nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ + ./hosts/nixos/configuration.nix vscode-server.nixosModule - ({ config, pkgs, ... }: { - services.vscode-server.enable = true; - }) - ./nixos/configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.homeserver = import ./home-manager/server/home.nix; - - # Optionally, use home-manager.extraSpecialArgs to pass - # arguments to home.nix - } + ({ config, pkgs, ... }: { services.vscode-server.enable = true; }) ]; }; }; # Available through 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { - # FIXME replace with your username@hostname + "homeserver@nixos" = home-manager.lib.homeManagerConfiguration { + modules = [ ./home-manager/homeserver/home.nix ]; + pkgs = nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { inherit inputs; }; + }; + "jonathan" = home-manager.lib.homeManagerConfiguration { + modules = [ ./home-manager/mac/home.nix ]; pkgs = nixpkgs.legacyPackages.aarch64-darwin; # Home-manager requires 'pkgs' instance extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config - # > Our main home-manager configuration file < - modules = [ ./home-manager/mac/home.nix ]; }; }; }; diff --git a/home-manager/server/home.nix b/home-manager/homeserver/home.nix similarity index 75% rename from home-manager/server/home.nix rename to home-manager/homeserver/home.nix index 22f3e35..a500121 100644 --- a/home-manager/server/home.nix +++ b/home-manager/homeserver/home.nix @@ -38,12 +38,21 @@ gnumake ]; + programs.starship = { + enable = true; + enableFishIntegration = true; + enableZshIntegration = false; + settings = { + command_timeout = 1000; + }; + }; + imports = [ - ./../common-modules/fish.nix - ./../common-modules/direnv.nix - ./../common-modules/git.nix - ./../common-modules/tmux.nix - ./../common-modules/bat.nix + ./../../modules/fish.nix + ./../../modules/direnv.nix + ./../../modules/git.nix + ./../../modules/tmux.nix + ./../../modules/bat.nix ./local-modules/neovim.nix ]; diff --git a/home-manager/server/local-modules/neovim.nix b/home-manager/homeserver/local-modules/neovim.nix similarity index 100% rename from home-manager/server/local-modules/neovim.nix rename to home-manager/homeserver/local-modules/neovim.nix diff --git a/nixos/configuration.nix b/hosts/nixos/configuration.nix similarity index 100% rename from nixos/configuration.nix rename to hosts/nixos/configuration.nix diff --git a/nixos/hardware-configuration.nix b/hosts/nixos/hardware-configuration.nix similarity index 100% rename from nixos/hardware-configuration.nix rename to hosts/nixos/hardware-configuration.nix diff --git a/home-manager/common-modules/bat.nix b/modules/bat.nix similarity index 100% rename from home-manager/common-modules/bat.nix rename to modules/bat.nix diff --git a/home-manager/common-modules/direnv.nix b/modules/direnv.nix similarity index 100% rename from home-manager/common-modules/direnv.nix rename to modules/direnv.nix diff --git a/home-manager/common-modules/fish.nix b/modules/fish.nix similarity index 100% rename from home-manager/common-modules/fish.nix rename to modules/fish.nix diff --git a/home-manager/common-modules/git.nix b/modules/git.nix similarity index 100% rename from home-manager/common-modules/git.nix rename to modules/git.nix diff --git a/home-manager/common-modules/tmux.nix b/modules/tmux.nix similarity index 100% rename from home-manager/common-modules/tmux.nix rename to modules/tmux.nix