From 45c4e136c46d7c055d7c3fde07494a8668bb67a7 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Wed, 12 Mar 2025 03:37:06 +0800 Subject: [PATCH] feat: finished orpheus and nemesis DINALLY --- flake.lock | 16 ++++++++++++++++ flake.nix | 17 +++++++++++++++-- systems/modules/common.nix | 3 ++- systems/orpheus.nix | 1 + 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 47d489c..283cdb6 100644 --- a/flake.lock +++ b/flake.lock @@ -809,6 +809,21 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1741325094, + "narHash": "sha256-RUAdT8dZ6k/486vnu3tiNRrNW6+Q8uSD2Mq7gTX4jlo=", + "owner": "nixos", + "repo": "nixos-hardware", + "rev": "b48cc4dab0f9711af296fc367b6108cf7b8ccb16", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1739020877, @@ -1065,6 +1080,7 @@ "home-manager": "home-manager", "hyprland": "hyprland", "nixd": "nixd", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", "nixvim": "nixvim", "nvf": "nvf", diff --git a/flake.nix b/flake.nix index 96d1b3a..4cf3735 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "NixOS setup for one host with home-manager"; + description = "flake forward setup with two hosts on different architectures"; outputs = { self, @@ -14,7 +14,6 @@ modules = [ ./systems/${hostname}.nix - # Add the home-manager user home-manager.nixosModules.home-manager { home-manager = { @@ -39,7 +38,20 @@ value = nixpkgs.lib.nixosSystem { specialArgs = args; modules = [ + inputs.nixos-hardware.nixosModules.raspberry-pi-4 + "${nixpkgs}/nixos/modules/profiles/minimal.nix" ./systems/orpheus.nix + + home-manager.nixosModules.home-manager + { + home-manager = { + useUserPackages = true; + extraSpecialArgs = args; + users.rafiq.imports = [ + ./users/rafiq.nix + ]; + }; + } ]; }; } @@ -48,6 +60,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixos-hardware.url = "github:nixos/nixos-hardware"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/systems/modules/common.nix b/systems/modules/common.nix index b6f2720..3f60ea7 100644 --- a/systems/modules/common.nix +++ b/systems/modules/common.nix @@ -7,7 +7,7 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILv8HqazE294YdyGaXK6q2EniDlTpGaUL071kk9+W0GJ rafiq@nemesis" ]; }; - + security.sudo = { wheelNeedsPassword = false; }; @@ -17,6 +17,7 @@ nixpkgs.config.allowUnfree = true; nix.settings.experimental-features = ["nix-command" "flakes"]; + nix.settings.trusted-users = ["root" "@wheel"]; environment.systemPackages = with pkgs; [ git diff --git a/systems/orpheus.nix b/systems/orpheus.nix index 779973e..b0eca32 100644 --- a/systems/orpheus.nix +++ b/systems/orpheus.nix @@ -7,6 +7,7 @@ imports = [ # Include the results of the hardware scan. ./hw-orpheus.nix + ./modules/common.nix ]; # Use the extlinux boot loader. (NixOS wants to enable GRUB by default)