diff --git a/flake.lock b/flake.lock index 535de2b..6ea2a65 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ ] }, "locked": { - "lastModified": 1688409282, - "narHash": "sha256-nnVCN5QiZ5+DEc70PRQLEcxqlxtsmeBU1BnpsRPUJlA=", + "lastModified": 1695738267, + "narHash": "sha256-LTNAbTQ96xSj17xBfsFrFS9i56U2BMLpD0BduhrsVkU=", "owner": "nix-community", "repo": "home-manager", - "rev": "c24deeca64538dcbc589ed8da9146e4ca9eb85b7", + "rev": "0f4e5b4999fd6a42ece5da8a3a2439a50e48e486", "type": "github" }, "original": { @@ -40,11 +40,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1688231357, - "narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=", + "lastModified": 1695830400, + "narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "645ff62e09d294a30de823cb568e9c6d68e92606", + "rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2", "type": "github" }, "original": { 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 73% rename from home-manager/server/home.nix rename to home-manager/homeserver/home.nix index 9a00ab3..a500121 100644 --- a/home-manager/server/home.nix +++ b/home-manager/homeserver/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; @@ -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 99% rename from home-manager/server/local-modules/neovim.nix rename to home-manager/homeserver/local-modules/neovim.nix index 62efbaa..c5b003d 100644 --- a/home-manager/server/local-modules/neovim.nix +++ b/home-manager/homeserver/local-modules/neovim.nix @@ -275,6 +275,7 @@ in ''; } papercolor-theme + kanagawa-nvim { plugin = material-nvim; diff --git a/nixos/configuration.nix b/hosts/nixos/configuration.nix similarity index 94% rename from nixos/configuration.nix rename to hosts/nixos/configuration.nix index 6ddb455..1fba55b 100644 --- a/nixos/configuration.nix +++ b/hosts/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; } 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