flake: seperate entrypoint from machines

This commit is contained in:
Guanran Wang 2023-10-05 12:53:41 +08:00
parent b7f96cb898
commit 9b8a74aa60
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
6 changed files with 14 additions and 15 deletions

10
darwin/default.nix Normal file
View file

@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./networking
./packages
./main.nix
./input.nix
];
}

View file

@ -1,13 +1,6 @@
{ lib, pkgs, ... }: { lib, pkgs, ... }:
{ {
imports = [
./networking
./packages
./input.nix
];
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" ]; }) (nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" ]; })
]; ];

View file

@ -44,6 +44,7 @@
"iMac-macOS" = nix-darwin.lib.darwinSystem { "iMac-macOS" = nix-darwin.lib.darwinSystem {
system = "x86_64-darwin"; system = "x86_64-darwin";
modules = [ modules = [
./darwin
./machines/darwin/imac-2017.nix ./machines/darwin/imac-2017.nix
./users/guanranwang/darwin.nix ./users/guanranwang/darwin.nix
./flakes/darwin/home-manager.nix ./flakes/darwin/home-manager.nix
@ -59,7 +60,8 @@
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
./machines/nixos/81fw-lenovo-legion-y7000.nix # Entrypoint, this .nix file imports ./nixos ./nixos # Entrypoint
./machines/nixos/81fw-lenovo-legion-y7000.nix
./users/guanranwang/nixos.nix ./users/guanranwang/nixos.nix
./flakes/nixos/berberman.nix ./flakes/nixos/berberman.nix
./flakes/nixos/home-manager.nix ./flakes/nixos/home-manager.nix
@ -74,6 +76,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
./nixos
./machines/nixos/imac-2017.nix ./machines/nixos/imac-2017.nix
./users/guanranwag/nixos.nix ./users/guanranwag/nixos.nix
./flakes/nixos/berberman.nix ./flakes/nixos/berberman.nix

View file

@ -1,9 +1,6 @@
{ ... }: { ... }:
{ {
imports = [
../../darwin/main.nix
];
networking.knownNetworkServices = [ networking.knownNetworkServices = [
"Ethernet" "Ethernet"
"Wi-Fi" "Wi-Fi"

View file

@ -2,8 +2,6 @@
{ {
imports = [ imports = [
../../nixos
./hardware/misc/audio.nix ./hardware/misc/audio.nix
./hardware/misc/bluetooth.nix ./hardware/misc/bluetooth.nix
./hardware/misc/opengl.nix ./hardware/misc/opengl.nix

View file

@ -2,8 +2,6 @@
{ {
imports = [ imports = [
../../nixos
./hardware/misc/audio.nix ./hardware/misc/audio.nix
./hardware/misc/bluetooth.nix ./hardware/misc/bluetooth.nix
./hardware/misc/opengl.nix ./hardware/misc/opengl.nix