From 00004c69f59a73808c0373ba1f122d370648711e Mon Sep 17 00:00:00 2001 From: ShatteredMINT Date: Fri, 13 Dec 2024 15:57:06 +0100 Subject: [PATCH] make configuration.nix host agnostic and add nix-conv --- configuration.nix | 9 --------- flake.nix | 11 +++++++++++ hardware/desk.nix | 5 +++++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/configuration.nix b/configuration.nix index fa66761..bd4aa90 100644 --- a/configuration.nix +++ b/configuration.nix @@ -36,11 +36,6 @@ }; - networking.hostName = "nix-desk"; # Define your hostname. - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - # required for ZFS - networking.hostId = "00000001"; - # Set your time zone. time.timeZone = "Europe/Berlin"; @@ -105,10 +100,6 @@ htop ]; - # allow specific users to affect system configuration - users.groups.nixos-admins = {}; - users.users.root.extraGroups = [ "nixos-admins" ]; - # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/flake.nix b/flake.nix index c21bb24..d99490f 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,17 @@ ./users/shatteredmint.nix ]; }; + + nix-conv = lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + + modules = [ + ./configuration.nix + ./plasma.nix + ./users/shatteredmint.nix + ]; + }; }; }; } diff --git a/hardware/desk.nix b/hardware/desk.nix index ece2b12..fde3971 100644 --- a/hardware/desk.nix +++ b/hardware/desk.nix @@ -53,4 +53,9 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + networking.hostName = "nix-desk"; # Define your hostname. + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + # required for ZFS + networking.hostId = "00000001"; }