From 131854f383c16fdbfed4f34a2b8885e685641171 Mon Sep 17 00:00:00 2001 From: iFargle Date: Tue, 15 Aug 2023 16:35:34 +0900 Subject: [PATCH] breakin' things --- flake.nix | 4 ++-- hosts/nixos-laptop/flake.nix | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 hosts/nixos-laptop/flake.nix diff --git a/flake.nix b/flake.nix index fcfeba34..708d08d1 100644 --- a/flake.nix +++ b/flake.nix @@ -57,8 +57,8 @@ }; modules = [ # Configuration Imports - ./configuration.nix # Common NixOS Configuration - ./hosts/${hostname}/nixos/configuration.nix # Hardware-specific Configuration + ./configuration.nix # Common NixOS Configuration + ./hosts/${hostname}/flake.nix # Hardware-specific Configuration # Flake Imports sops-nix.nixosModules.sops # Handle secrets diff --git a/hosts/nixos-laptop/flake.nix b/hosts/nixos-laptop/flake.nix new file mode 100644 index 00000000..5e7bf8ab --- /dev/null +++ b/hosts/nixos-laptop/flake.nix @@ -0,0 +1,43 @@ +{ + # INFORMATION + # When building for a system, remember to change the hostname variable below + description = "nixos-laptop flake"; + + inputs = { + # Encrypted secrets in Nix configuration files + # https://github.com/Mic92/sops-nix + sops-nix.url = "github:Mic92/sops-nix"; + }; + + outputs = { + unstable-nixpkgs, + home-manager, + lanzaboote, + nur, + sops-nix, + nixos-hardware, + ... + }@inputs: + let + # Variables - Remember to set these + hostname = "nixos-laptop"; # Should probably set this in a minimal configuration.nix? + lib = unstable-nixpkgs.lib; + in { + # NixOS Configuration files: + nixosConfigurations = { + # Declare a generic configuration using the $hostname variable: + ${hostname} = lib.nixosSystem { + inherit system; + specialArgs = { + inherit hostname; + }; + modules = [ + # Configuration Imports + ./nixos/configuration.nix + # Flake Imports + nixos-hardware.nixosModules.lenovo-thinkpad-p1 + ]; # modules + }; # lib.nixosSystem - ${hostname} + }; # nixosConfiguration + }; +}