This repository has been archived on 2023-07-23. You can view files and clone it, but cannot push or open issues or pull requests.
gpd-configurations/flake.nix

75 lines
2.5 KiB
Nix
Raw Normal View History

{
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" ];
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"
"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 = {
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, ...}: {
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" ];
});
})
];
};
cn-pkgs = import nixos-cn {
system = system;
config.allowUnfree = true;
2023-06-25 12:30:32 +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
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;
}
];
};
};
}