add role variable, added ghostty terminal, updated flake

This commit is contained in:
Wyatt J. Miller 2025-05-29 12:53:25 -04:00
parent 464b27523e
commit b15c89f55c
5 changed files with 204 additions and 13 deletions

159
flake.lock generated
View File

@ -21,6 +21,63 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"ghostty": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"zig": "zig",
"zon2nix": "zon2nix"
},
"locked": {
"lastModified": 1748207486,
"narHash": "sha256-4kR7VyauWpNMrBePHMM8yzQvUzHHGRVkQpJ3DyoKcH0=",
"owner": "ghostty-org",
"repo": "ghostty",
"rev": "3f6c02b49e08aed51e4be85d87b79b9dbea34a85",
"type": "github"
},
"original": {
"owner": "ghostty-org",
"repo": "ghostty",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -74,13 +131,115 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1741992157,
"narHash": "sha256-nlIfTsTrMSksEJc1f7YexXiPVuzD1gOfeN1ggwZyUoc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "da4b122f63095ca1199bd4d526f9e26426697689",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1741865919,
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"darwin": "darwin",
"ghostty": "ghostty",
"home-manager": "home-manager",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"zig": {
"inputs": {
"flake-compat": [
"ghostty"
],
"flake-utils": [
"ghostty",
"flake-utils"
],
"nixpkgs": [
"ghostty",
"nixpkgs-stable"
]
},
"locked": {
"lastModified": 1741825901,
"narHash": "sha256-aeopo+aXg5I2IksOPFN79usw7AeimH1+tjfuMzJHFdk=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "0b14285e283f5a747f372fb2931835dd937c4383",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"type": "github"
}
},
"zon2nix": {
"inputs": {
"flake-utils": [
"ghostty",
"flake-utils"
],
"nixpkgs": [
"ghostty",
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1742104771,
"narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=",
"owner": "jcollie",
"repo": "zon2nix",
"rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613",
"type": "github"
},
"original": {
"owner": "jcollie",
"ref": "56c159be489cc6c0e73c3930bd908ddc6fe89613",
"repo": "zon2nix",
"type": "github"
}
}
},
"root": "root",

View File

@ -11,6 +11,7 @@
url = "github:lnl7/nix-darwin/nix-darwin-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
ghostty.url = "github:ghostty-org/ghostty";
};
outputs = inputs @ {
@ -19,20 +20,22 @@
nix-flatpak,
darwin,
home-manager,
ghostty,
...
}: let
userName = "wyatt";
userEmail = "wyatt@wyattjmiller.com";
extraSpecialArgs = {
inherit userName userEmail;
inherit userName userEmail ghostty;
};
in {
# Primary laptop - MacBook Pro (2023, M3)
darwinConfigurations."sephiroth" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = {
inherit userName userEmail;
inherit userName userEmail ghostty;
hostname = "sephiroth";
role = "devel";
};
modules = [
./modules/common
@ -52,8 +55,9 @@
nixosConfigurations."cloud" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit userName userEmail;
inherit userName userEmail ghostty;
hostname = "cloud";
role = "devel";
};
modules = [
nix-flatpak.nixosModules.nix-flatpak
@ -78,6 +82,7 @@
specialArgs = {
inherit userName userEmail;
hostname = "valefor";
role = "server";
};
modules = [
./modules/common
@ -101,6 +106,7 @@
specialArgs = {
inherit userName userEmail;
hostname = "ixion";
role = "server";
};
# modules = [
# nix-flatpak.nixosModules.nix-flatpak

View File

@ -3,6 +3,7 @@
pkgs,
userName,
userEmail,
ghostty,
...
}: let
# Have a file sturcture that holds all the configuration files that can't be configured by Nix
@ -12,7 +13,7 @@
};
in {
# Import sub modules
imports = map (module: import module {inherit lib pkgs dirs userName userEmail;}) [
imports = map (module: import module {inherit lib pkgs dirs userName userEmail ghostty;}) [
./atuin.nix
./shell.nix
./packages

View File

@ -6,6 +6,14 @@
dirs = {
defaults = ../defaults;
};
# Derived from subprojects/cava.wrap
libcava.src = pkgs.fetchFromGitHub {
owner = "LukashonakV";
repo = "cava";
rev = "0.10.3";
hash = "sha256-ZDFbI69ECsUTjbhlw2kHRufZbQMu+FQSMmncCJ5pagg=";
};
in {
wayland.windowManager.sway = {
enable = pkgs.stdenv.isLinux;
@ -23,9 +31,24 @@ in {
xdg.configFile."waybar/style.css".source = lib.mkForce (dirs.defaults + /waybar/style.css);
programs.rofi.enable = pkgs.stdenv.isLinux;
services.mako.enable = pkgs.stdenv.isLinux;
# programs.cliphist.enable = pkgs.stdenv.isLinux;
programs.waybar = {
enable = pkgs.stdenv.isLinux;
systemd.enable = true;
package = pkgs.waybar.overrideAttrs (old: {
version = "0.11.0";
src = pkgs.fetchFromGitHub {
owner = "Alexays";
repo = "Waybar";
rev = "d56dd6ee7fdf8c5ba4e90790af62b7f7829d3a47";
sha256 = "sha256-3lc0voMU5RS+mEtxKuRayq/uJO09X7byq6Rm5NZohq8=";
fetchSubmodules = true;
};
buildInputs = old.buildInputs ++ [ pkgs.fftw pkgs.libcava ];
# mesonFlags = (old.mesonFlags or []) ++ [ "-Dcava=disabled" ];
});
};
}

View File

@ -1,4 +1,4 @@
{pkgs, ...}: {
{pkgs, ghostty, ...}: {
programs.alacritty = {
enable = pkgs.stdenv.isLinux;
settings = {}; # TODO: this will be filled in the future
@ -7,4 +7,6 @@
programs.kitty = {
enable = false; # TODO: to enable later
};
home.packages = [ ghostty.packages.${pkgs.system}.default ];
}