Rename and refactor Darwin-specific modules
Renamed several modules to better align with Darwin-specific configurations. Refactored configuration for Alacritty and removed it from system packages where not needed. Introduced Homebrew settings and cleaned up redundant entries in multiple Nix files.
This commit is contained in:
parent
f5670d2c0e
commit
cbe03d1060
8 changed files with 63 additions and 58 deletions
|
@ -24,6 +24,11 @@ in
|
|||
nix-prefetch-git
|
||||
];
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
onActivation.autoUpdate = false;
|
||||
};
|
||||
|
||||
nix =
|
||||
let
|
||||
users = [
|
||||
|
@ -34,34 +39,35 @@ in
|
|||
{
|
||||
package = cfg.package;
|
||||
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
http-connections = 50;
|
||||
warn-dirty = false;
|
||||
log-lines = 50;
|
||||
settings =
|
||||
{
|
||||
experimental-features = "nix-command flakes";
|
||||
http-connections = 50;
|
||||
warn-dirty = false;
|
||||
log-lines = 50;
|
||||
|
||||
# Large builds apparently fail due to an issue with darwin:
|
||||
# https://github.com/NixOS/nix/issues/4119
|
||||
sandbox = false;
|
||||
# Large builds apparently fail due to an issue with darwin:
|
||||
# https://github.com/NixOS/nix/issues/4119
|
||||
sandbox = false;
|
||||
|
||||
# This appears to break on darwin
|
||||
# https://github.com/NixOS/nix/issues/7273
|
||||
auto-optimise-store = false;
|
||||
# This appears to break on darwin
|
||||
# https://github.com/NixOS/nix/issues/7273
|
||||
auto-optimise-store = false;
|
||||
|
||||
allow-import-from-derivation = true;
|
||||
allow-import-from-derivation = true;
|
||||
|
||||
trusted-users = users;
|
||||
allowed-users = users;
|
||||
trusted-users = users;
|
||||
allowed-users = users;
|
||||
|
||||
# NOTE: This configuration is generated by nix-installer so I'm adding it here in
|
||||
# case it becomes important.
|
||||
extra-nix-path = "nixpkgs=flake:nixpkgs";
|
||||
build-users-group = "nixbld";
|
||||
};
|
||||
#// (lib.optionalAttrs config.metacfg.tools.direnv.enable {
|
||||
# keep-outputs = true;
|
||||
# keep-derivations = true;
|
||||
#});
|
||||
# NOTE: This configuration is generated by nix-installer so I'm adding it here in
|
||||
# case it becomes important.
|
||||
extra-nix-path = "nixpkgs=flake:nixpkgs";
|
||||
build-users-group = "nixbld";
|
||||
}
|
||||
// (lib.optionalAttrs config.metacfg.tools.direnv.enable {
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
});
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
|
|
|
@ -19,7 +19,6 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
alacritty
|
||||
age
|
||||
delta
|
||||
git
|
||||
|
@ -45,6 +44,12 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPath = [ /run/current-system/sw/bin ];
|
||||
|
||||
programs = {
|
||||
bash = {
|
||||
## shellInit = ''
|
||||
|
@ -53,7 +58,6 @@ in
|
|||
bind '"\e[B": history-search-forward'
|
||||
'';
|
||||
};
|
||||
fish.enable = true;
|
||||
};
|
||||
|
||||
security = {
|
||||
|
|
18
modules/darwin/tools/alacritty/default.nix
Normal file
18
modules/darwin/tools/alacritty/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.metacfg.tools.alacritty;
|
||||
in
|
||||
{
|
||||
options.metacfg.tools.alacritty = {
|
||||
enable = mkEnableOption "alacritty";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ alacritty ]; };
|
||||
}
|
25
modules/darwin/tools/direnv/default.nix
Normal file
25
modules/darwin/tools/direnv/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
with lib.metacfg;
|
||||
let
|
||||
cfg = config.metacfg.tools.direnv;
|
||||
in
|
||||
{
|
||||
options.metacfg.tools.direnv = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable direnv.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv = enabled;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue