Initial config for jupiter
This commit is contained in:
103
flake.nix
Normal file
103
flake.nix
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
description = "home machine config from dotfiles";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
# too many issues with screen 5.0
|
||||
# - load average in status broken
|
||||
# - background colors in programs (eg less) not showing
|
||||
# - caption and hardstatus color lacks intensity
|
||||
nixpkgs-screen.url = "github:NixOS/nixpkgs/e518d4ad2bcad74f98fec028cf21ce5b1e5020dd";
|
||||
systems.url = "github:nix-systems/default";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
fw_nix = {
|
||||
url = "git+https://github.com/futureware-tech/nix.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
darwin = {
|
||||
url = "github:nix-darwin/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
|
||||
git-hooks = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
artem_dotfiles = {
|
||||
url = "git+https://github.com/dotdoom/dotfiles.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
home-manager,
|
||||
darwin,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
eachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||
in
|
||||
{
|
||||
checks = eachSystem (system: {
|
||||
pre-commit-check = inputs.git-hooks.lib.${system}.run (
|
||||
{
|
||||
src = ./.;
|
||||
}
|
||||
// inputs.fw_nix.lib.pre-commit
|
||||
);
|
||||
});
|
||||
|
||||
homeConfigurations."katarina@jupiter" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
|
||||
extraSpecialArgs.primaryUser = "katarina";
|
||||
modules = [
|
||||
inputs.artem_dotfiles.homeModules.mac-portable
|
||||
./hosts/jupiter/home.nix
|
||||
];
|
||||
};
|
||||
|
||||
darwinConfigurations.jupiter = darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
specialArgs.primaryUser = "katarina";
|
||||
modules = [
|
||||
inputs.artem_dotfiles.darwinModules.mac-portable
|
||||
inputs.fw_nix.nixosModules.tools
|
||||
inputs.fw_nix.nixosModules.nix-settings
|
||||
inputs.fw_nix.nixosModules.futureware
|
||||
inputs.nix-homebrew.darwinModules.nix-homebrew
|
||||
(
|
||||
{ lib, ... }:
|
||||
{
|
||||
# TODO: find solution to these ugly workarounds
|
||||
options.programs.htop = lib.mkOption {
|
||||
type = lib.types.deferredModule;
|
||||
default = { };
|
||||
};
|
||||
}
|
||||
)
|
||||
./hosts/jupiter/darwin.nix
|
||||
];
|
||||
};
|
||||
|
||||
devShells = eachSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
inherit (self.checks.${system}.pre-commit-check) shellHook enabledPackages;
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
packages = enabledPackages;
|
||||
inherit shellHook;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user