diff --git a/flake.nix b/flake.nix index 6cd2655..2883726 100644 --- a/flake.nix +++ b/flake.nix @@ -20,16 +20,9 @@ agenix, }: let - macbook = import ./systems/macbook/macbook.nix { - nix-darwin = nix-darwin; - home-manager = home-manager; - self = self; - agenix = agenix; - }; + macbook = import ./systems/macbook/macbook.nix inputs; - selene = import ./systems/selene/system.nix { - agenix = agenix; - }; + selene = import ./systems/selene/system.nix inputs; in { # Build darwin flake using: diff --git a/modules/usermodules/git.nix b/modules/usermodules/git.nix new file mode 100644 index 0000000..9d3f065 --- /dev/null +++ b/modules/usermodules/git.nix @@ -0,0 +1,9 @@ +{ + programs.git = { + enable = true; + extraConfig = { + user.name = "Maxiem Geldhof"; + user.email = "author@maxiemgeldhof.com"; + }; + }; +} \ No newline at end of file diff --git a/modules/usermodules/zsh.nix b/modules/usermodules/zsh.nix new file mode 100644 index 0000000..55955ee --- /dev/null +++ b/modules/usermodules/zsh.nix @@ -0,0 +1,28 @@ +{ + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + shellAliases = { + ll = "ls -l"; + edit = "sudo -e"; + update = "sudo nixos-rebuild switch"; + }; + + history.size = 10000; + history.ignoreAllDups = true; + history.path = "$HOME/.zsh_history"; + history.ignorePatterns = [ + "rm *" + "pkill *" + "cp *" + ]; + + oh-my-zsh = { + enable = true; + theme = "robbyrussell"; + }; + }; +} diff --git a/systems/macbook/macbook.nix b/systems/macbook/macbook.nix index e284e99..97e8b97 100644 --- a/systems/macbook/macbook.nix +++ b/systems/macbook/macbook.nix @@ -1,4 +1,4 @@ -{ nix-darwin, home-manager, agenix, self }: +{ nix-darwin, home-manager, agenix, self, ... }: nix-darwin.lib.darwinSystem { modules = [ { system.primaryUser = "maxiemgeldhof"; } diff --git a/systems/macbook/users.nix b/systems/macbook/users.nix index db41f22..da4bb7a 100644 --- a/systems/macbook/users.nix +++ b/systems/macbook/users.nix @@ -1,12 +1,21 @@ -{ pkgs, home-manager, config, ... }: +{ + pkgs, + home-manager, + config, + ... +}: let userconfig = { home.stateVersion = "25.05"; home.homeDirectory = "/Users/maxiemgeldhof"; programs.home-manager.enable = true; + + programs.zsh = (import ../../modules/usermodules/zsh.nix).programs.zsh; + programs.git = (import ../../modules/usermodules/git.nix).programs.git; }; -in { +in +{ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.maxiemgeldhof = userconfig; diff --git a/systems/selene/system.nix b/systems/selene/system.nix index a50b102..2a7edc4 100644 --- a/systems/selene/system.nix +++ b/systems/selene/system.nix @@ -1,4 +1,4 @@ -{ agenix }: +{ agenix, jellyfin-exporter, nixpkgs, ... }: nixpkgs.lib.nixosSystem { system = system; specialArgs = {