Skip to content

Commit a2718eb

Browse files
committed
feat: update config a bit
1 parent 65fd3c4 commit a2718eb

File tree

8 files changed

+87
-73
lines changed

8 files changed

+87
-73
lines changed

README.md

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Install Development Environment
22

3-
- [ ] Already installed? See [Rebuild Existing System](#rebuild-system)
3+
- [ ] Already have `nix` installed and need to refresh? See [Troubleshooting Guide](https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#troubleshooting)
44

55
## Install Nix
66

@@ -11,39 +11,35 @@ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix
1111

1212
## Build Machine
1313

14-
It is probably best to run this command:
15-
1614
```sh
1715
nix --accept-flake-config run github:juspay/omnix -- init github:juspay/nixos-unified-template -o $HOME/.config/nixconfig
1816
```
1917

20-
Answer the prompts and then you will have a working config. To make it more useful (to myself) copy the `modules`
21-
directory and wire it up in each configuration.
18+
Follow prompts then a working config is generated at `$HOME/.config/nixconfig`.
2219

23-
If you are just moving configs between machines follow the steps below:
20+
If you cloned this repo you can run `nix run` on macOS or `nix run . <your user>` on a non nixOS (YMMV).
2421

25-
```sh
26-
cp nix.conf $HOME/nix/nix.conf
27-
cp nixconfig $HOME/.config/nixconfig
28-
cd $HOME/.config/nixconfig
22+
Before you do that...Make sure to have the configs like this:
2923

30-
# One-time activation
31-
nix --extra-experimental-features "nix-command flakes" run
24+
```sh
25+
cp nix.conf $XDG_CONFIG_HOME/nix/nix.conf
26+
cp nixconfig $XDG_CONFIG_HOME/nixconfig
27+
cd $XDG_CONFIG_HOME/nixconfig
3228
```
3329

34-
To update:
30+
To update nix -> <https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#upgrading-nix>
31+
32+
To update your flakes:
3533

3634
```sh
3735
nix flake update && nix run [. $USER@ ] # add the ' .$USER@' on non-NixOS Linux
3836
```
3937

40-
To update nix:
38+
## Troubleshooting
4139

42-
```sh
43-
nix upgrade-nix --nix-store-paths-url https://install.determinate.systems/nix-upgrade/stable/universal
44-
```
40+
### Rebuild System
4541

46-
## Rebuild System
42+
On a really, really bad system failure I ran these commands to get it working again.
4743

4844
```sh
4945
nix --extra-experimental-features "nix-command flakes" run nix-darwin#darwin-uninstaller
@@ -56,7 +52,3 @@ sudo mv /etc/zshrc /etc/zshrc.before-nix-darwin
5652
rm $HOME/.local/state/nix/profiles/home-manager*
5753
rm $HOME/.local/state/home-manager/gcroots/current-home
5854
```
59-
60-
```sh
61-
deno jupyter --install
62-
```

nixconfig/configurations/home/rhodee.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ in
1010

1111
home.username = "rhodee";
1212
home.homeDirectory = lib.mkDefault "/${if pkgs.stdenv.isDarwin then "Users" else "home"}/rhodee";
13-
home.stateVersion = "22.11";
13+
home.stateVersion = "24.11";
1414
nixpkgs.config.allowUnfree = true;
1515

1616
home.sessionVariables = {

nixconfig/configurations/home/rhodeewins.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ in
1414

1515
home.username = "rhodee";
1616
home.homeDirectory = lib.mkDefault "/home/rhodee";
17-
home.stateVersion = "22.11";
17+
home.stateVersion = "24.11";
1818

1919
nixpkgs.hostPlatform = "x86_64-linux";
2020
networking.hostName = "rhodeewins";

nixconfig/flake.nix

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
description = "Home manager configs";
33
inputs = {
44
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz";
5-
catppuccin = {
6-
url = "github:catppuccin/nix";
7-
};
5+
6+
catppuccin.url = "github:catppuccin/nix";
7+
88
home-manager = {
9+
# url = "github:nix-community/home-manager/release-24.11";
910
url = "github:nix-community/home-manager";
1011
inputs.nixpkgs.follows = "nixpkgs";
1112
};
@@ -20,20 +21,22 @@
2021
inputs.nixpkgs.follows = "nixpkgs";
2122
};
2223

23-
ghostty = {
24-
url = "github:ghostty-org/ghostty";
25-
};
26-
24+
ghostty.url = "github:ghostty-org/ghostty";
2725
flake-parts.url = "github:hercules-ci/flake-parts";
28-
nixos-unified.url = "github:srid/nixos-unified";
2926
systems.url = "github:nix-systems/default";
27+
nixos-unified.url = "github:srid/nixos-unified";
28+
29+
nixvim = {
30+
url = "github:nix-community/nixvim";
31+
inputs.nixpkgs.follows = "nixpkgs";
32+
inputs.flake-parts.follows = "flake-parts";
33+
};
3034

3135
# Software inputs
32-
nix-index-database.url = "github:nix-community/nix-index-database";
33-
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
34-
nixvim.url = "github:nix-community/nixvim";
35-
nixvim.inputs.nixpkgs.follows = "nixpkgs";
36-
nixvim.inputs.flake-parts.follows = "flake-parts";
36+
nix-index-database = {
37+
url = "github:nix-community/nix-index-database";
38+
inputs.nixpkgs.follows = "nixpkgs";
39+
};
3740
};
3841

3942
outputs = inputs:

nixconfig/modules/darwin/default.nix

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,26 @@
11
# This is your nix-darwin configuration.
22
# For home configuration, see /modules/home/*
3-
{ flake, pkgs, lib, ... }:
4-
5-
let
3+
{
4+
flake,
5+
pkgs,
6+
lib,
7+
...
8+
}: let
69
inherit (flake) inputs;
710
inherit (inputs) self;
8-
in
9-
{
11+
in {
12+
imports = [
13+
# Services
14+
15+
# System
16+
./system.nix
17+
];
18+
19+
services.nix-daemon.enable = true;
1020

1121
# Use TouchID for `sudo` authentication
1222
security.pam.enableSudoTouchIdAuth = true;
1323

1424
# These users can add Nix caches.
1525
nix.settings.trusted-users = [ "root" "rhodee" ];
16-
17-
# Configure macOS system
18-
# More rhodeeBooks => https://github.com/ryan4yin/nix-darwin-kickstarter/blob/main/rich-demo/modules/system.nix
19-
system = {
20-
defaults = {
21-
dock = {
22-
# autohide = true;
23-
# customize Hot Corners
24-
wvous-tl-corner = 2; # top-left - Mission Control
25-
# wvous-tr-corner = 13; # top-right - Lock Screen
26-
wvous-bl-corner = 3; # bottom-left - Application Windows
27-
wvous-br-corner = 4; # bottom-right - Desktop
28-
};
29-
30-
finder = {
31-
_FXShowPosixPathInTitle = true; # show full path in finder title
32-
AppleShowAllExtensions = true; # show all file extensions
33-
FXEnableExtensionChangeWarning = false; # disable warning when changing file extension
34-
QuitMenuItem = true; # enable quit menu item
35-
ShowPathbar = true; # show path bar
36-
ShowStatusBar = true; # show status bar
37-
};
38-
};
39-
40-
keyboard = {
41-
# enableKeyMapping = true;
42-
# remapCapsLockToControl = true;
43-
};
44-
};
4526
}

nixconfig/modules/darwin/system.nix

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This is your nix-darwin configuration.
2+
# For home configuration, see /modules/home/*
3+
{ flake, pkgs, lib, ... }:
4+
5+
let
6+
inherit (flake) inputs;
7+
inherit (inputs) self;
8+
in
9+
{
10+
# Configure macOS system
11+
# More rhodeeBooks => https://github.com/ryan4yin/nix-darwin-kickstarter/blob/main/rich-demo/modules/system.nix
12+
system = {
13+
defaults = {
14+
dock = {
15+
# autohide = true;
16+
# customize Hot Corners
17+
wvous-tl-corner = 2; # top-left - Mission Control
18+
# wvous-tr-corner = 13; # top-right - Lock Screen
19+
wvous-bl-corner = 3; # bottom-left - Application Windows
20+
wvous-br-corner = 4; # bottom-right - Desktop
21+
};
22+
23+
finder = {
24+
_FXShowPosixPathInTitle = true; # show full path in finder title
25+
AppleShowAllExtensions = true; # show all file extensions
26+
FXEnableExtensionChangeWarning = false; # disable warning when changing file extension
27+
QuitMenuItem = true; # enable quit menu item
28+
ShowPathbar = true; # show path bar
29+
ShowStatusBar = true; # show status bar
30+
};
31+
};
32+
33+
keyboard = {
34+
# enableKeyMapping = true;
35+
# remapCapsLockToControl = true;
36+
};
37+
};
38+
}

nixconfig/modules/home/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
home.stateVersion = "22.11";
2+
home.stateVersion = "24.11";
33
imports = [
44
./gc.nix
55
./catppuccin.nix

nixconfig/modules/home/macos.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{ inputs, ... }:
22
{
3-
home.stateVersion = "22.11";
3+
home.stateVersion = "24.11";
44
imports = [
55
./all/zsh.nix
66
./all/iterm

0 commit comments

Comments
 (0)