2023-06-21 05:29:28 +00:00
|
|
|
{
|
|
|
|
description = "NixOS configuration for GPD Win Max";
|
|
|
|
|
|
|
|
nixConfig = {
|
2023-06-26 00:38:25 +00:00
|
|
|
auto-optimise-store = true;
|
2023-06-28 07:57:18 +00:00
|
|
|
experimental-features = [ "nix-command" "flakes" ];
|
2023-06-21 05:29:28 +00:00
|
|
|
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" # 交大
|
2023-06-27 02:44:31 +00:00
|
|
|
"https://nixos-cn.cachix.org"
|
2023-06-21 05:29:28 +00:00
|
|
|
"https://cache.nixos.org/"
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
2023-06-25 22:18:07 +00:00
|
|
|
nixos-cn = {
|
2023-06-21 05:29:28 +00:00
|
|
|
url = "github:nixos-cn/flakes";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-06-25 22:18:07 +00:00
|
|
|
outputs = {self, nixpkgs, home-manager, nixos-cn, impermanence, ...}: {
|
2023-06-21 05:29:28 +00:00
|
|
|
nixosConfigurations.gpd = nixpkgs.lib.nixosSystem rec {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
|
|
specialArgs = {
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
system = system;
|
|
|
|
config.allowUnfree = true;
|
2023-06-27 02:44:31 +00:00
|
|
|
overlays = [
|
|
|
|
(self: super: {
|
|
|
|
waybar = super.waybar.overrideAttrs (oldAttrs: {
|
|
|
|
# enable hyprland support
|
|
|
|
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
|
|
|
});
|
|
|
|
})
|
|
|
|
];
|
2023-06-21 05:29:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cn-pkgs = import nixos-cn {
|
|
|
|
system = system;
|
|
|
|
config.allowUnfree = true;
|
2023-06-25 12:30:32 +00:00
|
|
|
};
|
2023-06-21 05:29:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
|
|
|
impermanence.nixosModules.impermanence
|
2023-06-27 02:44:31 +00:00
|
|
|
nixos-cn.nixosModules.nixos-cn-registries
|
|
|
|
nixos-cn.nixosModules.nixos-cn
|
2023-06-21 05:29:28 +00:00
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
2023-06-25 22:18:07 +00:00
|
|
|
home-manager.users = import ./home;
|
2023-06-21 05:29:28 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|