ZGEGHEOD2S77CSNWOOFVB7Q3RGOU3WOWDOXJ4S2LKAS2JMS3UAZAC
YVZDXEX34EVRGBLOY4LIDKPFZVMTINZQ5UCAJVDMYSBWIDFPNBQQC
532JIID6XB4NFSIFUA64VEBKWSEJB4AY5OUBIEFUDMWXO7UAZW2QC
H3GYCX27WTONFBIJN7UIV26LJSCENQJC4XXIOEYINXJLEDGKYJJQC
JOK7DA5XBOK2MIVR7ORTSAEMQ6U5642I537IGUYBX67DPFF5QJ3QC
EVVP46IQ4U6JEDWVJ4D6KT77ABOMY7XKIO2ITX4DHJDRTGTYCUTQC
N2TSK4OYN66HBNGCGLZORIFASQQGTKBRMBUAZ6LE7TIHTT7ONDIQC
TXA66OLAOYNGEDRBC4SKWDZPLBZXUU7WHDIAYN4TXGEJR6WIJOIQC
JHOTQEAZM26AZEYLC3IZVPCZZMXCL7K6V2UEGE3ABGO4GL67AT6QC
{ pkgs, lib, ...}: let
gpgUpdateTty = pkgs.writeShellScript "gpgUpdateTty" ''
${pkgs.gnupg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
'';
writeGpgWrapper = pkg: let
bin = lib.getExe pkg;
binName = lib.last (lib.splitString "/" bin);
in pkgs.writeShellScriptBin binName ''
${gpgUpdateTty}
exec ${bin} "$@"
'';
wrapForGpg = pkg: pkgs.symlinkJoin {
name = "${lib.getName pkg}-wrapped-for-gpg";
paths = [
(writeGpgWrapper pkg)
pkg
];
};
in {
nixpkgs.overlays = [
(final: prev: {
openssh-wrapped = wrapForGpg final.openssh;
git-wrapped = wrapForGpg final.git;
pijul-wrapped = wrapForGpg final.pijul;
})
];
}
{ pkgs, lib, ... }:
let
gpgUpdateTty = pkgs.writeShellScript "gpgUpdateTty" ''
${pkgs.gnupg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
'';
writeGpgWrapper = pkg:
let
bin = lib.getExe pkg;
binName = lib.last (lib.splitString "/" bin);
in
pkgs.writeShellScriptBin binName ''
${gpgUpdateTty}
exec ${bin} "$@"
'';
wrapForGpg = pkg: pkgs.symlinkJoin {
name = "${lib.getName pkg}-wrapped-for-gpg";
paths = [
(writeGpgWrapper pkg)
pkg
];
};
in
{
nixpkgs.overlays = [
(final: prev: {
openssh-wrapped = wrapForGpg final.openssh;
git-wrapped = wrapForGpg final.git;
pijul-wrapped = wrapForGpg final.pijul;
})
];
}
{}:
attrs:
{
imports = [
attrs
../home-manager/home.nix
../home-manager/modules
];
}
{ config, pkgs, lib, ... }:
let
theme = import ../../../theme.nix;
cfg = config.niko.desktop.alacritty;
in
{
options.niko.desktop.alacritty = {
enable = lib.mkEnableOption "Alacritty terminal emulator";
fontSize = with lib; mkOption {
type = types.int;
default = if pkgs.hostPlatform.isLinux then 9 else 14;
description = ''
Font size for alacritty.
By default on Macs the size will be larger because HiDPI and stuff
so we want it to look pretty but still readable.
'';
};
};
config = lib.mkIf cfg.enable {
programs.alacritty = {
enable = true;
settings = {
colors = {
primary = theme.primary;
selection = theme.secondary;
normal = theme.dark;
bright = theme.bright;
indexed_colors = [
{ index = 16; color = theme.extra.idx16; }
{ index = 17; color = theme.extra.idx17; }
];
};
font = {
normal.family = theme.fontFamily;
size = cfg.fontSize;
};
};
};
};
}
{ config, pkgs, lib, ... }:
let
theme = import ../../../theme.nix;
in
{
programs.alacritty = {
enable = true;
settings = {
colors = {
primary = theme.primary;
selection = theme.secondary;
normal = theme.dark;
bright = theme.bright;
indexed_colors = [
{ index = 16; color = theme.extra.idx16; }
{ index = 17; color = theme.extra.idx17; }
];
};
font = {
normal.family = theme.fontFamily;
size = 9;
};
};
};
}
# nixosConfigurations.virtualBox = nixpkgs.lib.nixosSystem {
# inherit system;
homeConfigurations.mbp = home-manager.lib.homeManagerConfiguration {
modules = [
(lib.mkHome ({ config, pkgs, lib, ... }: {
imports = [
./home-manager/node.nix
./home-manager/pijul.nix
# ./home-manager/desktop/chromium.nix
];
nix = {
package = pkgs.nixVersions.stable;
settings.experimental-features = [ "nix-command" "flakes" ];
};
home = {
username = user;
homeDirectory = "/Users/${user}";
stateVersion = "22.05";
};
nixpkgs = {
overlays = [
fenix.overlay
nur.overlay
niko-nur.overlay
(final: prev: {
x86-compat = import nixpkgs { system = "x86_64-darwin"; };
})
firefox-darwin.overlay
];
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"slack"
];
};
niko = {
desktop.alacritty.enable = true;
dev.rust.enable = true;
};
# modules = [
# ./nixos/virtualBox.nix
# home-manager.nixosModules.home-manager
# ./nixos/wrappedForGpg.nix
# {
# nixpkgs.overlays = [ fenix.overlay ];
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
# home-manager.users.${user} = hmConfig {
# rust = true;
# sway = true;
# };
# }
# ];
# };
programs.firefox = {
enable = true;
package = pkgs.firefox-bin;
};
}))
];
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
};
formatter.${system} = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
devShells =
let
mkShell = pkgs: pkgs.mkShellNoCC {
packages = [ pkgs.deploy-rs ];
};
in
{
${system}.default = mkShell pkgs;
aarch64-darwin.default = mkShell nixpkgs.legacyPackages.aarch64-darwin;
};
formatter = {
${system} = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixpkgs-fmt;
};
"type": "github"
}
},
"firefox-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1668819566,
"narHash": "sha256-8mbtIZinm9WJ4bw5jAU9o5WWyYuSz0q5lE2XUkh+ap8=",
"owner": "bandithedoge",
"repo": "nixpkgs-firefox-darwin",
"rev": "59b704892c13a348e211cc2992d9d9b0c5af4ae6",
"type": "github"
},
"original": {
"owner": "bandithedoge",
"repo": "nixpkgs-firefox-darwin",
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1666885127,
"narHash": "sha256-uXA/3lhLhwOTBMn9a5zJODKqaRT+SuL5cpEmOz2ULoo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "0e101dbae756d35a376a5e1faea532608e4a4b9a",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"niko-nur": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1668543486,
"narHash": "sha256-88npledd2wMly8DpeIk7HmiKZ5F06scfzKbtBs7IfXI=",
"owner": "nrabulinski",
"repo": "nur-packages",
"rev": "908e04a28d59cadb67ab0d2da0e6d82beffe14df",
"type": "github"
},
"original": {
"owner": "nrabulinski",
"repo": "nur-packages",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1665349835,
"narHash": "sha256-UK4urM3iN80UXQ7EaOappDzcisYIuEURFRoGQ/yPkug=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "34c5293a71ffdb2fe054eb5288adc1882c1eb0b1",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},