commit ed072454da6747d56008984aa320dd92522e46f2
parent 3f63f542dc39434e8311c8a44f5b8e06effd4732
Author: Leah (ctucx) <git@ctu.cx>
Date: Sun, 16 Jun 2024 18:16:53 +0200
parent 3f63f542dc39434e8311c8a44f5b8e06effd4732
Author: Leah (ctucx) <git@ctu.cx>
Date: Sun, 16 Jun 2024 18:16:53 +0200
flake: move `system.nixos` options to linux default config
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/configurations/linux/default.nix b/configurations/linux/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }@args: +{ inputs, config, lib, pkgs, ... }@args: { @@ -18,6 +18,9 @@ targetPort = lib.mkDefault (lib.head config.services.openssh.ports); }; + system.nixos.revision = lib.mkIf (inputs.nixpkgs.sourceInfo ? rev) inputs.nixpkgs.sourceInfo.rev; + system.nixos.versionSuffix = ".${lib.substring 0 8 (inputs.nixpkgs.sourceInfo.lastModifiedDate or inputs.nixpkgs.sourceInfo.lastModified or "19700101")}.${inputs.nixpkgs.sourceInfo.shortRev or "dirty"}"; + networking.hostName = lib.mkDefault args.name; networking.domain = lib.mkDefault "ctu.cx";
diff --git a/flake.nix b/flake.nix @@ -7,15 +7,18 @@ darwinConfigurations = { blechkasten = inputs.darwin.lib.darwinSystem rec { system = "aarch64-darwin"; + pkgs = import inputs.nixpkgsDarwin { inherit system; config.allowUnfree = true; overlays = overlays ++ [(import ./pkgs/darwin)]; }; + specialArgs = { currentSystem = system; inherit inputs; }; + modules = [ # inputs.mac-app-util.darwinModules.default ./machines/blechkasten @@ -38,12 +41,7 @@ }; }; - defaults = { lib, ... }: { - imports = [ ./configurations/common ]; - - system.nixos.versionSuffix = ".${lib.substring 0 8 (inputs.nixpkgs.sourceInfo.lastModifiedDate or inputs.nixpkgs.sourceInfo.lastModified or "19700101")}.${inputs.nixpkgs.sourceInfo.shortRev or "dirty"}"; - system.nixos.revision = lib.mkIf (inputs.nixpkgs.sourceInfo ? rev) inputs.nixpkgs.sourceInfo.rev; - }; + defaults = import ./configurations/common; coladose = import ./machines/coladose; briefkasten = import ./machines/briefkasten;