{ description = "NixOS configuration for GPD Win Max"; nixConfig = rec { auto-optimise-store = true; experimental-features = [ "nix-command" "flakes" ]; trusted-substituters = [ "https://mirrors.ustc.edu.cn/nix-channels/store" # 中科大 "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # 清华 "https://mirrors.bfsu.edu.cn/nix-channels/store" # 北外 "https://mirror.sjtu.edu.cn/nix-channels/store" # 交大 "https://nixos-cn.cachix.org" "https://cache.nixos.org/" ]; substituters = trusted-substituters; trusted-users = [ "root" "@wheel" ]; }; inputs = { nixpkgs.url = "nixpkgs/nixos-23.05"; impermanence.url = "github:nix-community/impermanence"; home-manager = { url = "github:nix-community/home-manager/release-23.05"; inputs.nixpkgs.follows = "nixpkgs"; }; nixos-cn = { url = "github:nixos-cn/flakes"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = {self, nixpkgs, home-manager, nixos-cn, impermanence, ...}: { nixosConfigurations.gpd = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; specialArgs = { pkgs = import nixpkgs { system = system; config.allowUnfree = true; overlays = [ (self: super: { waybar = super.waybar.overrideAttrs (oldAttrs: { # enable hyprland support mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; }); }) ]; }; cn-pkgs = import nixos-cn { system = system; config.allowUnfree = true; }; }; modules = [ ./configuration.nix impermanence.nixosModules.impermanence nixos-cn.nixosModules.nixos-cn-registries nixos-cn.nixosModules.nixos-cn home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users = import ./home; } ]; }; }; }