diff --git a/nix/flake.lock b/nix/flake.lock index ba479bb..100c5c8 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -20,6 +20,24 @@ "type": "github" } }, + "dotfiles": { + "flake": false, + "locked": { + "lastModified": 1686302382, + "narHash": "sha256-BKJnBMPuFylshzuY8EQoyP6xuAGcxCauJspl1cVkg/A=", + "ref": "refs/heads/master", + "rev": "4ea89899caf8a0fd87cdfdc4601f7e79fc666c37", + "revCount": 360, + "submodules": true, + "type": "git", + "url": "https://github.com/keanuplayz/dotfiles" + }, + "original": { + "submodules": true, + "type": "git", + "url": "https://github.com/keanuplayz/dotfiles" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -27,11 +45,11 @@ ] }, "locked": { - "lastModified": 1686265152, - "narHash": "sha256-ArdPMx2G2rWlnGlqfIV+efTKXcN7F3W0/b5XKYq7n8E=", + "lastModified": 1686305101, + "narHash": "sha256-xCgeI+uTKay3Ab3tMdP9m9flIJbFkRMKwRAmg5PQhJQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "2bbfc3a78afb4ea60345a5660d8d4173da66c884", + "rev": "1e5d741ea3f3290d7ac06a02ded24bfdc7aadb37", "type": "github" }, "original": { @@ -42,11 +60,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1686087926, - "narHash": "sha256-mXzfJpCCT7Vup2sC3rZPB/AbEW+uBjwT027XWm7R6rA=", + "lastModified": 1686265002, + "narHash": "sha256-JcRprVevSl5JNCp2oHy8fd3zvTsnuQgVCay0/sP/1GE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9ea6dd599d2781168e36486745b5d17e826ab015", + "rev": "9e447f1c786f9d1375c3c8b2bff2c9400c63a34e", "type": "github" }, "original": { @@ -59,6 +77,7 @@ "root": { "inputs": { "darwin": "darwin", + "dotfiles": "dotfiles", "home-manager": "home-manager", "nixpkgs": "nixpkgs" } diff --git a/nix/flake.nix b/nix/flake.nix index 16e84cb..02638ee 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -8,13 +8,23 @@ # nix will normally use the nixpkgs defined in home-managers inputs, we only want one copy of nixpkgs though darwin.url = "github:lnl7/nix-darwin"; darwin.inputs.nixpkgs.follows = "nixpkgs"; # ... + dotfiles = { + url = "https://github.com/keanuplayz/dotfiles"; + type = "git"; + submodules = true; + flake = false; + }; }; # add the inputs declared above to the argument attribute set - outputs = { self, nixpkgs, home-manager, darwin }: { + outputs = { self, nixpkgs, home-manager, dotfiles, darwin }: { darwinConfigurations."alymac" = darwin.lib.darwinSystem { system = "x86_64-darwin"; - modules = [ ./hosts/alymac/default.nix ]; + specialArgs = { inherit dotfiles; }; + modules = [ + home-manager.darwinModules.home-manager + ./hosts/alymac/default.nix + ]; }; }; } diff --git a/nix/hosts/alymac/default.nix b/nix/hosts/alymac/default.nix index e6fe9cf..773055a 100644 --- a/nix/hosts/alymac/default.nix +++ b/nix/hosts/alymac/default.nix @@ -1,15 +1,54 @@ # hosts/YourHostName/default.nix -{ pkgs, ... }: +{ pkgs, dotfiles, ... }: { # Make sure the nix daemon always runs services.nix-daemon.enable = true; # Installs a version of nix, that dosen't need "experimental-features = nix-command flakes" in /etc/nix/nix.conf # services.nix-daemon.package = pkgs.nixFlakes; + + users.users.alyxia = { + name = "alyxia"; + home = "/Users/alyxia"; + }; - # if you use zsh (the default on new macOS installations), - # you'll need to enable this so nix-darwin creates a zshrc sourcing needed environment changes - programs.zsh.enable = true; - # bash is enabled by default + + # enable the gpg agent by default + programs.gnupg.agent.enable = true; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.alyxia = { pkgs, ... }: { + programs.zsh = { + enable = true; + initExtra = '' + export GPG_TTY=$(tty) + source ${dotfiles}/zsh/zshrc + ''; + }; + + programs.git = { + enable = true; + package = pkgs.gitAndTools.gitFull; # contains git send-email et al + + userName = "Alyxia Sother"; + userEmail = "alyxia@riseup.net"; + + signing = { + key = "01E16C4E775A37E4"; + signByDefault = true; + }; + + delta.enable = true; + }; + + programs.gitui.enable = true; + + # DO NOT CHANGE UNLESS YOU ARE ABSOLUTELY SURE ALL STATE AFFECTED BY THIS + # OPTION IS APPROPRIATELY MIGRATED!!! + home.stateVersion = "23.05"; # did you read the comment? + }; + }; homebrew = { enable = true;