working? plus cleanup and fallbacks

This commit is contained in:
2025-11-17 12:12:17 -05:00
parent 6561e37119
commit 4207b320c9
9 changed files with 29 additions and 47 deletions

View File

@@ -160,9 +160,8 @@
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = { extraSpecialArgs = {
inherit userName userEmail hostname; inherit userName userEmail hostname ghostty;
ghostty = ghostty.packages.${system}.default; isNixOS = false;
isNixOS = false;
role = "workstation"; role = "workstation";
}; };
modules = [ modules = [

View File

@@ -1,8 +1,7 @@
{ {
pkgs, pkgs,
lib, lib,
isNixOS, isNixOS ? true,
role,
... ...
}: { }: {
programs.firefox = { programs.firefox = {

View File

@@ -1,19 +1,20 @@
{ lib { lib
, pkgs , pkgs
, userName , userName
, userEmail
, ghostty
, isNixOS ? true , isNixOS ? true
, role
, ... , ...
}: }:
let let
# Have a file structure that holds all the configuration files that can't be configured by Nix # TODO: Have a file structure that holds all the configuration files that can't be configured by Nix (or I haven't found the time to do so)
dirs = { dirs = {
defaults = ../defaults; defaults = ../defaults;
}; };
in in
{ {
_module.args = {
inherit dirs;
};
# Import sub modules # Import sub modules
imports = [ imports = [
./packages ./packages

View File

@@ -1,5 +1,4 @@
{ {
lib,
pkgs, pkgs,
... ...
}: { }: {
@@ -13,6 +12,8 @@
../bat.nix ../bat.nix
]; ];
nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
# archives # archives
zip zip

View File

@@ -1,7 +1,5 @@
{ { lib, pkgs, ... }:
pkgs, lib.mkIf pkgs.stdenv.isDarwin {
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
discord discord
ollama ollama

View File

@@ -1,20 +1,11 @@
{ pkgs, lib, role, ... }: { lib, role, ... }:
{ {
imports = imports =
[ ./common.nix ]; [
./common.nix
config = lib.mkMerge [ ./darwin.nix
(lib.mkIf pkgs.stdenv.isDarwin { ./linux.nix
imports = [ ./darwin.nix ]; ]
}) ++ lib.optional (role == "workstation") ./workstation.nix
(lib.mkIf pkgs.stdenv.isLinux { ++ lib.optional (role == "server") ./server.nix;
imports = [ ./linux.nix ]; }
})
(lib.mkIf (role == "workstation") {
imports = [ ./workstation.nix ];
})
(lib.mkIf (role == "server") {
imports = [ ./server.nix ];
})
];
}

View File

@@ -1,19 +1,16 @@
{ { lib, pkgs, isNixOS ? true, ... }:
pkgs, lib.mkIf pkgs.stdenv.isLinux {
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
imv imv
xdg-utils
] ++ lib.optional isNixOS [
betterdiscordctl betterdiscordctl
vesktop vesktop
xdg-utils
mcrcon
xfce.thunar xfce.thunar
pavucontrol pavucontrol
godot godot
aseprite aseprite
gpu-screen-recorder gpu-screen-recorder
gpu-screen-recorder-gtk gpu-screen-recorder-gtk
# ungoogled-chromium
]; ];
} }

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: { { pkgs, ... }: {
home.packages = with pkgs; [ home.packages = [
]; ];
} }

View File

@@ -1,16 +1,12 @@
{ {
lib, lib,
pkgs, pkgs,
dirs, isNixOS ? true,
userName,
userEmail,
ghostty,
isNixOS,
... ...
}: { }: {
imports = [ imports = [
../terminal.nix ../terminal.nix
../broswer.nix ../browser.nix
../zellij.nix ../zellij.nix
../lazygit.nix ../lazygit.nix
../k9s.nix ../k9s.nix