Update flakes, move some apps into home-manager
parent
d0dd3c5ef6
commit
978be501a3
|
@ -56,10 +56,6 @@ macOS system settings
|
|||
|
||||
simple configurations
|
||||
|
||||
#### copyApplications.nix
|
||||
|
||||
hack to work around https://github.com/nix-community/home-manager/issues/1341
|
||||
|
||||
#### default.nix
|
||||
|
||||
main user environment configuration
|
||||
|
|
|
@ -1,19 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Apps
|
||||
# `home-manager` currently has issues adding them to `~/Applications`
|
||||
# Issue: https://github.com/nix-community/home-manager/issues/1341
|
||||
# See workaround at ../home/copyApplications.nix
|
||||
environment.systemPackages = with pkgs; [
|
||||
kitty
|
||||
terminal-notifier
|
||||
];
|
||||
|
||||
# https://github.com/nix-community/home-manager/issues/423
|
||||
environment.variables = {
|
||||
TERMINFO_DIRS = [ "${pkgs.kitty.terminfo.outPath}/share/terminfo" ];
|
||||
};
|
||||
environment.systemPackages = [ pkgs.terminal-notifier ];
|
||||
|
||||
# Fonts
|
||||
fonts.fontDir.enable = true;
|
||||
|
|
|
@ -1,15 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
caskIsPresent = cask: lib.any (x: x == cask) config.homebrew.casks;
|
||||
mkIfCaskPresent = cask: mkIf (caskIsPresent cask);
|
||||
brewEnabled = config.homebrew.enable;
|
||||
in
|
||||
|
||||
{
|
||||
# perma-enabling to prevent losing brew when we skip bundling
|
||||
# environment.shellInit = mkIf brewEnabled ''
|
||||
{ config, pkgs, ... }: {
|
||||
environment.shellInit = ''
|
||||
eval "$(${config.homebrew.brewPrefix}/brew shellenv)"
|
||||
'';
|
||||
|
@ -17,7 +6,6 @@ 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 = ''
|
||||
if test -d (brew --prefix)"/share/fish/completions"
|
||||
set -p fish_complete_path (brew --prefix)/share/fish/completions
|
||||
|
@ -58,34 +46,30 @@ in
|
|||
"aerial"
|
||||
"alfred"
|
||||
"bartender"
|
||||
"discord"
|
||||
"element"
|
||||
# "discord"
|
||||
# "element"
|
||||
"firefox"
|
||||
"jitsi-meet"
|
||||
"knockknock"
|
||||
"lagrange"
|
||||
# "lagrange"
|
||||
"logitech-options"
|
||||
"lulu"
|
||||
"macsvg"
|
||||
"miniforge"
|
||||
"mullvadvpn"
|
||||
"obsidian"
|
||||
# "obsidian"
|
||||
"rectangle"
|
||||
"secretive"
|
||||
"signal"
|
||||
"slack"
|
||||
# "slack"
|
||||
"stay"
|
||||
"transmission"
|
||||
"utm"
|
||||
"zoom"
|
||||
# "zoom"
|
||||
];
|
||||
|
||||
# Configuration related to casks
|
||||
environment.variables.SSH_AUTH_SOCK = mkIfCaskPresent "secretive"
|
||||
"${config.home.homeDirectory}/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
|
||||
|
||||
# For cli packages that aren't currently available for macOS in `nixpkgs`.Packages should be
|
||||
# installed in `../home/default.nix` whenever possible.
|
||||
# installed in `../home/programs.nix` whenever possible.
|
||||
homebrew.brews = [
|
||||
"ffmpeg"
|
||||
"fileicon"
|
||||
|
|
128
flake.lock
128
flake.lock
|
@ -1,5 +1,22 @@
|
|||
{
|
||||
"nodes": {
|
||||
"all-cabal-json": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1665552503,
|
||||
"narHash": "sha256-r14RmRSwzv5c+bWKUDaze6pXM7nOsiz1H8nvFHJvufc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "all-cabal-json",
|
||||
"rev": "d7c0434eebffb305071404edcf9d5cd99703878e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "hackage",
|
||||
"repo": "all-cabal-json",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crane": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -39,11 +56,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1663677921,
|
||||
"narHash": "sha256-NfQnUfRrjv8DXeugdbQC5El+MMhShP42ohc8iM+UAdM=",
|
||||
"lastModified": 1667419884,
|
||||
"narHash": "sha256-oLNw87ZI5NxTMlNQBv1wG2N27CUzo9admaFlnmavpiY=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "088c98a584a38b5f844bb9e9cd32eb28479ca6d7",
|
||||
"rev": "cfc0125eafadc9569d3d6a16ee928375b77e3100",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -56,11 +73,11 @@
|
|||
"devshell": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1660811669,
|
||||
"narHash": "sha256-V6lmsaLNFz41myppL0yxglta92ijkSvpZ+XVygAh+bU=",
|
||||
"lastModified": 1667210711,
|
||||
"narHash": "sha256-IoErjXZAkzYWHEpQqwu/DeRNJGFdR7X2OGbkhMqMrpw=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "c2feacb46ee69949124c835419861143c4016fb5",
|
||||
"rev": "96a9dd12b8a447840cc246e17a47b81a4268bba7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -76,6 +93,7 @@
|
|||
"nci",
|
||||
"nixpkgs"
|
||||
],
|
||||
"all-cabal-json": "all-cabal-json",
|
||||
"crane": "crane",
|
||||
"devshell": [
|
||||
"helix",
|
||||
|
@ -87,6 +105,7 @@
|
|||
"nci",
|
||||
"nixpkgs"
|
||||
],
|
||||
"ghc-utils": "ghc-utils",
|
||||
"gomod2nix": [
|
||||
"helix",
|
||||
"nci",
|
||||
|
@ -114,11 +133,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1662176993,
|
||||
"narHash": "sha256-Sy7DsGAveDUFBb6YDsUSYZd/AcXfP/MOMIwMt/NgY84=",
|
||||
"lastModified": 1667429039,
|
||||
"narHash": "sha256-Lu6da25JioHzerkLHAHSO9suCQFzJ/XBjkcGCIbasLM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "dream2nix",
|
||||
"rev": "809bc5940214744eb29778a9a0b03f161979c1b2",
|
||||
"rev": "5252794e58eedb02d607fa3187ffead7becc81b0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -160,6 +179,21 @@
|
|||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
|
@ -174,19 +208,20 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"ghc-utils": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1656928814,
|
||||
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
|
||||
"type": "github"
|
||||
"lastModified": 1662774800,
|
||||
"narHash": "sha256-1Rd2eohGUw/s1tfvkepeYpg8kCEXiIot0RijapUjAkE=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "bb3a2d3dc52ff0253fb9c2812bd7aa2da03e0fea",
|
||||
"revCount": 1072,
|
||||
"type": "git",
|
||||
"url": "https://gitlab.haskell.org/bgamari/ghc-utils"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
"type": "git",
|
||||
"url": "https://gitlab.haskell.org/bgamari/ghc-utils"
|
||||
}
|
||||
},
|
||||
"helix": {
|
||||
|
@ -198,11 +233,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1663860810,
|
||||
"narHash": "sha256-NJubeVByiZz+0oU6f+OCaltxOZnUW4AGUipnj0RBYnk=",
|
||||
"lastModified": 1667577856,
|
||||
"narHash": "sha256-GJpJomXWkyne6zoS3JT1H81A2i4uDLZ/cyCPnjxKZaE=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "eb6fd283dcf041ecf822fd8f2d4520abb2a26df9",
|
||||
"rev": "38149872989477f62222ce68dc32d2d6018ae165",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -216,14 +251,16 @@
|
|||
"nixpkgs": [
|
||||
"nixpkgs-unstable"
|
||||
],
|
||||
"utils": "utils"
|
||||
"utils": [
|
||||
"flake-utils"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1663835995,
|
||||
"narHash": "sha256-XNHQ+mdHbjNR1Oit00SFAEcrAZoCS08E7uAFcVMtwhM=",
|
||||
"lastModified": 1667574732,
|
||||
"narHash": "sha256-73TVk3uSQOja6Q/5OuNcpcqwo6+SMzJPRtYAjU0rBx4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "bd83eab6220226085c82e637931a7ae3863d9893",
|
||||
"rev": "b764068a506c6f70dba998efa0e7fcb99cb4deb2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -277,11 +314,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1662177071,
|
||||
"narHash": "sha256-x6XF//RdZlw81tFAYM1TkjY+iQIpyMCWZ46r9o4wVQY=",
|
||||
"lastModified": 1667542401,
|
||||
"narHash": "sha256-mdWjP5tjSf8n6FAtpSgL23kX4+eWBwLrSYo9iY3mA8Q=",
|
||||
"owner": "yusdacra",
|
||||
"repo": "nix-cargo-integration",
|
||||
"rev": "65270dea87bb82fc02102a15221677eea237680e",
|
||||
"rev": "cd5e5cbd81c80dc219455dd3b1e0ddb55fae51ec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -308,11 +345,11 @@
|
|||
},
|
||||
"nixpkgs-master": {
|
||||
"locked": {
|
||||
"lastModified": 1663895890,
|
||||
"narHash": "sha256-p0hOonmnAwi6sTzfzhbJZL1MAWaIitXhzdcGTUpro5k=",
|
||||
"lastModified": 1667617883,
|
||||
"narHash": "sha256-8YP5mnK97NhAW3GUWC3MYglA5Xo2MrordY0vAgxBMos=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "403bfc5a5cc9c8843651bc309b14633fb1e7e1d3",
|
||||
"rev": "eb738c0fd3ec5b28996bb5f2af5ebae933780259",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -324,11 +361,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1663879234,
|
||||
"narHash": "sha256-zCe2EVY+Jt3I7gBgMSkuGesZ57vyt/WwIUwshiwDErk=",
|
||||
"lastModified": 1667610399,
|
||||
"narHash": "sha256-XZd0f4ZWAY0QOoUSdiNWj/eFiKb4B9CJPtl9uO9SYY4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a8a557e233c30b60225fa5af41cc56f8409e4afb",
|
||||
"rev": "1dd8696f96db47156e1424a49578fe7dd4ce99a4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -363,11 +400,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1662087605,
|
||||
"narHash": "sha256-Gpf2gp2JenKGf+TylX/YJpttY2bzsnvAMLdLaxoZRyU=",
|
||||
"lastModified": 1667487142,
|
||||
"narHash": "sha256-bVuzLs1ZVggJAbJmEDVO9G6p8BH3HRaolK70KXvnWnU=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "60c2cfaa8b90ed8cebd18b214fac8682dcf222dd",
|
||||
"rev": "cf668f737ac986c0a89e83b6b2e3c5ddbd8cf33b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -375,21 +412,6 @@
|
|||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
12
flake.nix
12
flake.nix
|
@ -7,20 +7,21 @@
|
|||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
||||
|
||||
# Flake helpers
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
flake-compat.url = "github:edolstra/flake-compat";
|
||||
flake-compat.flake = false;
|
||||
|
||||
# Environment/system management
|
||||
darwin.url = "github:lnl7/nix-darwin/master";
|
||||
darwin.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
home-manager.inputs.utils.follows = "flake-utils";
|
||||
|
||||
# Config "flag" for disabling homebrew
|
||||
homebrew-enabled.url = "github:boolean-option/true";
|
||||
|
||||
# Flake helpers
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
flake-compat.url = "github:edolstra/flake-compat";
|
||||
flake-compat.flake = false;
|
||||
|
||||
# Extra sources
|
||||
helix.url = "github:helix-editor/helix";
|
||||
helix.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
|
@ -266,7 +267,6 @@
|
|||
homeManagerModules = {
|
||||
# configs
|
||||
configs-starship-symbols = import ./home/configs/starship-symbols.nix;
|
||||
copyApplications = import ./home/copyApplications.nix;
|
||||
# services
|
||||
dark-mode-notify-service = import ./home/services/dark-mode-notify.nix;
|
||||
tarsnap-service = import ./home/services/tarsnap.nix;
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# adapted from
|
||||
# https://github.com/reckenrode/nixos-configs/blob/2acd7b0699fd57628deb7b8855b4d5f0ea8f8cb1/common/darwin/home-manager/copyApplications.nix
|
||||
# workaround for
|
||||
# https://github.com/nix-community/home-manager/issues/1341
|
||||
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home.activation = lib.optionalAttrs pkgs.stdenv.isDarwin {
|
||||
copyApplications = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
appsSrc="${config.home.homeDirectory}/Applications/Nix Apps/"
|
||||
if [ -d "$appsSrc" ]; then
|
||||
baseDir="$HOME/Applications/Home Manager Apps"
|
||||
rsyncArgs="--archive --checksum --chmod=-w --copy-unsafe-links --delete"
|
||||
$DRY_RUN_CMD mkdir -p "$baseDir"
|
||||
$DRY_RUN_CMD sudo rm -rf "$baseDir"/*
|
||||
$DRY_RUN_CMD sudo ${pkgs.rsync}/bin/rsync ''${VERBOSE_ARG:+-v} $rsyncArgs "$appsSrc" "$baseDir"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -44,8 +44,6 @@ in
|
|||
# General config ----------------------------------------------------------------------------- {{{
|
||||
|
||||
programs.kitty.settings = {
|
||||
# # https://fsd.it/shop/fonts/pragmatapro/
|
||||
# font_family = "PragmataPro Mono Liga";
|
||||
font_family = "FiraCode Nerd Font";
|
||||
font_size = "14.0";
|
||||
adjust_line_height = "120%";
|
||||
|
@ -70,12 +68,6 @@ in
|
|||
macos_option_as_alt = "both";
|
||||
};
|
||||
|
||||
# Change the style of italic font variants
|
||||
# programs.kitty.extraConfig = ''
|
||||
# font_features PragmataProMonoLiga-Italic +ss06
|
||||
# font_features PragmataProMonoLiga-BoldItalic +ss07
|
||||
# '';
|
||||
|
||||
programs.kitty.extras.useSymbolsFromNerdFont = "FiraCode Nerd Font";
|
||||
# }}}
|
||||
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
secretiveAuthSocket = "${config.home.homeDirectory}/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
|
||||
in
|
||||
{
|
||||
# Programs + packages with configuration --------------------------------------------------------------- {{{
|
||||
home.sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
} // lib.optionalAttrs pkgs.stdenv.isDarwin {
|
||||
SSH_AUTH_SOCK = secretiveAuthSocket;
|
||||
};
|
||||
programs = {
|
||||
# a nicer cat
|
||||
|
@ -42,6 +47,11 @@
|
|||
};
|
||||
helix = {
|
||||
enable = true;
|
||||
package = pkgs.helix-flake;
|
||||
settings = {
|
||||
theme = "tokyonight";
|
||||
editor.indent-guides.render = true;
|
||||
};
|
||||
};
|
||||
nix-index = {
|
||||
enable = true;
|
||||
|
@ -52,7 +62,7 @@
|
|||
matchBlocks."*".extraOptions = lib.optionalAttrs pkgs.stdenv.isDarwin {
|
||||
UseKeychain = "yes";
|
||||
AddKeysToAgent = "yes";
|
||||
IdentityAgent = "${config.home.homeDirectory}/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
|
||||
IdentityAgent = secretiveAuthSocket;
|
||||
};
|
||||
};
|
||||
# vscode
|
||||
|
@ -66,6 +76,15 @@
|
|||
# Other packages ----------------------------------------------------------------------------- {{{
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# GUI apps
|
||||
discord-ptb
|
||||
element-desktop
|
||||
# kitty
|
||||
lagrange
|
||||
obsidian
|
||||
slack
|
||||
zoom-us
|
||||
|
||||
# System
|
||||
abduco # lightweight session management
|
||||
atool # archive tool
|
||||
|
|
|
@ -115,7 +115,7 @@ in
|
|||
];
|
||||
|
||||
home.activation = mkIf (pkgs.stdenv.isDarwin && cfg.fixIcon.enable) {
|
||||
fixKittyIcon = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
fixKittyIcon = lib.hm.dag.entryAfter [ "installPackages" "linkGeneration" ] ''
|
||||
$DRY_RUN_CMD sudo /opt/homebrew/bin/fileicon set ${cfg.fixIcon.appPath} ${cfg.fixIcon.iconPath}
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ callPackage, inputs, system }:
|
||||
{
|
||||
dark-mode-notify = callPackage ./dark-mode-notify.nix {
|
||||
sdkVersion = "14.0";
|
||||
sdkVersion = "14.1";
|
||||
inherit (inputs) dark-mode-notify-src;
|
||||
};
|
||||
helix = inputs.helix.packages.${system}.default;
|
||||
helix-flake = inputs.helix.packages.${system}.default;
|
||||
yubiswitch = callPackage ./yubiswitch.nix { };
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue