From dd5390cbcfd0d0748c5812c2541811992a8a2b0d Mon Sep 17 00:00:00 2001 From: iFargle Date: Sat, 1 Jul 2023 17:58:43 +0900 Subject: [PATCH] test --- flake.nix | 35 +++++-------------- .../nixos-laptop}/configuration.nix | 0 .../nixos-laptop}/hardware-configuration.nix | 0 3 files changed, 8 insertions(+), 27 deletions(-) rename {hardware/lenovo-p1 => hosts/nixos-laptop}/configuration.nix (100%) rename {hardware/lenovo-p1 => hosts/nixos-laptop}/hardware-configuration.nix (100%) diff --git a/flake.nix b/flake.nix index 090cfe8b..ed23f572 100644 --- a/flake.nix +++ b/flake.nix @@ -20,14 +20,17 @@ outputs = { nixpkgs, home-manager, lanzaboote, ... }: let + + # Variables - Remember to set these hostname = "nixos-laptop"; system = "x86_64-linux"; + pkgs = import nixpkgs { # Tells Flake what OS version we are using inherit system; config = { allowUnfree = true; }; }; - + networking.hostname = "${hostname}" lib = nixpkgs.lib; in { # Set up users with home-manager @@ -44,19 +47,19 @@ inherit system pkgs; username = "root"; homeDirectory = "/root"; - configuration.imports = [ ./users/rootd/home.nix ]; + configuration.imports = [ ./users/root/home.nix ]; }; }; # NixOS Configuration files: nixosConfigurations = { # Declare the configuration for my laptop - nixos-p1 = lib.nixosSystem { + nixos = lib.nixosSystem { inherit system; modules = [ # Hardware Configuration - ./hardware/lenovo-p1/hardware-configuration.nix - ./hardware/lenovo-p1/configuration.nix + (./hosts/+("/"+hostname)+/hardware-configuration.nix) + (./hosts/+("/"+hostname)+/configuration.nix) # SecureBoot Configuration lanzaboote.nixosModules.lanzaboote @@ -70,28 +73,6 @@ } ]; # modules }; # lib.nixosSystem - nixos-laptop - - # Declare the configuration for my desktop - nixos-desktop = lib.nixosSystem { - inherit system; - modules = [ - # Hardware Configuration - ./hardware/desktop.nix - - # SecureBoot Configuration - lanzaboote.nixosModules.lanzaboote - - # NixOS Configuration file - ./configuration.nix - - # Tell home-manager to use both global and user packages: - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - } - ]; # modules - }; # lib.nixosSystem - nixos-laptop - }; # nixosConfiguration }; } \ No newline at end of file diff --git a/hardware/lenovo-p1/configuration.nix b/hosts/nixos-laptop/configuration.nix similarity index 100% rename from hardware/lenovo-p1/configuration.nix rename to hosts/nixos-laptop/configuration.nix diff --git a/hardware/lenovo-p1/hardware-configuration.nix b/hosts/nixos-laptop/hardware-configuration.nix similarity index 100% rename from hardware/lenovo-p1/hardware-configuration.nix rename to hosts/nixos-laptop/hardware-configuration.nix