From 87c74f1079b76e3e7cb25e72b11e5c4748b6966e Mon Sep 17 00:00:00 2001 From: Paul-Mathias Logue Date: Sun, 14 Dec 2025 21:43:02 +0100 Subject: [PATCH] mecure: Initial config --- flake.lock | 22 ++++++++++++++++++++++ flake.nix | 13 +++++++++++-- machines/hermes/default.nix | 9 +++------ machines/mercure/default.nix | 13 +++++++++++++ 4 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 machines/mercure/default.nix diff --git a/flake.lock b/flake.lock index e73360a..1096374 100644 --- a/flake.lock +++ b/flake.lock @@ -105,6 +105,27 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765066094, + "narHash": "sha256-0YSU35gfRFJzx/lTGgOt6ubP8K6LeW0vaywzNNqxkl4=", + "owner": "nix-darwin", + "repo": "nix-darwin", + "rev": "688427b1aab9afb478ca07989dc754fa543e03d5", + "type": "github" + }, + "original": { + "owner": "nix-darwin", + "ref": "nix-darwin-25.11", + "repo": "nix-darwin", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1765311797, @@ -158,6 +179,7 @@ "inputs": { "apple-fonts": "apple-fonts", "lanzaboote": "lanzaboote", + "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs" } }, diff --git a/flake.nix b/flake.nix index 6c79a2b..d9260b0 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,12 @@ { - description = "A SecureBoot-enabled NixOS configurations"; + description = "monologiq's systems"; inputs = { nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*"; + nix-darwin.url = "github:nix-darwin/nix-darwin/nix-darwin-25.11"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + lanzaboote.url = "github:nix-community/lanzaboote/v1.0.0"; lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; @@ -34,7 +37,7 @@ ); in { - nixosConfigurations.hermes = inputs.nixpkgs.lib.nixosSystem { + nixosConfigurations."hermes" = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ @@ -43,6 +46,12 @@ ./users/pml.nix ]; }; + darwinConfigurations."mercure" = inputs.nix-darwin.lib.darwinSystem { + modules = [ + { system.configurationRevision = self.rev or self.dirtyRev or null; } + ./machines/mercure + ]; + }; overlays.default = import ./overlays; diff --git a/machines/hermes/default.nix b/machines/hermes/default.nix index 794ebcb..d5bfe9f 100644 --- a/machines/hermes/default.nix +++ b/machines/hermes/default.nix @@ -18,7 +18,7 @@ ]; boot.kernelPackages = pkgs.linuxPackages_6_17; - + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; time.timeZone = "Europe/Paris"; @@ -39,11 +39,9 @@ trusted-public-keys = [ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ]; }; - # Enable required services for Wayland security.polkit.enable = true; programs.dconf.enable = true; - # List packages installed in system profile. # You can use https://search.nixos.org/ to find more packages (and options). @@ -172,11 +170,11 @@ # Create the niri config for greetd # environment.etc."greetd/niri.kdl".text = '' # spawn-sh-at-startup "regreet; niri msg action quit --skip-confirmation" - # + # # hotkey-overlay { # skip-at-startup # } - # + # # cursor { # xcursor-theme "Adwaita" # xcursor-size 24 @@ -186,6 +184,5 @@ # Optional: Enable niri for user sessions programs.niri.enable = true; - system.stateVersion = "25.05"; # Did you read the comment? } diff --git a/machines/mercure/default.nix b/machines/mercure/default.nix new file mode 100644 index 0000000..918d775 --- /dev/null +++ b/machines/mercure/default.nix @@ -0,0 +1,13 @@ +{ self, pkgs, ... }: + +{ + environment.systemPackages = [ + pkgs.vim + ]; + + nix.settings.experimental-features = "nix-command flakes"; + + system.stateVersion = 6; + + nixpkgs.hostPlatform = "aarch64-darwin"; +}