diff --git a/flake.nix b/flake.nix index 11a075a..dad3494 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,7 @@ , nixos , home , nixos-hardware + , darwin , pinebook-pro , pinebook-pro-kernel-latest , nixpkgs-wayland @@ -119,6 +120,7 @@ ]; }; hosts = { + # mbp is added bypassing Digga's mkFlake and adding a specific output to this flake pc = { system = "x86_64-linux"; }; @@ -179,5 +181,12 @@ // { budModules = { devos = import ./bud; }; # checks.aarch64-linux = { }; # this line will be uncommented by Github Action in order since it can't build aarch64 derivations + } + // { + darwinConfigurations."mbp" = darwin.lib.darwinSystem { + system = "x86_64-darwin"; + modules = [ home.darwinModules.home-manager ./hosts/mbp ]; + inputs = { inherit darwin; }; + }; }; } diff --git a/hosts/mbp/configuration.nix b/hosts/mbp/configuration.nix new file mode 100644 index 0000000..94fccdc --- /dev/null +++ b/hosts/mbp/configuration.nix @@ -0,0 +1,30 @@ +{pkgs, home-manager, ...}: +{ + imports = [ + ../../users/andreaciceri + ]; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + }; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + nix = { + package = pkgs.nixUnstable; + extraOptions = '' + experimental-features = nix-command flakes flakes ca-references + keep-derivations = true + keep-outputs = true + ''; + gc = { + automatic = false; + user = "andreaciceri"; + options = "--delete-older-than 3d"; + }; + }; + } diff --git a/hosts/mbp/default.nix b/hosts/mbp/default.nix new file mode 100644 index 0000000..f8bb144 --- /dev/null +++ b/hosts/mbp/default.nix @@ -0,0 +1,8 @@ +{ pkgs, ...}: +{ + imports = [ + ./configuration.nix + ]; + + +} diff --git a/users/andreaciceri/default.nix b/users/andreaciceri/default.nix new file mode 100644 index 0000000..a1f2ed7 --- /dev/null +++ b/users/andreaciceri/default.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: { + home-manager.users."andreaciceri" = {...}: { + imports = [ + ../profiles/bat + ../profiles/fzf + ../profiles/zsh + ../profiles/direnv + ../profiles/exa + ]; + home.packages = with pkgs; [ + yarn + ]; + }; + +} diff --git a/users/profiles/zsh/default.nix b/users/profiles/zsh/default.nix index a4a41ef..9fc4aae 100644 --- a/users/profiles/zsh/default.nix +++ b/users/profiles/zsh/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs.zsh = { enable = true; @@ -55,5 +55,8 @@ PROMPT = "\\\${IN_NIX_SHELL:+[nix-shell] }$PROMPT"; }; loginExtra = "[[ -z $DISPLAY && $TTY = /dev/tty1 ]] && exec sway"; + initExtra = if pkgs.system == "x86_64-darwin" + then "if test -e /etc/static/bashrc; then source /etc/static/bashrc > /dev/null 2>&1; fi" + else ""; }; }