From 858ea8b16ba582c9d96ecec3a4a25b305d115756 Mon Sep 17 00:00:00 2001 From: xenia Date: Tue, 25 Jun 2024 18:05:16 +0200 Subject: [PATCH] Change structure to use individual machine configuration bla blab la --- flake.nix | 4 ++-- nixos/base.nix | 13 ------------- nixos/machines/catboy-cafe/boot.nix | 7 +++++++ .../catboy-cafe/hardware.nix} | 0 4 files changed, 9 insertions(+), 15 deletions(-) create mode 100644 nixos/machines/catboy-cafe/boot.nix rename nixos/{hardware/catboy-cafe.nix => machines/catboy-cafe/hardware.nix} (100%) diff --git a/flake.nix b/flake.nix index 94a602e5..14180623 100644 --- a/flake.nix +++ b/flake.nix @@ -96,7 +96,6 @@ base = mkNixOsBase { inherit system pkgs; hostname = "catboy-cafe"; - use-efi = true; }; graphical = mkNixOsGraphical { inherit pkgs; @@ -132,7 +131,8 @@ nixpkgs.lib.nixosSystem { inherit system; modules = [ - ./nixos/hardware/catboy-cafe.nix + ./nixos/machines/catboy-cafe/hardware.nix + ./nixos/machines/catboy-cafe/boot.nix base graphical networking diff --git a/nixos/base.nix b/nixos/base.nix index aa308f2d..9d558dcc 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -1,7 +1,5 @@ { system, pkgs, nixpkgs-flake, hostname, - use-efi ? false, efi-mountpoint ? "/boot", - use-grub ? false, grub-device ? "/dev/sda", }: { nixpkgs.config.allowUnfree = true; # lol @@ -29,17 +27,6 @@ networking.hostName = hostname; - boot.loader = if use-efi - then { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - efi.efiSysMountPoint = efi-mountpoint; - } else if use-grub then { - grub.enable = true; - grub.devce = grub-device; - } else throw "Please use either use-efi or use-grub = true"; - - time.timeZone = "Europe/Stockholm"; services.logind.lidSwitch = "ignore"; diff --git a/nixos/machines/catboy-cafe/boot.nix b/nixos/machines/catboy-cafe/boot.nix new file mode 100644 index 00000000..3d0ae899 --- /dev/null +++ b/nixos/machines/catboy-cafe/boot.nix @@ -0,0 +1,7 @@ +{...}: { + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + efi.efiSysMountPoint = "/boot"; + }; +} diff --git a/nixos/hardware/catboy-cafe.nix b/nixos/machines/catboy-cafe/hardware.nix similarity index 100% rename from nixos/hardware/catboy-cafe.nix rename to nixos/machines/catboy-cafe/hardware.nix