Compare commits
3 Commits
a4082f54c0
...
813efc75be
Author | SHA1 | Date |
---|---|---|
mat ess | 813efc75be | |
mat ess | 6219b3c5c7 | |
mat ess | b5496449ba |
|
@ -20,10 +20,6 @@ main entry point and glue for submodules
|
|||
|
||||
compatibility for legacy nix tooling, eg `nix-build`
|
||||
|
||||
### nixpkgs.nix
|
||||
|
||||
used to hack compatibility for `<nixpkgs>` in nix expressions
|
||||
|
||||
### configs
|
||||
|
||||
non-nix configurations
|
||||
|
@ -44,7 +40,7 @@ full featured macOS system
|
|||
|
||||
homebrew + mac app store apps
|
||||
|
||||
#### macos-defaults.nix
|
||||
#### defaults.nix
|
||||
|
||||
macOS system settings
|
||||
|
||||
|
@ -86,4 +82,4 @@ pure nix colorscheme palettes
|
|||
|
||||
### pkgs
|
||||
|
||||
custom-built nix packages
|
||||
custom-built nix packages in a sub-flake
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
# If an app isn't available in the Mac App Store, or the version in the App Store has
|
||||
# limitiations, e.g., Transmit, install the Homebrew Cask.
|
||||
homebrew.caskArgs.no_quarantine = true;
|
||||
homebrew.casks = [
|
||||
"aerial"
|
||||
"alfred"
|
||||
|
@ -48,6 +49,7 @@
|
|||
"bbedit"
|
||||
# "discord"
|
||||
# "element"
|
||||
"ferdium"
|
||||
"firefox"
|
||||
"jitsi-meet"
|
||||
"knockknock"
|
||||
|
|
148
flake.lock
148
flake.lock
|
@ -3,11 +3,11 @@
|
|||
"crane": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1661875961,
|
||||
"narHash": "sha256-f1h/2c6Teeu1ofAHWzrS8TwBPcnN+EEu+z1sRVmMQTk=",
|
||||
"lastModified": 1670900067,
|
||||
"narHash": "sha256-VXVa+KBfukhmWizaiGiHRVX/fuk66P8dgSFfkVN4/MY=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "d9f394e4e20e97c2a60c3ad82c2b6ef99be19e24",
|
||||
"rev": "59b31b41a589c0a65e4a1f86b0e5eac68081468b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -35,7 +35,7 @@
|
|||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs-unstable"
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
|
@ -85,6 +85,7 @@
|
|||
"nci",
|
||||
"devshell"
|
||||
],
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-utils-pre-commit": [
|
||||
"helix",
|
||||
"nci"
|
||||
|
@ -101,6 +102,10 @@
|
|||
"helix",
|
||||
"nci"
|
||||
],
|
||||
"nix-pypi-fetcher": [
|
||||
"helix",
|
||||
"nci"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"helix",
|
||||
"nci",
|
||||
|
@ -116,11 +121,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1668851003,
|
||||
"narHash": "sha256-X7RCQQynbxStZR2m7HW38r/msMQwVl3afD6UXOCtvx4=",
|
||||
"lastModified": 1671323629,
|
||||
"narHash": "sha256-9KHTPjIDjfnzZ4NjpE3gGIVHVHopy6weRDYO/7Y3hF8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "dream2nix",
|
||||
"rev": "c77e8379d8fe01213ba072e40946cbfb7b58e628",
|
||||
"rev": "2d7d68505c8619410df2c6b6463985f97cbcba6e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -161,19 +166,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1668681692,
|
||||
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
|
||||
"lastModified": 1668450977,
|
||||
"narHash": "sha256-cfLhMhnvXn6x1vPm+Jow3RiFAUSCw/l1utktCw5rVA4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "d591857e9d7dd9ddbfba0ea02b43b927c3c0f1fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
@ -232,16 +239,16 @@
|
|||
"inputs": {
|
||||
"nci": "nci",
|
||||
"nixpkgs": [
|
||||
"nixpkgs-unstable"
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670782450,
|
||||
"narHash": "sha256-0RCWIN9+NnreCg2c36pLbjcVenVPfUfnzRnYDs7P/zk=",
|
||||
"lastModified": 1671493763,
|
||||
"narHash": "sha256-xw8cemaLh9Nda9usE0z3sxeiDUuXZ1zDiO6md3i7XLg=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "c5bfb792b2a26545f6515a1e7b62d4f37b10841e",
|
||||
"rev": "bdeefbfb23077fcbbfe1e7df6c6ac88516244bbc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -253,7 +260,7 @@
|
|||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs-unstable"
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": [
|
||||
"flake-utils"
|
||||
|
@ -273,27 +280,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager-atemu": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs-unstable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1613409234,
|
||||
"narHash": "sha256-BW0xKvUfjy/0Wu1W/st1TTEHhpkyV0lPEW0otysvDSQ=",
|
||||
"owner": "Atemu",
|
||||
"repo": "home-manager",
|
||||
"rev": "e6d905336181ed8f98d48a1f6c9965b77f18e304",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Atemu",
|
||||
"ref": "darwin-copy-apps-fully-wip",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"homebrew-enabled": {
|
||||
"locked": {
|
||||
"lastModified": 1657739253,
|
||||
|
@ -371,11 +357,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1669011203,
|
||||
"narHash": "sha256-Lymj4HktNEFmVXtwI0Os7srDXHZbZW0Nzw3/+5Hf8ko=",
|
||||
"lastModified": 1671430291,
|
||||
"narHash": "sha256-UIc7H8F3N8rK72J/Vj5YJdV72tvDvYjH+UPsOFvlcsE=",
|
||||
"owner": "yusdacra",
|
||||
"repo": "nix-cargo-integration",
|
||||
"rev": "c5133b91fc1d549087c91228bd213f2518728a4b",
|
||||
"rev": "b1b0d38b8c3b0d0e6a38638d5bbe10b0bc67522c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -386,16 +372,34 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659446231,
|
||||
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
|
||||
"lastModified": 1671268780,
|
||||
"narHash": "sha256-9Okbivo10bcXEGCtmAQNfJt1Zpk6B3tjkSQ2CIXmTCg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
|
||||
"rev": "80c24eeb9ff46aa99617844d0c4168659e35175f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-21.11-darwin",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"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"
|
||||
}
|
||||
|
@ -417,6 +421,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1659446231,
|
||||
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-21.11-darwin",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1668984258,
|
||||
"narHash": "sha256-0gDMJ2T3qf58xgcSbYoXiRGUkPWmKyr5C3vcathWhKs=",
|
||||
|
@ -432,22 +452,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1670771160,
|
||||
"narHash": "sha256-ze4w84B+RbNqm0laRBgXIOZlnOI/5wlCKJWe1LXqSBA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0e857e0089d78dee29818dc92722a72f1dea506f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1668994630,
|
||||
|
@ -466,13 +470,13 @@
|
|||
},
|
||||
"pre-commit": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670413394,
|
||||
|
@ -493,18 +497,16 @@
|
|||
"dark-mode-notify-src": "dark-mode-notify-src",
|
||||
"darwin": "darwin",
|
||||
"fisher-src": "fisher-src",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"helix": "helix",
|
||||
"home-manager": "home-manager",
|
||||
"home-manager-atemu": "home-manager-atemu",
|
||||
"homebrew-enabled": "homebrew-enabled",
|
||||
"ia-writer-family-src": "ia-writer-family-src",
|
||||
"kitty-icon": "kitty-icon",
|
||||
"kitty-themes": "kitty-themes",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-master": "nixpkgs-master",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"pre-commit": "pre-commit"
|
||||
}
|
||||
},
|
||||
|
@ -517,11 +519,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1668998422,
|
||||
"narHash": "sha256-G/BklIplCHZEeDIabaaxqgITdIXtMolRGlwxn9jG2/Q=",
|
||||
"lastModified": 1671416426,
|
||||
"narHash": "sha256-kpSH1Jrxfk2qd0pRPJn1eQdIOseGv5JuE+YaOrqU9s4=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "68ab029c93f8f8eed4cf3ce9a89a9fd4504b2d6e",
|
||||
"rev": "fbaaff24f375ac25ec64268b0a0d63f91e474b7d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
149
flake.nix
149
flake.nix
|
@ -3,36 +3,30 @@
|
|||
|
||||
inputs = {
|
||||
# Package sets
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-21.11-darwin";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixpkgs-21.11-darwin";
|
||||
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";
|
||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.inputs.utils.follows = "flake-utils";
|
||||
|
||||
# Config "flag" for disabling homebrew
|
||||
homebrew-enabled.url = "github:boolean-option/true";
|
||||
|
||||
# Module to workaround https://github.com/nix-community/home-manager/issues/1341
|
||||
home-manager-atemu.url = "github:Atemu/home-manager/darwin-copy-apps-fully-wip";
|
||||
home-manager-atemu.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
|
||||
# pre-commit and hooks
|
||||
pre-commit.url = "github:cachix/pre-commit-hooks.nix";
|
||||
pre-commit.inputs.flake-utils.follows = "flake-utils";
|
||||
|
||||
# Extra sources
|
||||
helix.url = "github:helix-editor/helix";
|
||||
helix.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
helix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
dark-mode-notify-src.url = "github:bouk/dark-mode-notify";
|
||||
dark-mode-notify-src.flake = false;
|
||||
ia-writer-family-src.url = "github:iaolo/iA-Fonts";
|
||||
|
@ -45,11 +39,21 @@
|
|||
fisher-src.flake = false;
|
||||
};
|
||||
|
||||
outputs = { self, darwin, home-manager, flake-utils, pre-commit, ... }@inputs:
|
||||
outputs =
|
||||
{ self
|
||||
, home-manager
|
||||
, flake-utils
|
||||
, pre-commit
|
||||
, ...
|
||||
}@inputs:
|
||||
let
|
||||
# this is a "functor" that takes an option name
|
||||
# this allows for creating identical modules
|
||||
# which can be accessed by appropriate paths darwin or home-manager
|
||||
mkPrimaryUserModule = import ./modules/mk-primary-user-module.nix;
|
||||
|
||||
inherit (darwin.lib) darwinSystem;
|
||||
inherit (inputs.nixpkgs-unstable.lib)
|
||||
inherit (inputs.darwin.lib) darwinSystem;
|
||||
inherit (inputs.nixpkgs.lib)
|
||||
attrValues
|
||||
makeOverridable
|
||||
optionalAttrs;
|
||||
|
@ -58,17 +62,7 @@
|
|||
nixpkgsConfig = {
|
||||
config = { allowUnfree = true; };
|
||||
overlays = attrValues self.overlays ++ [
|
||||
(final: _prev:
|
||||
import ./pkgs {
|
||||
inherit inputs;
|
||||
inherit (final) callPackage;
|
||||
inherit (final.stdenv) system;
|
||||
})
|
||||
(_final: prev: optionalAttrs (prev.stdenv.system == "aarch64-darwin")
|
||||
{
|
||||
# Sub in x86 version of packages that don't build on Apple Silicon yet
|
||||
# inherit (final.pkgs-x86);
|
||||
})
|
||||
(import ./pkgs { inherit inputs; })
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -78,14 +72,12 @@
|
|||
username = "mat";
|
||||
fullName = "mat ess";
|
||||
email = "mat@mat.services";
|
||||
nixConfigDirectory = "/Users/mat/dotfiles.nix";
|
||||
};
|
||||
|
||||
workUserInfo = {
|
||||
username = "mess";
|
||||
fullName = "Matthew Ess";
|
||||
email = "mess@yelp.com";
|
||||
nixConfigDirectory = "/Users/mess/dotfiles.nix";
|
||||
};
|
||||
|
||||
# Modules shared by most `nix-darwin` personal configurations.
|
||||
|
@ -101,16 +93,17 @@
|
|||
nixpkgs = nixpkgsConfig;
|
||||
# Hack to support legacy worklows that use `<nixpkgs>`, darwin-option, etc.
|
||||
nix.nixPath = {
|
||||
nixpkgs = "${inputs.nixpkgs-unstable}";
|
||||
nixpkgs = "${inputs.nixpkgs}";
|
||||
darwin = "${inputs.darwin}";
|
||||
};
|
||||
# `home-manager` config
|
||||
users.users.${primaryUser.username}.home = "/Users/${primaryUser.username}";
|
||||
users.users.${primaryUser.username}.home = primaryUser.homeDirectory;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users.${primaryUser.username} = {
|
||||
imports = attrValues self.homeManagerModules;
|
||||
home.stateVersion = homeManagerStateVersion;
|
||||
home.primaryUser = primaryUser;
|
||||
home.homeDirectory = primaryUser.homeDirectory;
|
||||
home.enableNixpkgsReleaseCheck = true;
|
||||
};
|
||||
# Add a registry entry for this flake
|
||||
|
@ -197,46 +190,25 @@
|
|||
|
||||
};
|
||||
|
||||
# Build and activate on new system with:
|
||||
# `nix build .#homeConfigurations.<name>.activationPackage; ./result/activate`
|
||||
homeConfigurations = {
|
||||
cloudVM = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import inputs.nixpkgs-unstable {
|
||||
system = "x86_64-linux";
|
||||
inherit (nixpkgsConfig) config overlays;
|
||||
};
|
||||
modules = attrValues self.homeManagerModules ++ [
|
||||
({ config, ... }: {
|
||||
home.username = config.home.primaryUser.username;
|
||||
home.homeDirectory = "/home/${config.home.username}";
|
||||
home.stateVersion = homeManagerStateVersion;
|
||||
home.primaryUser = primaryUserInfo // {
|
||||
nixConfigDirectory = "${config.home.homeDirectory}/dotfiles.nix";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Overlays --------------------------------------------------------------- {{{
|
||||
|
||||
overlays = {
|
||||
# nixpkgs overlays
|
||||
pkgs-stable = _final: prev: {
|
||||
pkgs-stable = import inputs.nixpkgs {
|
||||
pkgs-stable = _: prev: {
|
||||
pkgs-stable = import inputs.nixpkgs-stable {
|
||||
inherit (prev.stdenv) system;
|
||||
inherit (nixpkgsConfig) config;
|
||||
};
|
||||
};
|
||||
|
||||
pkgs-unstable = _final: prev: {
|
||||
pkgs-unstable = import inputs.nixpkgs-unstable {
|
||||
pkgs-unstable = _: prev: {
|
||||
pkgs-unstable = import inputs.nixpkgs {
|
||||
inherit (prev.stdenv) system;
|
||||
inherit (nixpkgsConfig) config;
|
||||
};
|
||||
};
|
||||
|
||||
pkgs-master = _final: prev: {
|
||||
pkgs-master = _: prev: {
|
||||
pkgs-master = import inputs.nixpkgs-master {
|
||||
inherit (prev.stdenv) system;
|
||||
inherit (nixpkgsConfig) config;
|
||||
|
@ -246,16 +218,15 @@
|
|||
colors = import ./overlays/colors.nix;
|
||||
|
||||
# Overlay useful on Macs with Apple Silicon
|
||||
apple-silicon = _final: prev: optionalAttrs (prev.stdenv.system == "aarch64-darwin") {
|
||||
apple-silicon = _: prev: optionalAttrs (prev.stdenv.system == "aarch64-darwin") {
|
||||
# Add access to x86 packages system is running Apple Silicon
|
||||
pkgs-x86 = import inputs.nixpkgs-unstable {
|
||||
pkgs-x86 = import inputs.nixpkgs {
|
||||
system = "x86_64-darwin";
|
||||
inherit (nixpkgsConfig) config;
|
||||
};
|
||||
};
|
||||
|
||||
patched = _final: prev: optionalAttrs prev.stdenv.isDarwin {
|
||||
inherit (inputs) kitty-icon kitty-themes fisher-src;
|
||||
homebrew-enabled = _: prev: optionalAttrs prev.stdenv.isDarwin {
|
||||
lib = prev.lib // { homebrew-enabled = inputs.homebrew-enabled.value; };
|
||||
};
|
||||
};
|
||||
|
@ -268,13 +239,11 @@
|
|||
general = import ./darwin/general.nix;
|
||||
homebrew = import ./darwin/homebrew.nix;
|
||||
# modules
|
||||
primary-user = import ./modules/darwin/primary-user.nix;
|
||||
darwin-primary-user = mkPrimaryUserModule "users";
|
||||
};
|
||||
|
||||
# home manager configurations
|
||||
homeManagerModules = {
|
||||
# configs
|
||||
configs-starship-symbols = import ./home/configs/starship-symbols.nix;
|
||||
# services
|
||||
dark-mode-notify-service = import ./home/services/dark-mode-notify.nix;
|
||||
tarsnap-service = import ./home/services/tarsnap.nix;
|
||||
|
@ -286,21 +255,12 @@
|
|||
kitty = import ./home/kitty.nix;
|
||||
programs = import ./home/programs.nix;
|
||||
starship = import ./home/starship.nix;
|
||||
install-apps = {
|
||||
# fix app copying
|
||||
imports = [ (import "${inputs.home-manager-atemu}/modules/targets/darwin.nix") ];
|
||||
disabledModules = [ "targets/darwin/linkapps.nix" ];
|
||||
darwin.installApps = true;
|
||||
darwin.fullCopies = true;
|
||||
};
|
||||
starship-symbols = import ./home/starship-symbols.nix;
|
||||
# modules
|
||||
programs-kakoune-extras = import ./modules/home/programs/kakoune/extras.nix; # currently unused
|
||||
programs-helix-extras = import ./modules/home/programs/helix/extras.nix;
|
||||
programs-kitty-extras = import ./modules/home/programs/kitty/extras.nix;
|
||||
home-primary-user = { lib, ... }: {
|
||||
options.home.primaryUser =
|
||||
(self.darwinModules.primary-user { inherit lib; }).options.users.primaryUser;
|
||||
};
|
||||
home-primary-user = mkPrimaryUserModule "home";
|
||||
};
|
||||
|
||||
templates = {
|
||||
|
@ -316,34 +276,27 @@
|
|||
};
|
||||
|
||||
} // flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import inputs.nixpkgs-unstable {
|
||||
inherit system;
|
||||
inherit (nixpkgsConfig) config;
|
||||
overlays = with self.overlays; [
|
||||
pkgs-master
|
||||
pkgs-stable
|
||||
colors
|
||||
apple-silicon
|
||||
patched
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
legacyPackages = pkgs;
|
||||
let
|
||||
pkgs = import inputs.nixpkgs (nixpkgsConfig // { inherit system; });
|
||||
in
|
||||
{
|
||||
legacyPackages = pkgs;
|
||||
|
||||
checks.pre-commit = pre-commit.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
deadnix.enable = true;
|
||||
nix-linter.enable = true;
|
||||
nixpkgs-fmt.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
checks.pre-commit = pre-commit.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
deadnix.enable = true;
|
||||
nix-linter.enable = true;
|
||||
nixpkgs-fmt.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
inherit (self.checks.${system}.pre-commit) shellHook;
|
||||
};
|
||||
});
|
||||
# TODO: add utility devShells here
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -6,25 +6,21 @@
|
|||
programs.fish.enable = true;
|
||||
|
||||
# Add Fish plugins
|
||||
home.packages = with pkgs.fishPlugins; [ done ];
|
||||
|
||||
programs.fish.plugins = [
|
||||
{
|
||||
name = "fisher";
|
||||
src = pkgs.fisher-src;
|
||||
}
|
||||
];
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs.fishPlugins)
|
||||
autopair-fish
|
||||
colored-man-pages
|
||||
done;
|
||||
};
|
||||
programs.fish.plugins = [ pkgs.fishPlugins.fisher ];
|
||||
|
||||
xdg.configFile."fish/fish_plugins".text = ''
|
||||
jorgebucaran/autopair.fish
|
||||
jorgebucaran/replay.fish
|
||||
jorgebucaran/getopts.fish
|
||||
americanhanko/fish-spin
|
||||
joseluisq/gitnow
|
||||
fishpkg/fish-humanize-duration
|
||||
oh-my-fish/plugin-bang-bang
|
||||
matthewess/fish-autovenv
|
||||
jethrokuan/z
|
||||
Gazorby/fish-abbreviation-tips
|
||||
'';
|
||||
|
||||
|
@ -142,8 +138,9 @@
|
|||
programs.fish.shellAliases =
|
||||
let
|
||||
inherit (config.home.primaryUser) nixConfigDirectory;
|
||||
inherit (pkgs) bat bottom du-dust exa gitAndTools stdenv xh;
|
||||
in
|
||||
with pkgs; {
|
||||
{
|
||||
# Nix related
|
||||
from-nix = "from-dir ${nixConfigDirectory}";
|
||||
# darwin-rebuild build
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
# Git
|
||||
|
@ -14,15 +14,14 @@
|
|||
diff.colorMoved = "default";
|
||||
pull.rebase = true;
|
||||
init.defaultBranch = "main";
|
||||
help.autocorrect = "prompt";
|
||||
};
|
||||
|
||||
programs.git.ignores = [
|
||||
".DS_Store"
|
||||
".direnv"
|
||||
];
|
||||
|
||||
# Enhanced diffs
|
||||
programs.git.delta.enable = true;
|
||||
|
||||
# Gitea CLI
|
||||
home.packages = [ pkgs.tea ];
|
||||
}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.helix.enable = true;
|
||||
|
||||
programs.helix.package = pkgs.helix-flake;
|
||||
|
||||
programs.helix.settings = {
|
||||
editor.bufferline = "multiple";
|
||||
editor.color-modes = true;
|
||||
editor.cursor-shape.insert = "bar";
|
||||
editor.cursorline = true;
|
||||
editor.indent-guides.render = true;
|
||||
editor.indent-guides.skip-levels = 1;
|
||||
editor.line-number = "relative";
|
||||
|
|
|
@ -41,6 +41,10 @@ in
|
|||
enable = true;
|
||||
# extensions = [ pijul-vscode ];
|
||||
};
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
};
|
||||
# }}}
|
||||
|
||||
|
@ -59,7 +63,8 @@ in
|
|||
abduco # lightweight session management
|
||||
atool # archive tool
|
||||
bottom # fancy version of `top` with ASCII graphs
|
||||
coreutils
|
||||
# do i need these?
|
||||
# coreutils
|
||||
curl
|
||||
du-dust # fancy version of `du`
|
||||
exa # fancy version of `ls`
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
|
||||
{
|
||||
options.users.primaryUser = {
|
||||
username = mkOption {
|
||||
type = with types; nullOr string;
|
||||
default = null;
|
||||
};
|
||||
fullName = mkOption {
|
||||
type = with types; nullOr string;
|
||||
default = null;
|
||||
};
|
||||
email = mkOption {
|
||||
type = with types; nullOr string;
|
||||
default = null;
|
||||
};
|
||||
nixConfigDirectory = mkOption {
|
||||
type = with types; nullOr string;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
optionName: { config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
inherit (pkgs.stdenv) isDarwin;
|
||||
cfg = config.${optionName}.primaryUser;
|
||||
in
|
||||
|
||||
{
|
||||
options.${optionName}.primaryUser = {
|
||||
username = mkOption { type = types.str; };
|
||||
fullName = mkOption { type = types.str; };
|
||||
email = mkOption { type = types.str; };
|
||||
homeDirectory = mkOption {
|
||||
type = types.str;
|
||||
default =
|
||||
let prefix = if isDarwin then "/Users" else "/home";
|
||||
in "${prefix}/${cfg.username}";
|
||||
};
|
||||
nixConfigDirectory = mkOption {
|
||||
type = types.str;
|
||||
default = "${cfg.homeDirectory}/dotfiles.nix";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
, lib
|
||||
, xcodeenv
|
||||
, dark-mode-notify-src
|
||||
, sdkVersion ? "13.4.1"
|
||||
, sdkVersion
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
|
|
|
@ -1,10 +1,22 @@
|
|||
{ callPackage, inputs, system }:
|
||||
{
|
||||
dark-mode-notify = callPackage ./dark-mode-notify.nix {
|
||||
sdkVersion = "14.1";
|
||||
inherit (inputs) dark-mode-notify-src;
|
||||
{ inputs }:
|
||||
_: prev: {
|
||||
inherit (inputs) kitty-icon kitty-themes;
|
||||
helix = inputs.helix.packages.${prev.stdenv.system}.default;
|
||||
fishPlugins = prev.fishPlugins // {
|
||||
fisher = {
|
||||
name = "fisher";
|
||||
src = inputs.fisher-src;
|
||||
};
|
||||
};
|
||||
ia-writer-family = callPackage ./ia-writer-family.nix { inherit (inputs) ia-writer-family-src; };
|
||||
helix-flake = inputs.helix.packages.${system}.default;
|
||||
yubiswitch = callPackage ./yubiswitch.nix { };
|
||||
}
|
||||
} // builtins.mapAttrs
|
||||
(name: extras:
|
||||
prev.callPackage
|
||||
(./. + "/${name}.nix")
|
||||
({ "${name}-src" = inputs."${name}-src"; } // extras))
|
||||
{
|
||||
dark-mode-notify = {
|
||||
sdkVersion = "14.2";
|
||||
};
|
||||
ia-writer-family = { };
|
||||
yubiswitch = { };
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue