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` **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: If you want to try out my nix config, then you can do this:
```sh ```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`. 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": { "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": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -7,11 +27,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1732420764, "lastModified": 1738878603,
"narHash": "sha256-u6JOOVlnGe8fMekW0BgaHuuZwbJp4ixQaMA5BEvRoDA=", "narHash": "sha256-fmhq8B3MvQLawLbMO+LWLcdC2ftLMmwSk+P29icJ3tE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "67cd4814a247fd0fe97171acb90659f7e304bcb8", "rev": "433799271274c9f2ab520a49527ebfe2992dcfbd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,11 +42,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1732014248, "lastModified": 1738824222,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", "narHash": "sha256-U3SNq+waitGIotmgg/Et3J7o4NvUtP2gb2VhME5QXiw=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", "rev": "550e11f27ba790351d390d9eca3b80ad0f0254e7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -38,6 +58,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"darwin": "darwin",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }

@ -1,23 +1,31 @@
{ {
description = "Home Manager configuration"; description = "Epsilons Darwin configuration";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = { darwin.url = "github:lnl7/nix-darwin";
url = "github:nix-community/home-manager"; darwin.inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager";
}; home-manager.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { nixpkgs, home-manager, ... }: outputs = inputs@{ nixpkgs, home-manager, darwin, ... }: {
let darwinConfigurations = {
system = "aarch64-darwin"; exa = darwin.lib.darwinSystem {
pkgs = nixpkgs.legacyPackages.${system}; system = "aarch64-darwin";
in { modules = [
homeConfigurations.elal = home-manager.lib.homeManagerConfiguration { ./configuration.nix
inherit pkgs; 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 # Home Manager needs a bit of information about you and the paths it should
@ -15,28 +15,6 @@
# release notes. # release notes.
home.stateVersion = "24.05"; # Please read the comment before changing. 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 = [ imports = [
# Modules # Modules
./modules/skhd.nix ./modules/skhd.nix
@ -187,6 +165,17 @@
LIBTORCH = "${pkgs.libtorch-bin}/lib"; 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. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;

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

Loading…
Cancel
Save