From 4a2dfb8e6eabeb0ede639d00ddea2ffc16f00f0a Mon Sep 17 00:00:00 2001 From: Paul-Mathias Logue Date: Wed, 24 Dec 2025 17:16:38 +0100 Subject: [PATCH] Fix up for hermes --- flake.nix | 22 ++++++++++++++++++++++ lib/default.nix | 7 ++++--- profiles/desktop.darwin.nix | 22 ++++++++++++++++++++-- profiles/minimal.linux.nix | 14 +++++++++----- profiles/minimal.nix | 7 +++---- 5 files changed, 58 insertions(+), 14 deletions(-) diff --git a/flake.nix b/flake.nix index edc7d23..11ee0fc 100644 --- a/flake.nix +++ b/flake.nix @@ -66,6 +66,11 @@ default = "769362f6-43d4-4b83-a12c-d006c9bd6613"; }; }; + mainUser = lib.mkOption { + type = lib.types.str; + description = "The main user of the machine"; + default = "pml"; + }; hostName = lib.mkOption { type = lib.types.str; description = "The name of the machine"; @@ -81,6 +86,23 @@ modules = [ { system.configurationRevision = self.rev or self.dirtyRev or null; } ./machines/hermes.nix + ( + { lib, ... }: + { + options.machine = { + mainUser = lib.mkOption { + type = lib.types.str; + description = "The main user of the machine"; + default = "pml"; + }; + hostName = lib.mkOption { + type = lib.types.str; + description = "The name of the machine"; + default = "hermes"; + }; + }; + } + ) ]; }; diff --git a/lib/default.nix b/lib/default.nix index 3350e55..408b164 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,3 +1,4 @@ -{ lib, ... }: { - - } +{ lib, ... }: +{ + +} diff --git a/profiles/desktop.darwin.nix b/profiles/desktop.darwin.nix index 1ea63d5..f7c7de4 100644 --- a/profiles/desktop.darwin.nix +++ b/profiles/desktop.darwin.nix @@ -1,5 +1,23 @@ { ... }: { - -} \ No newline at end of file + homebrew = { + enable = true; + + casks = [ + "1password" + "1password-cli" + "adguard" + ]; + }; + + programs.zsh = { + enable = true; + enableGlobalCompInit = false; + shellInit = '' + if [ -e "/opt/homebrew/bin/brew" ]; then + eval "$(/opt/homebrew/bin/brew shellenv)" + fi + ''; + }; +} diff --git a/profiles/minimal.linux.nix b/profiles/minimal.linux.nix index 9fc8630..a5e8c81 100644 --- a/profiles/minimal.linux.nix +++ b/profiles/minimal.linux.nix @@ -6,6 +6,8 @@ ... }: let + inherit (lib) mkDefault; + bootUUID = config.machine.fs.bootUUID; efiUUID = config.machine.fs.efiUUID; luuksUUID = config.machine.fs.luuksUUID; @@ -39,6 +41,11 @@ in xbootldrMountPoint = "/boot"; }; + environment.sessionVariables = { + EDITOR = "${pkgs.vim}/bin/vim"; + PAGER = "${pkgs.less}/bin/less"; + }; + fileSystems."/boot" = { device = "/dev/disk/by-uuid/${bootUUID}"; fsType = "ext4"; @@ -53,11 +60,6 @@ in ]; }; - environment.sessionVariables = { - EDITOR = "${pkgs.vim}/bin/vim"; - PAGER = "${pkgs.less}/bin/less"; - }; - fileSystems."/" = { device = "/dev/disk/by-uuid/${cryptrootUUID}"; fsType = "btrfs"; @@ -112,6 +114,8 @@ in options = [ "subvol=@var_lib_portables" ]; }; + networking.useDHCP = mkDefault true; + services.avahi.enable = true; services.openssh.enable = true; diff --git a/profiles/minimal.nix b/profiles/minimal.nix index 641b8d4..1622c48 100644 --- a/profiles/minimal.nix +++ b/profiles/minimal.nix @@ -8,6 +8,8 @@ let inherit (lib) mkDefault; in { + environment.pathsToLink = [ "/share/zsh" ]; + environment.systemPackages = with pkgs; [ curl git @@ -15,10 +17,7 @@ in wget ]; - networking = { - hostName = "${config.machine.hostName}"; - useDHCP = mkDefault true; - }; + networking.hostName = "${config.machine.hostName}"; nix.package = pkgs.lixPackageSets.stable.lix;