diff --git a/README.md b/README.md index dcec3e0..530cc8c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ├── pkgs │ └── - ├── profiles # 不同机器的配置文件 -│ ├── appolo # 主服务器配置 +│ ├── apollo # 主服务器配置 │ ├── gaea # 主用机配置 │ └── luna # 虚拟机配置 ├── secrets diff --git a/flake.nix b/flake.nix index 57a6e3a..8c8ee6e 100644 --- a/flake.nix +++ b/flake.nix @@ -7,13 +7,14 @@ username = "alex"; useremail = "reizero@live.com"; hostname = "luna"; + sysversion = "24.11"; libs = import ./libs { inherit nixpkgs; }; in rec { # Your custom packages # Acessible through 'nix build', 'nix shell', etc packages = libs.forAllSystems (system: - let pkgs = nixpkgs.legacyPackages.${system}; + let pkgs = nixpkgs.packages.${system}; in import ./pkgs { inherit pkgs; } ); @@ -28,7 +29,7 @@ lib.nixosSystem { specialArgs = { - inherit self inputs outputs username useremail; + inherit self inputs outputs username useremail sysversion; hostname = profile; }; modules = [ @@ -43,9 +44,9 @@ homeConfigurations = { # FIXME replace with your username@hostname "${username}" = home-manager-unstable.lib.homeManagerConfiguration { - pkgs = nixpkgs-unstable.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + pkgs = nixpkgs-unstable.packages.x86_64-linux; # Home-manager requires 'pkgs' instance extraSpecialArgs = { - inherit inputs outputs username useremail; + inherit inputs outputs username useremail sysversion; hyprland = inputs.hyprland; }; modules = [ @@ -63,7 +64,7 @@ inputs = { # Nixpkgs - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-${sysversion}"; # You can access packages and modules from different nixpkgs revs # at the same time. Here's an working example: nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -74,7 +75,7 @@ # Home manager home-manager = { - url = "github:nix-community/home-manager/release-23.05"; + url = "github:nix-community/home-manager/release-${sysversion}"; inputs.nixpkgs.follows = "nixpkgs"; };