From 5028503d6d2a21d9e4cb3100a2f9b2795cb5d4bd Mon Sep 17 00:00:00 2001 From: tcmal Date: Fri, 23 Aug 2024 01:03:50 +0100 Subject: basic kiosk module --- flake.nix | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..cffa90f --- /dev/null +++ b/flake.nix @@ -0,0 +1,62 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + inputs@{ + self, + nixpkgs, + disko, + ... + }: + let + mkPkgs = + system: + let + overlays = [ + # Access helpful variables from nixpkgs + (_: prev: prev // { inherit inputs self; }) + + # Add our custom library functions + (final: prev: prev // { lib = prev.lib // import ./lib.nix final; }) + ]; + in + import nixpkgs { inherit system overlays; }; + + mkSystem = + system: config: + let + pkgs = mkPkgs system; + in + nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs self; + lib = pkgs.lib // { + our = import ./lib.nix pkgs; + }; + }; + modules = [ + disko.nixosModules.default + ./modules/kiosk + config + ]; + }; + in + { + devShells.x86_64-linux.default = + let + pkgs = mkPkgs "x86_64-linux"; + in + pkgs.mkShell { buildInputs = with pkgs; [ gnumake ]; }; + + nixosConfigurations = { + g1-bigscreen = mkSystem "x86_64-linux" ./hosts/g1-bigscreen.nix; + }; + }; +} -- cgit v1.2.3