diff --git a/flake.nix b/flake.nix index e9a541e..ac5deb5 100644 --- a/flake.nix +++ b/flake.nix @@ -160,9 +160,8 @@ pkgs = nixpkgs.legacyPackages.${system}; extraSpecialArgs = { - inherit userName userEmail hostname; - ghostty = ghostty.packages.${system}.default; - isNixOS = false; + inherit userName userEmail hostname ghostty; + isNixOS = false; role = "workstation"; }; modules = [ diff --git a/home/browser.nix b/home/browser.nix index cbe2f9f..956ead3 100644 --- a/home/browser.nix +++ b/home/browser.nix @@ -1,8 +1,7 @@ { pkgs, lib, - isNixOS, - role, + isNixOS ? true, ... }: { programs.firefox = { diff --git a/home/default.nix b/home/default.nix index 50aefef..6176523 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,19 +1,20 @@ { lib , pkgs , userName -, userEmail -, ghostty , isNixOS ? true -, role , ... }: 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 = { defaults = ../defaults; }; in { + _module.args = { + inherit dirs; + }; + # Import sub modules imports = [ ./packages diff --git a/home/packages/common.nix b/home/packages/common.nix index b7a9456..5ffebe3 100644 --- a/home/packages/common.nix +++ b/home/packages/common.nix @@ -1,5 +1,4 @@ { - lib, pkgs, ... }: { @@ -13,6 +12,8 @@ ../bat.nix ]; + nixpkgs.config.allowUnfree = true; + home.packages = with pkgs; [ # archives zip diff --git a/home/packages/darwin.nix b/home/packages/darwin.nix index f078397..11e3893 100644 --- a/home/packages/darwin.nix +++ b/home/packages/darwin.nix @@ -1,7 +1,5 @@ -{ - pkgs, - ... -}: { +{ lib, pkgs, ... }: +lib.mkIf pkgs.stdenv.isDarwin { home.packages = with pkgs; [ discord ollama diff --git a/home/packages/default.nix b/home/packages/default.nix index b824755..c815e4c 100644 --- a/home/packages/default.nix +++ b/home/packages/default.nix @@ -1,20 +1,11 @@ -{ pkgs, lib, role, ... }: +{ lib, role, ... }: { imports = - [ ./common.nix ]; - - config = lib.mkMerge [ - (lib.mkIf pkgs.stdenv.isDarwin { - imports = [ ./darwin.nix ]; - }) - (lib.mkIf pkgs.stdenv.isLinux { - imports = [ ./linux.nix ]; - }) - (lib.mkIf (role == "workstation") { - imports = [ ./workstation.nix ]; - }) - (lib.mkIf (role == "server") { - imports = [ ./server.nix ]; - }) - ]; -} \ No newline at end of file + [ + ./common.nix + ./darwin.nix + ./linux.nix + ] + ++ lib.optional (role == "workstation") ./workstation.nix + ++ lib.optional (role == "server") ./server.nix; +} diff --git a/home/packages/linux.nix b/home/packages/linux.nix index f901481..b2fe47e 100644 --- a/home/packages/linux.nix +++ b/home/packages/linux.nix @@ -1,19 +1,16 @@ -{ - pkgs, - ... -}: { +{ lib, pkgs, isNixOS ? true, ... }: +lib.mkIf pkgs.stdenv.isLinux { home.packages = with pkgs; [ imv + xdg-utils + ] ++ lib.optional isNixOS [ betterdiscordctl vesktop - xdg-utils - mcrcon xfce.thunar pavucontrol godot aseprite gpu-screen-recorder gpu-screen-recorder-gtk - # ungoogled-chromium ]; } diff --git a/home/packages/server.nix b/home/packages/server.nix index fff827a..5fcd428 100644 --- a/home/packages/server.nix +++ b/home/packages/server.nix @@ -1,4 +1,4 @@ { pkgs, ... }: { - home.packages = with pkgs; [ - ]; + home.packages = [ + ]; } diff --git a/home/packages/workstation.nix b/home/packages/workstation.nix index 7a97699..083eab9 100644 --- a/home/packages/workstation.nix +++ b/home/packages/workstation.nix @@ -1,16 +1,12 @@ { lib, pkgs, - dirs, - userName, - userEmail, - ghostty, - isNixOS, + isNixOS ? true, ... }: { imports = [ ../terminal.nix - ../broswer.nix + ../browser.nix ../zellij.nix ../lazygit.nix ../k9s.nix