Add work configuration
parent
001783fc7e
commit
dcaa733d4e
|
@ -7,20 +7,19 @@
|
|||
"https://hydra.iohk.io"
|
||||
"https://cache.iog.io"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://mat.cachix.org"
|
||||
];
|
||||
nix.binaryCachePublicKeys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"mat.cachix.org-1:AHqv9SoBEPKlJX2DDZQnjaMcvBAgpH1j8rw5USYDZno="
|
||||
];
|
||||
nix.trustedUsers = [
|
||||
"@admin"
|
||||
];
|
||||
users.nix.configureBuildUsers = true;
|
||||
|
||||
nix.buildCores = 2;
|
||||
nix.maxJobs = 4;
|
||||
|
||||
# Enable experimental nix command and flakes
|
||||
nix.extraOptions = ''
|
||||
auto-optimise-store = true
|
||||
|
|
|
@ -4,6 +4,7 @@ let
|
|||
inherit (lib) mkIf;
|
||||
mkIfCaskPresent = cask: mkIf (lib.any (x: x == cask) config.homebrew.casks);
|
||||
brewEnabled = config.homebrew.enable;
|
||||
gamesEnabled = config.games.enable;
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -16,7 +17,8 @@ in
|
|||
# https://docs.brew.sh/Shell-Completion#configuring-completions-in-fish
|
||||
# For some reason if the Fish completions are added at the end of `fish_complete_path` they don't
|
||||
# seem to work, but they do work if added at the start.
|
||||
programs.fish.interactiveShellInit = mkIf brewEnabled ''
|
||||
# programs.fish.interactiveShellInit = mkIf brewEnabled ''
|
||||
programs.fish.interactiveShellInit = ''
|
||||
if test -d (brew --prefix)"/share/fish/completions"
|
||||
set -p fish_complete_path (brew --prefix)/share/fish/completions
|
||||
end
|
||||
|
@ -58,21 +60,24 @@ in
|
|||
"alfred"
|
||||
"bartender"
|
||||
"firefox"
|
||||
"gog-galaxy"
|
||||
"jitsi-meet"
|
||||
"knockknock"
|
||||
"lulu"
|
||||
"mimestream"
|
||||
# "mullvadvpn"
|
||||
"origin"
|
||||
"rectangle"
|
||||
"seaglass"
|
||||
"secretive"
|
||||
"signal"
|
||||
"steam"
|
||||
"transmission"
|
||||
# "twitch"
|
||||
# "utm"
|
||||
# "zoom"
|
||||
] ++ lib.optionals gamesEnabled [
|
||||
# games
|
||||
"gog-galaxy"
|
||||
"origin"
|
||||
"steam"
|
||||
];
|
||||
|
||||
# Configuration related to casks
|
||||
|
|
17
flake.lock
17
flake.lock
|
@ -136,6 +136,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"kitty-icon": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1640552536,
|
||||
"narHash": "sha256-3Jri8/y/s6/QkOBb03R9nd1gyZPGZlekhli9ShTzOxg=",
|
||||
"owner": "DinkDonk",
|
||||
"repo": "kitty-icon",
|
||||
"rev": "b19b3969d3bdc870beeff332355f92e38dc5a704",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "DinkDonk",
|
||||
"repo": "kitty-icon",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"luar-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -210,6 +226,7 @@
|
|||
"home-manager": "home-manager",
|
||||
"homebrew-enabled": "homebrew-enabled",
|
||||
"kakoune-sudo-write-src": "kakoune-sudo-write-src",
|
||||
"kitty-icon": "kitty-icon",
|
||||
"luar-src": "luar-src",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-master": "nixpkgs-master",
|
||||
|
|
53
flake.nix
53
flake.nix
|
@ -42,6 +42,10 @@
|
|||
url = github:occivink/kakoune-sudo-write;
|
||||
flake = false;
|
||||
};
|
||||
kitty-icon = {
|
||||
url = github:DinkDonk/kitty-icon;
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, darwin, nixpkgs, home-manager, flake-utils, ... }@inputs:
|
||||
|
@ -130,6 +134,34 @@
|
|||
networking.knownNetworkServices = [
|
||||
"Wi-Fi"
|
||||
];
|
||||
nix.buildCores = 2;
|
||||
nix.maxJobs = 4;
|
||||
|
||||
games.enable = true;
|
||||
home-manager.sharedModules = [{
|
||||
programs.git.userEmail = "mat@mat.services";
|
||||
programs.git.userName = "mat ess";
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
yelpbook-m1 = darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
modules = nixDarwinCommonModules ++ [
|
||||
{
|
||||
users.primaryUser = "mess";
|
||||
networking.knownNetworkServices = [
|
||||
"Wi-Fi"
|
||||
];
|
||||
nix.buildCores = 2;
|
||||
nix.maxJobs = 5;
|
||||
|
||||
games.enable = false;
|
||||
home-manager.sharedModules = [{
|
||||
programs.git.userEmail = "mess@yelp.com";
|
||||
programs.git.userName = "Matthew Ess";
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
@ -156,21 +188,6 @@
|
|||
nixpkgs = nixpkgsConfig;
|
||||
};
|
||||
};
|
||||
|
||||
# attrValues self.darwinModules ++ [
|
||||
# # Main `nix-darwin` config
|
||||
# ./configuration.nix
|
||||
# # `home-manager` module
|
||||
# home-manager.darwinModules.home-manager
|
||||
# {
|
||||
# nixpkgs = nixpkgsConfig;
|
||||
# # `home-manager` config
|
||||
# home-manager.useGlobalPkgs = true;
|
||||
# home-manager.useUserPackages = true;
|
||||
# home-manager.users.mat = import ./home.nix;
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
# Overlays --------------------------------------------------------------- {{{
|
||||
|
@ -210,9 +227,8 @@
|
|||
};
|
||||
|
||||
patched = final: prev: optionalAttrs prev.stdenv.isDarwin {
|
||||
lib = prev.lib // {
|
||||
homebrew-enabled = inputs.homebrew-enabled.value;
|
||||
};
|
||||
inherit (inputs) kitty-icon;
|
||||
lib = prev.lib // { homebrew-enabled = inputs.homebrew-enabled.value; };
|
||||
kakounePlugins = prev.kakounePlugins // {
|
||||
auto-pairs-kak = prev.kakounePlugins.auto-pairs-kak.overrideAttrs (attrs: {
|
||||
src = inputs.auto-pairs-kak-src;
|
||||
|
@ -223,6 +239,7 @@
|
|||
|
||||
# `nix-darwin` modules (some are pending upstream acceptance)
|
||||
darwinModules = {
|
||||
games = import ./modules/darwin/games.nix;
|
||||
programs-nix-index = import ./modules/darwin/programs/nix-index.nix;
|
||||
security-pam = import ./modules/darwin/security/pam.nix;
|
||||
users = import ./modules/darwin/users.nix;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
programs.git.enable = true;
|
||||
|
||||
programs.git.extraConfig = {
|
||||
core.editor = "${pkgs.neovim-remote}/bin/nvr --remote-wait-silent -cc split";
|
||||
# core.editor = "${pkgs.neovim-remote}/bin/nvr --remote-wait-silent -cc split";
|
||||
diff.colorMoved = "default";
|
||||
pull.rebase = true;
|
||||
init.defaultBranch = "main";
|
||||
|
@ -17,9 +17,6 @@
|
|||
".DS_Store"
|
||||
];
|
||||
|
||||
programs.git.userEmail = "mat@mat.services";
|
||||
programs.git.userName = "mat ess";
|
||||
|
||||
# Enhanced diffs
|
||||
programs.git.delta.enable = true;
|
||||
|
||||
|
|
|
@ -114,6 +114,6 @@ in
|
|||
programs.kitty.extras.fixIcon = {
|
||||
enable = true;
|
||||
appPath = "~/Applications/Home\\ Manager\\ Apps/kitty.app";
|
||||
iconPath = "~/Development/kitty-icon/kitty-dark.icns";
|
||||
iconPath = "${pkgs.kitty-icon}/kitty-dark.icns";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption;
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
games.enable = mkEnableOption "Enable games (managed by homebrew)";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue