diff --git a/darwin/default.nix b/darwin/default.nix index f693ae1..4696a8e 100644 --- a/darwin/default.nix +++ b/darwin/default.nix @@ -18,6 +18,7 @@ let { nixpkgs.overlays = overlays; } hm.darwinModules.home-manager { + system.stateVersion = 4; home-manager = { useGlobalPkgs = true; users."gregory.hellings" = import ../home/home.nix; @@ -30,8 +31,16 @@ let }; }; users.users."gregory.hellings".home = "/Users/gregory.hellings"; + programs = { + zsh.enable = true; + bash.enable = true; + }; + services.nix-daemon.enable = true; + nix = { + gc.interval.Hour = 24; + settings.auto-optimise-store = false; # Darwin bugs? + }; } - ../modules ./${name} ] ++ extraMods; }; diff --git a/flake.lock b/flake.lock index 38c4257..22afd1f 100644 --- a/flake.lock +++ b/flake.lock @@ -49,11 +49,11 @@ ] }, "locked": { - "lastModified": 1697723594, - "narHash": "sha256-W7lTC+kHGS1YCOutGpxUHF0cK66iY/GYr3INaTyVa/I=", + "lastModified": 1705915768, + "narHash": "sha256-+Jlz8OAqkOwJlioac9wtpsCnjgGYUhvLpgJR/5tP9po=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "19f75c2b45fbfc307ecfeb9dadc41a4c1e4fb980", + "rev": "1e706ef323de76236eb183d7784f3bd57255ec0b", "type": "github" }, "original": { @@ -406,11 +406,11 @@ }, "nixunstable": { "locked": { - "lastModified": 1705677747, - "narHash": "sha256-eyM3okYtMgYDgmYukoUzrmuoY4xl4FUujnsv/P6I/zI=", + "lastModified": 1705856552, + "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bbe7d8f876fbbe7c959c90ba2ae2852220573261", + "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", "type": "github" }, "original": { diff --git a/home/home.nix b/home/home.nix index 3052a2d..1c34309 100644 --- a/home/home.nix +++ b/home/home.nix @@ -35,7 +35,6 @@ home.stateVersion = "23.05"; home.packages = with pkgs; [ bitwarden-cli - copier diffutils findutils gh @@ -54,8 +53,5 @@ tree unzip wget - ] ++ ( if pkgs.system == "x86_64-linux" || pkgs.system == "aarch64-linux" then - # Linux-only packages here - [ - ] else []); + ] ++ (if (pkgs.copier.version == "9.1.0") then [ pkgs.copier ] else []); } diff --git a/home/xonsh.nix b/home/xonsh.nix index a8ba094..3936c9d 100644 --- a/home/xonsh.nix +++ b/home/xonsh.nix @@ -28,20 +28,20 @@ GOPATH = "${config.home.homeDirectory}/src/go"; GOBIN = "${config.home.homeDirectory}/src/bin"; - EFI_DIR = "${pkgs.OVMF.fd}/FV/"; - + EFI_DIR = lib.mkIf pkgs.stdenv.isLinux "${pkgs.OVMF.fd}/FV/"; }; aliases = { ac = "vox activate"; + cavg = "compass workspace exec bazel run src/go/compass.com/tools/circleci_results_cache/avg_duration/cmd/avg_duration:avg_duration"; cbazel = "compass workspace exec bazel"; cblack = "compass workspace run src/python3/uc/tools:run_black --"; cbuild = "compass workspace build"; cci = "compass workspace run src/python3/uc/tools:circleci-checks"; ccover = "compass workspace cover --extra-cmd-args=\"--test_output=errors\""; cexec = "compass workspace exec"; - cfetch = "compass workspace exec bazel run src/go/compass.com/tools/circleci_results_cache:fetch"; + cfetch = "compass workspace exec bazel run src/go/compass.com/tools/circleci_results_cache/fetch/cmd/fetch:fetch"; cgh = "$GH_CONFIG_DIR=\"${config.home.homeDirectory}/.config/gh/compass\" gh"; cpip = "compass workspace run src/python3/uc/tools:run_pip_compile"; crun = "compass workspace run"; diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix deleted file mode 100644 index 7979b86..0000000 --- a/modules/darwin/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ ... }: - -{ - system.stateVersion = 4; - programs = { - zsh.enable = true; - bash.enable = true; - }; - services.nix-daemon.enable = true; - nix.gc.interval.Hour = 24; -} diff --git a/modules/default.nix b/modules/default.nix index 55b90a5..7ac1448 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -2,12 +2,12 @@ let inherit (lib.strings) hasSuffix; - system = pkgs.system; in -{ + system = pkgs.system; + inherit (pkgs.stdenv) isDarwin isLinux; +in { imports = [ ] - ++ (if (lib.strings.hasSuffix "darwin" "nope") then [./darwin] else []) - ++ (if (lib.strings.hasSuffix "linux" "linux") then [./linux] else []); + ++ (if (isLinux) then [./linux] else []); # Enable flakes nix = { @@ -20,7 +20,7 @@ let }; settings = { - auto-optimise-store = (if lib.strings.hasSuffix "darwin" pkgs.system then false else true); + auto-optimise-store = true; experimental-features = "nix-command flakes"; keep-outputs = true; keep-derivations = true;