diff options
author | David Morgan <djm_uk@protonmail.com> | 2025-07-25 20:30:22 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2025-07-25 20:30:22 +0100 |
commit | 285c831dfd7b86dbf69ef2159d6a1d35f9c34cc5 (patch) | |
tree | 399f57cea0884e96910348b696fb78ada5dfc248 /nix-conf/home/flake.nix | |
parent | 67f27d5be6110b8daa9b680eade2742dfb1b0dd9 (diff) | |
download | dotfiles-flakes.tar.gz |
WIP flakes
Diffstat (limited to 'nix-conf/home/flake.nix')
-rw-r--r-- | nix-conf/home/flake.nix | 76 |
1 files changed, 49 insertions, 27 deletions
diff --git a/nix-conf/home/flake.nix b/nix-conf/home/flake.nix index 6573927..03af5b7 100644 --- a/nix-conf/home/flake.nix +++ b/nix-conf/home/flake.nix @@ -28,12 +28,21 @@ }; outputs = - { self, nixpkgs, nixpkgs-stable, nixpkgs-unstable, nix-darwin, home-manager, home-manager-stable, sops-nix, ... }@inputs: + { + self, + nixpkgs, + nixpkgs-stable, + nixpkgs-unstable, + nix-darwin, + home-manager, + home-manager-stable, + sops-nix, + ... + }@inputs: let darwin-system = "aarch64-darwin"; linux-system = "x86_64-linux"; linux-arm-system = "aarch64-linux"; - darwin-pkgs = nixpkgs.legacyPackages.${darwin-system}; linux-pkgs = nixpkgs-stable.legacyPackages.${linux-system}; darwin-overlay-unstable = final: prev: { unstable = nixpkgs-unstable.legacyPackages.${darwin-system}; @@ -49,47 +58,60 @@ darwinConfigurations."LDN-DMORGAN" = nix-darwin.lib.darwinSystem { modules = [ # TODO move to separate file - ({ pkgs, ... }: { - nix.settings.experimental-features = "nix-command flakes"; - nix.settings.trusted-users = [ "dmorgan" "@staff" ]; - nix.settings.ssl-cert-file = "/Users/dmorgan/certs/full-cert.pem"; - system.configurationRevision = self.rev or self.dirtyRev or null; - system.stateVersion = 6; - nixpkgs.hostPlatform = "aarch64-darwin"; - ids.gids.nixbld = 30000; - users.users.dmorgan.home = "/Users/dmorgan"; - fonts.packages = [ pkgs.aporetic pkgs.meslo-lgs-nf ]; - }) + ( + { pkgs, ... }: + { + nix.settings.experimental-features = "nix-command flakes"; + nix.settings.trusted-users = [ + "dmorgan" + "@staff" + ]; + nix.settings.ssl-cert-file = "/Users/dmorgan/certs/full-cert.pem"; + system.configurationRevision = self.rev or self.dirtyRev or null; + system.stateVersion = 6; + nixpkgs.hostPlatform = "aarch64-darwin"; + ids.gids.nixbld = 30000; + users.users.dmorgan.home = "/Users/dmorgan"; + fonts.packages = [ + pkgs.aporetic + pkgs.meslo-lgs-nf + pkgs.fira-code + ]; + } + ) home-manager.darwinModules.home-manager { nixpkgs.overlays = [ darwin-overlay-unstable ]; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "aspell-dict-en-science" ]; + nixpkgs.config.allowUnfreePredicate = + pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "aspell-dict-en-science" ]; home-manager = { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = { inherit inputs; system = darwin-system; }; + extraSpecialArgs = { + inherit inputs; + system = darwin-system; + }; users.dmorgan = ./otm.nix; }; } ]; }; - # TODO remove - homeConfigurations."dmorgan" = home-manager.lib.homeManagerConfiguration { - pkgs = darwin-pkgs; - extraSpecialArgs = { inherit inputs; system = darwin-system; }; - modules = [ - ({ config, pkgs, ... }: { nixpkgs.overlays = [ darwin-overlay-unstable ]; nix.package = pkgs.nix; }) - ./otm.nix - ]; - }; + # WIP: TODO: migrate home configs to nixos config homeConfigurations."djm-egalmoth" = home-manager-stable.lib.homeManagerConfiguration { pkgs = linux-pkgs; - extraSpecialArgs = { inherit inputs; system = linux-system; }; + extraSpecialArgs = { + inherit inputs; + system = linux-system; + }; modules = [ - ({ config, pkgs, ... }: { nixpkgs.overlays = [ linux-overlay-unstable ]; }) + ( + { config, pkgs, ... }: + { + nixpkgs.overlays = [ linux-overlay-unstable ]; + } + ) ./egalmoth.nix ]; }; }; } - |