Compare commits

...

7 Commits

  1. 12
      README.md
  2. 42
      nix-darwin/configuration.nix
  3. 33
      nix-darwin/flake.lock
  4. 34
      nix-darwin/flake.nix
  5. 35
      nix-darwin/home.nix
  6. 4
      nvchad/.config/nvim/lua/chadrc.lua

@ -22,12 +22,18 @@ Then use [stow](https://www.gnu.org/software/stow/) to create symlinks for each
**i.e.** `$ stow -S vim`
### Anything nix related
I use [nix: home-manager](https://github.com/nix-community/home-manager). I suggest you do too. `stow` is fine until it isn't.
------------
## Darwin Configuration (nix-darwin + home-manager)
I use [nix-darwin](https://github.com/LnL7/nix-darwin) and [home-manager](https://github.com/nix-community/home-manager). I suggest you do too. `stow` is fine until it isn't.
If you want to try out my nix config, then you can do this:
```sh
home-manager switch --flake .#elal
darwin-rebuild switch --flake ~/.dotfiles/nix-darwin#exa
```
or
```sh
darwin-rebuild switch --flake github:almqv/dotfiles/nix-darwin#exa
```
Be sure that your hostname is `exa` and your username is `elal`.

@ -0,0 +1,42 @@
{ pkgs, ... }:
{
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
git
];
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# Enable zsh
programs.zsh.enable = true;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 6;
# Fix dumb MacOS features that no one asked for
system.defaults.NSGlobalDomain = {
ApplePressAndHoldEnabled = false;
};
# Allow unfree (and optionally broken) packages
nixpkgs.config = {
allowUnfree = true;
# If needed, you can also allow broken packages:
# allowBroken = true;
};
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
users.users.elal = {
name = "elal";
home = "/Users/elal";
};
}

@ -1,5 +1,25 @@
{
"nodes": {
"darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1738743987,
"narHash": "sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "ae406c04577ff9a64087018c79b4fdc02468c87c",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -7,11 +27,11 @@
]
},
"locked": {
"lastModified": 1732420764,
"narHash": "sha256-u6JOOVlnGe8fMekW0BgaHuuZwbJp4ixQaMA5BEvRoDA=",
"lastModified": 1738878603,
"narHash": "sha256-fmhq8B3MvQLawLbMO+LWLcdC2ftLMmwSk+P29icJ3tE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "67cd4814a247fd0fe97171acb90659f7e304bcb8",
"rev": "433799271274c9f2ab520a49527ebfe2992dcfbd",
"type": "github"
},
"original": {
@ -22,11 +42,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1732014248,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"lastModified": 1738824222,
"narHash": "sha256-U3SNq+waitGIotmgg/Et3J7o4NvUtP2gb2VhME5QXiw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"rev": "550e11f27ba790351d390d9eca3b80ad0f0254e7",
"type": "github"
},
"original": {
@ -38,6 +58,7 @@
},
"root": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}

@ -1,23 +1,31 @@
{
description = "Home Manager configuration";
description = "Epsilons Darwin configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { nixpkgs, home-manager, ... }:
let
system = "aarch64-darwin";
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations.elal = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
outputs = inputs@{ nixpkgs, home-manager, darwin, ... }: {
darwinConfigurations = {
exa = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
./configuration.nix
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.elal = import ./home.nix;
modules = [ ./home.nix ];
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
];
};
};
};
}

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
# Home Manager needs a bit of information about you and the paths it should
@ -15,28 +15,6 @@
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
nixpkgs = {
# You can add overlays here
overlays = [
# If you want to use overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
imports = [
# Modules
./modules/skhd.nix
@ -187,6 +165,17 @@
LIBTORCH = "${pkgs.libtorch-bin}/lib";
};
# Link apps to ~/Applications/Nix
home.activation = {
linkApps = lib.hm.dag.entryAfter [ "checkLinkTargets" ] ''
mkdir -p ~/Applications/Nix
for app in ~/.nix-profile/Applications/*.app; do
ln -sf "$app" ~/Applications/Nix/
done
'';
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;

@ -37,8 +37,8 @@ end
M = {
base46 = {
theme = "ayu_dark",
theme_toggle = { "ayu_dark", "ayu_light" },
theme = "doomchad",
theme_toggle = { "doomchad", "everforest_light" },
},
ui = {
hl_override = highlights.override,

Loading…
Cancel
Save