From feefcfc89b00d4955dbb3314c20be035f3db206f Mon Sep 17 00:00:00 2001 From: tzlil Date: Sat, 29 Jul 2023 20:53:14 +0300 Subject: disko for laptop, wip rewrite --- hosts/default.nix | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 hosts/default.nix (limited to 'hosts/default.nix') diff --git a/hosts/default.nix b/hosts/default.nix new file mode 100644 index 0000000..0b9bd1c --- /dev/null +++ b/hosts/default.nix @@ -0,0 +1,47 @@ +inputs: let + commonProfiles = [ + { + imports = [ + ../profiles/nix.nix + ../profiles/tzlil.nix + ../profiles/security.nix + ../profiles/ssh.nix + ]; + } + inputs.agenix.nixosModules.age + inputs.impermanence.nixosModules.impermanence + ]; + + commonHome = [ + inputs.home-manager.nixosModule + { + home-manager = { + useGlobalPkgs = true; + extraSpecialArgs = {inherit inputs;}; + }; + } + ]; + + nixinate = host: { + _module.args.nixinate = { + inherit host; + sshUser = "tzlil"; + buildOn = "remote"; # valid args are "local" or "remote" + substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s" + hermetic = false; + }; + }; +in { + navi = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = + [ + "${inputs.self}/hosts/navi" + {networking.hostName = "navi";} + (nixinate "navi") + ] + ++ commonProfiles + ++ commonHome; + }; +} -- cgit 1.4.1