Fix up for hermes

This commit is contained in:
Paul-Mathias Logue 2025-12-24 17:16:38 +01:00 committed by monologiq
parent abd055702b
commit 4a2dfb8e6e
5 changed files with 58 additions and 14 deletions

View file

@ -66,6 +66,11 @@
default = "769362f6-43d4-4b83-a12c-d006c9bd6613"; 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 { hostName = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "The name of the machine"; description = "The name of the machine";
@ -81,6 +86,23 @@
modules = [ modules = [
{ system.configurationRevision = self.rev or self.dirtyRev or null; } { system.configurationRevision = self.rev or self.dirtyRev or null; }
./machines/hermes.nix ./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";
};
};
}
)
]; ];
}; };

View file

@ -1,3 +1,4 @@
{ lib, ... }: { { lib, ... }:
{
} }

View file

@ -1,5 +1,23 @@
{ ... }: { ... }:
{ {
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
'';
};
} }

View file

@ -6,6 +6,8 @@
... ...
}: }:
let let
inherit (lib) mkDefault;
bootUUID = config.machine.fs.bootUUID; bootUUID = config.machine.fs.bootUUID;
efiUUID = config.machine.fs.efiUUID; efiUUID = config.machine.fs.efiUUID;
luuksUUID = config.machine.fs.luuksUUID; luuksUUID = config.machine.fs.luuksUUID;
@ -39,6 +41,11 @@ in
xbootldrMountPoint = "/boot"; xbootldrMountPoint = "/boot";
}; };
environment.sessionVariables = {
EDITOR = "${pkgs.vim}/bin/vim";
PAGER = "${pkgs.less}/bin/less";
};
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/${bootUUID}"; device = "/dev/disk/by-uuid/${bootUUID}";
fsType = "ext4"; fsType = "ext4";
@ -53,11 +60,6 @@ in
]; ];
}; };
environment.sessionVariables = {
EDITOR = "${pkgs.vim}/bin/vim";
PAGER = "${pkgs.less}/bin/less";
};
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/${cryptrootUUID}"; device = "/dev/disk/by-uuid/${cryptrootUUID}";
fsType = "btrfs"; fsType = "btrfs";
@ -112,6 +114,8 @@ in
options = [ "subvol=@var_lib_portables" ]; options = [ "subvol=@var_lib_portables" ];
}; };
networking.useDHCP = mkDefault true;
services.avahi.enable = true; services.avahi.enable = true;
services.openssh.enable = true; services.openssh.enable = true;

View file

@ -8,6 +8,8 @@ let
inherit (lib) mkDefault; inherit (lib) mkDefault;
in in
{ {
environment.pathsToLink = [ "/share/zsh" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
curl curl
git git
@ -15,10 +17,7 @@ in
wget wget
]; ];
networking = { networking.hostName = "${config.machine.hostName}";
hostName = "${config.machine.hostName}";
useDHCP = mkDefault true;
};
nix.package = pkgs.lixPackageSets.stable.lix; nix.package = pkgs.lixPackageSets.stable.lix;