2023-09-19 00:17:43 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
berberman = {
|
|
|
|
url = "github:berberman/flakes";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
hosts = {
|
|
|
|
url = "github:StevenBlack/hosts";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
hyprland = {
|
|
|
|
url = "github:hyprwm/Hyprland";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs"; # MESA/OpenGL HW workaround
|
|
|
|
};
|
|
|
|
lanzaboote = {
|
|
|
|
url = "github:nix-community/lanzaboote";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
nix-darwin = {
|
|
|
|
url = "github:LnL7/nix-darwin";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-19 22:16:32 +00:00
|
|
|
#nixos-hardware = {
|
|
|
|
# url = "github:NixOS/nixos-hardware/master";
|
|
|
|
# #inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
#};
|
|
|
|
#nixpak = {
|
|
|
|
# url = "github:nixpak/nixpak";
|
|
|
|
# inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
#};
|
2023-09-19 00:17:43 +00:00
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, berberman, home-manager, hosts, hyprland, lanzaboote, nix-darwin, sops-nix, ... } @ inputs: {
|
2023-10-07 08:19:15 +00:00
|
|
|
|
|
|
|
# nix-darwin (macOS)
|
2023-09-19 00:17:43 +00:00
|
|
|
darwinConfigurations = {
|
|
|
|
"iMac-macOS" = nix-darwin.lib.darwinSystem {
|
|
|
|
system = "x86_64-darwin";
|
2023-10-04 06:29:38 +00:00
|
|
|
specialArgs = { inherit inputs; };
|
2023-09-19 00:17:43 +00:00
|
|
|
modules = [
|
2023-10-07 08:19:15 +00:00
|
|
|
./darwin # Entrypoint
|
2023-10-08 09:17:43 +00:00
|
|
|
./machines/darwin/imac-2017 # Hardware-specific configurations
|
2023-10-07 08:19:15 +00:00
|
|
|
# Machine-specific configurations (does such stuff even exist on nix-darwin)
|
|
|
|
./users/guanranwang/darwin.nix # User-specific configurations
|
|
|
|
./flakes/darwin/home-manager.nix # Flakes
|
|
|
|
|
|
|
|
{ networking.hostName = "iMac-macOS"; }
|
2023-09-19 00:17:43 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2023-10-07 08:19:15 +00:00
|
|
|
# NixOS
|
2023-09-19 00:17:43 +00:00
|
|
|
nixosConfigurations = {
|
|
|
|
"81fw-nixos" = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = { inherit inputs; };
|
|
|
|
modules = [
|
2023-10-07 08:19:15 +00:00
|
|
|
./nixos # Entrypoint
|
|
|
|
./machines/nixos/81fw-lenovo-legion-y7000 # Hardware-specific configurations
|
|
|
|
./machines/nixos/81fw-lenovo-legion-y7000/machine-1 # Machine-specific configurations
|
|
|
|
./users/guanranwang/nixos.nix # User-specific configurations
|
|
|
|
./flakes/nixos/berberman.nix # Flakes
|
2023-09-27 09:05:27 +00:00
|
|
|
./flakes/nixos/home-manager.nix
|
|
|
|
./flakes/nixos/hosts.nix
|
|
|
|
./flakes/nixos/lanzaboote.nix
|
|
|
|
./flakes/nixos/sops-nix.nix
|
2023-10-07 08:19:15 +00:00
|
|
|
|
|
|
|
{ networking.hostName = "81fw-nixos"; }
|
2023-09-19 00:17:43 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-10-07 08:19:15 +00:00
|
|
|
## Currently un-used.
|
2023-09-19 00:17:43 +00:00
|
|
|
"imac-nixos" = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = { inherit inputs; };
|
|
|
|
modules = [
|
2023-10-05 04:53:41 +00:00
|
|
|
./nixos
|
2023-10-07 08:19:15 +00:00
|
|
|
./machines/nixos/imac-2017
|
|
|
|
./machines/nixos/imac-2017/machine-1
|
2023-10-10 09:42:18 +00:00
|
|
|
./users/guanranwang/nixos.nix
|
2023-09-27 09:05:27 +00:00
|
|
|
./flakes/nixos/berberman.nix
|
|
|
|
./flakes/nixos/home-manager.nix
|
|
|
|
./flakes/nixos/hosts.nix
|
|
|
|
./flakes/nixos/lanzaboote.nix
|
|
|
|
./flakes/nixos/sops-nix.nix
|
2023-10-07 08:19:15 +00:00
|
|
|
|
|
|
|
{ networking.hostName = "imac-nixos"; }
|
2023-09-19 00:17:43 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# Home-Manager
|
|
|
|
homeConfigurations = {
|
|
|
|
"guanranwang@81fw-nixos" = home-manager.lib.homeManagerConfiguration {
|
2023-09-27 09:05:27 +00:00
|
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
|
|
extraSpecialArgs = { inherit inputs; };
|
2023-09-19 00:17:43 +00:00
|
|
|
modules = [
|
|
|
|
sops-nix.homeManagerModules.sops
|
|
|
|
|
|
|
|
hyprland.homeManagerModules.default
|
|
|
|
{
|
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
#enableNvidiaPatches = true;
|
|
|
|
xwayland = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
"guanranwang@imac-nixos" = home-manager.lib.homeManagerConfiguration {
|
2023-09-27 09:05:27 +00:00
|
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
|
|
extraSpecialArgs = { inherit inputs; };
|
2023-09-19 00:17:43 +00:00
|
|
|
modules = [
|
|
|
|
sops-nix.homeManagerModules.sops
|
|
|
|
|
|
|
|
hyprland.homeManagerModules.default
|
|
|
|
{
|
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
#enableNvidiaPatches = true;
|
|
|
|
xwayland = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|