summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--darwin/home.nix56
-rw-r--r--flake.nix25
-rw-r--r--hosts/morpheus/configuration.nix23
3 files changed, 103 insertions, 1 deletions
diff --git a/darwin/home.nix b/darwin/home.nix
new file mode 100644
index 0000000..5e52de6
--- /dev/null
+++ b/darwin/home.nix
@@ -0,0 +1,56 @@
1{ config, pkgs, ... }:
2
3{
4 home.username = "shubh";
5 home.homeDirectory = "/Users/shubh";
6
7 # You should not change this value, even if you update Home Manager. If you do
8 # want to update the value, then make sure to first check the Home Manager
9 # release notes.
10 home.stateVersion = "23.05";
11
12 home.packages = with pkgs; [
13 git
14 unzip
15 wget
16 gnupg
17 pass
18 tmux
19 fzf
20 docker
21 neovim
22 pinentry_mac
23 # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
24 ];
25
26 programs.home-manager.enable = true;
27 programs.zsh = {
28 enable = true;
29 enableCompletion = true;
30 shellAliases = {
31 ll = "ls -l";
32 v = "nvim";
33 o = "xdg-open";
34 t = "tmux";
35 };
36 oh-my-zsh = {
37 enable = true;
38 plugins = [ "git" "kubectl" "sudo" ];
39 theme = "robbyrussell";
40 };
41 };
42 programs.fzf = {
43 enable = true;
44 enableZshIntegration = true;
45 defaultOptions = [ "--height 40%" "--layout=reverse" "--border" ];
46 };
47 programs.git = {
48 enable = true;
49 userEmail = "ssaini@fispan.com";
50 userName = "Shubham Saini";
51 signing = {
52 key = "E0404DDE4BCF9DB5";
53 signByDefault = true;
54 };
55 };
56}
diff --git a/flake.nix b/flake.nix
index 7f3d0b9..159b4be 100644
--- a/flake.nix
+++ b/flake.nix
@@ -7,9 +7,14 @@
7 url = "github:nix-community/home-manager/release-23.05"; 7 url = "github:nix-community/home-manager/release-23.05";
8 inputs.nixpkgs.follows = "nixpkgs"; 8 inputs.nixpkgs.follows = "nixpkgs";
9 }; 9 };
10
11 darwin = {
12 url = "github:lnl7/nix-darwin/master";
13 inputs.nixpkgs.follows = "nixpkgs";
14 };
10 }; 15 };
11 16
12 outputs = { self, nixpkgs, home-manager, ... }: { 17 outputs = { self, nixpkgs, darwin, home-manager, ... }: {
13 nixosConfigurations = { 18 nixosConfigurations = {
14 oracle = nixpkgs.lib.nixosSystem { 19 oracle = nixpkgs.lib.nixosSystem {
15 system = "x86_64-linux"; 20 system = "x86_64-linux";
@@ -28,5 +33,23 @@
28 ]; 33 ];
29 }; 34 };
30 }; 35 };
36 darwinConfigurations = {
37 morpheus = darwin.lib.darwinSystem {
38 system = "x86_64-darwin";
39 modules = [
40 {
41 imports = [ ./hosts/morpheus/configuration.nix ];
42 }
43 home-manager.darwinModules.home-manager
44 {
45 home-manager.useGlobalPkgs = true;
46 home-manager.useUserPackages = true;
47 home-manager.users.shubh = {
48 imports = [ ./darwin/home.nix ];
49 };
50 }
51 ];
52 };
53 };
31 }; 54 };
32} 55}
diff --git a/hosts/morpheus/configuration.nix b/hosts/morpheus/configuration.nix
new file mode 100644
index 0000000..dc1edb3
--- /dev/null
+++ b/hosts/morpheus/configuration.nix
@@ -0,0 +1,23 @@
1{ config, pkgs, ... }:
2
3{
4 services.nix-daemon.enable = true;
5 users.users.shubh.home = "/Users/shubh";
6
7 #homebrew = {
8 # enable = true;
9 # casks = [ "iterm2" "qtpass" ];
10 #};
11
12 #system.activationScripts.applications.text = pkgs.lib.mkForce (
13 # ''
14 # echo "setting up ~/Applications..." >&2
15 # rm -rf ~/Applications/Nix\ Apps
16 # mkdir -p ~/Applications/Nix\ Apps
17 # for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do
18 # src="$(/usr/bin/stat -f%Y "$app")"
19 # cp -r "$src" ~/Applications/Nix\ Apps
20 # done
21 # ''
22 #);
23}