Skip to content

Commit

Permalink
chore: readme, add files for structure and test import
Browse files Browse the repository at this point in the history
  • Loading branch information
ojsef39 committed Nov 3, 2024
1 parent 30424af commit 19ee3d2
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 7 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
# nix-base

My public nix base configuration (Mac+Linux) i use in my private personal and work configurations.
My public nix base configuration (Mac+Linux) i use in my personal and work configurations.

## Usage

Import with:

```nix
inputs = {
# rest of your inputs
# custom inputs
base.url = "github:ojsef39/nix-base";
};
```

Use like:

```nix
outputs = { self, nixpkgs, darwin, home-manager, base }: {
outputs = { self, base }: {
darwinConfigurations = {
"mac" = darwin.lib.darwinSystem {
"mac" = base.inputs.darwin.lib.darwinSystem {
system = "aarch64-darwin"; # or x86_64-darwin
modules = [
base.sharedModules
base.macModules
# Custom Mac-specific shell customizations
{
```

## Folder Structure

See example: <https://github.com/ojsef39/nix-personal>

5 changes: 2 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@

outputs = { self, nixpkgs, home-manager, darwin }: {
sharedModules = {
system.stateVersion = 5;
services.nix-daemon.enable = true;
./nix/core.nix
};
macModules = {};
linuxModules = {};
# linuxModules = {};
};
}
Empty file added hosts/darwin/README.md
Empty file.
Empty file added hosts/darwin/apps.nix
Empty file.
Empty file added hosts/darwin/host-users.nix
Empty file.
1 change: 1 addition & 0 deletions hosts/darwin/import.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Empty file added hosts/darwin/system.nix
Empty file.
Empty file added hosts/shared/README.md
Empty file.
1 change: 1 addition & 0 deletions hosts/shared/import.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

19 changes: 19 additions & 0 deletions nix/core.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

{ pkgs, ... }:

{
nix.settings = {
# enable flakes globally
experimental-features = ["nix-command" "flakes"];
};


nixpkgs.config.allowBroken = true;

# TODO: Idk why this has to be set to 5
system.stateVersion = 5;

# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
}

0 comments on commit 19ee3d2

Please sign in to comment.