From bd9a9de9fca65e43a35bc651a566d06e4ef322cb Mon Sep 17 00:00:00 2001 From: Nettika Date: Thu, 11 Jul 2024 21:53:03 -0700 Subject: [PATCH] Inline common configuration --- common.nix | 23 ----------------------- flake.nix | 25 +++++++------------------ marauder/configuration.nix | 24 +++++++++++++++++++++++- monolith/configuration.nix | 19 +++++++++++++++++++ 4 files changed, 49 insertions(+), 42 deletions(-) delete mode 100644 common.nix diff --git a/common.nix b/common.nix deleted file mode 100644 index b6286dc..0000000 --- a/common.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ hostName, ... }: -{ - networking = { - inherit hostName; - networkmanager.enable = true; - }; - - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - - nixpkgs.config.allowUnfree = true; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - users.users = { - nettika = { - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; - }; - }; -} \ No newline at end of file diff --git a/flake.nix b/flake.nix index fc869f2..10c12e0 100644 --- a/flake.nix +++ b/flake.nix @@ -2,33 +2,22 @@ description = "Nettika NixOS Configurations"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; - nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixos-hardware.url = "github:nixos/nixos-hardware/master"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; }; - outputs = { nixpkgs, nixos-hardware, ... }: { + outputs = { nixpkgs, nixos-hardware, ... }@inputs: { nixosConfigurations = { marauder = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ - ./marauder/configuration.nix - ./common.nix - nixos-hardware.nixosModules.asus-rog-strix-g513im - ]; - specialArgs = { - hostName = "marauder"; - }; + modules = [ ./marauder/configuration.nix ]; + specialArgs = { inherit inputs; }; }; monolith = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ - ./monolith/configuration.nix - ./common.nix - ]; - specialArgs = { - hostName = "monolith"; - }; + modules = [ ./monolith/configuration.nix ]; + specialArgs = { inherit inputs; }; }; }; }; diff --git a/marauder/configuration.nix b/marauder/configuration.nix index ea931ba..18b49b1 100644 --- a/marauder/configuration.nix +++ b/marauder/configuration.nix @@ -1,10 +1,32 @@ -{ pkgs, ... }: +{ pkgs, inputs, ... }: { imports = [ ./backup.nix ./hardware-configuration.nix + inputs.nixos-hardware.nixosModules.asus-rog-strix-g513im ]; + networking = { + hostName = "marauder"; + networkmanager.enable = true; + }; + + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + users.users = { + nettika = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" ]; + }; + }; + + nixpkgs.config.allowUnfree = true; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + environment.systemPackages = with pkgs; [ # Chat clients discord diff --git a/monolith/configuration.nix b/monolith/configuration.nix index cd3b972..cfa66c7 100644 --- a/monolith/configuration.nix +++ b/monolith/configuration.nix @@ -1,4 +1,23 @@ { ... }: { + networking = { + hostName = "marauder"; + networkmanager.enable = true; + }; + + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + users.users = { + nettika = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" ]; + }; + }; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + time.timeZone = "America/Los_Angeles"; system.stateVersion = "24.05";