Skip to content

Commit 91a12b9

Browse files
Merge pull request #10 from randomizedcoder/2024_10_15_1020
2024_10_15
2 parents 3e50b9d + 048c057 commit 91a12b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2594
-143
lines changed

Makefile

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,37 @@
33
#
44
.PHONY: all
55

6-
all: hp0 hp3 hp4
6+
all: hp0 hp1 hp2 hp3 hp4 hp5
77

88
hp0:
9-
scp -C ./hp0/* hp0:
109
scp -C ./modules/* hp0:
1110
scp -C ./scripts/* hp0:
11+
scp -C ./hp0/* hp0:
12+
13+
hp1:
14+
scp -C ./modules/* hp1:
15+
scp -C ./scripts/* hp1:
16+
scp -C ./hp1/* hp1:
17+
18+
hp2:
19+
scp -C ./modules/* hp2:
20+
scp -C ./scripts/* hp2:
21+
scp -C ./hp2/* hp2:
1222

1323
hp3:
14-
scp -C ./hp3/* hp3:
1524
scp -C ./modules/* hp3:
1625
scp -C ./scripts/* hp3:
26+
scp -C ./hp3/* hp3:
1727

1828
hp4:
19-
scp -C ./hp4/* hp4:
2029
scp -C ./modules/* hp4:
2130
scp -C ./scripts/* hp4:
31+
scp -C ./hp4/* hp4:
32+
33+
hp5:
34+
scp -C ./modules/* hp5:
35+
scp -C ./scripts/* hp5:
36+
scp -C ./hp5/* hp5:
2237

2338
#
2439
# end

darwin/mbp/Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
all:
2+
nix run nix-darwin -- switch --flake ~/.config/nix
3+
4+
go:
5+
darwin-rebuild switch --flake ~/.config/nix
6+
7+
rsync:
8+
rsync -avdz ./ 172.16.50.135:/Users/das/.config/nix/
9+
10+
scp:
11+
scp ./* 172.16.50.135:/Users/das/.config/nix/

darwin/mbp/default.flake.nix

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
description = "Example Darwin system flake";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
nix-darwin.url = "github:LnL7/nix-darwin";
7+
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
8+
};
9+
10+
outputs = inputs@{ self, nix-darwin, nixpkgs }:
11+
let
12+
configuration = { pkgs, ... }: {
13+
# List packages installed in system profile. To search by name, run:
14+
# $ nix-env -qaP | grep wget
15+
environment.systemPackages =
16+
[ pkgs.vim
17+
];
18+
19+
# Auto upgrade nix package and the daemon service.
20+
services.nix-daemon.enable = true;
21+
# nix.package = pkgs.nix;
22+
23+
# Necessary for using flakes on this system.
24+
nix.settings.experimental-features = "nix-command flakes";
25+
26+
# Create /etc/zshrc that loads the nix-darwin environment.
27+
programs.zsh.enable = true; # default shell on catalina
28+
# programs.fish.enable = true;
29+
30+
# Set Git commit hash for darwin-version.
31+
system.configurationRevision = self.rev or self.dirtyRev or null;
32+
33+
# Used for backwards compatibility, please read the changelog before changing.
34+
# $ darwin-rebuild changelog
35+
system.stateVersion = 5;
36+
37+
# The platform the configuration will be used on.
38+
nixpkgs.hostPlatform = "x86_64-darwin";
39+
};
40+
in
41+
{
42+
# Build darwin flake using:
43+
# $ darwin-rebuild build --flake .#dass-MacBook-Pro
44+
darwinConfigurations."dass-MacBook-Pro" = nix-darwin.lib.darwinSystem {
45+
modules = [ configuration ];
46+
};
47+
48+
# Expose the package set, including overlays, for convenience.
49+
darwinPackages = self.darwinConfigurations."dass-MacBook-Pro".pkgs;
50+
};
51+
}

darwin/mbp/default_flake_nix

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
description = "Example Darwin system flake";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
nix-darwin.url = "github:LnL7/nix-darwin";
7+
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
8+
};
9+
10+
outputs = inputs@{ self, nix-darwin, nixpkgs }:
11+
let
12+
configuration = { pkgs, ... }: {
13+
# List packages installed in system profile. To search by name, run:
14+
# $ nix-env -qaP | grep wget
15+
environment.systemPackages =
16+
[ pkgs.vim
17+
];
18+
19+
# Auto upgrade nix package and the daemon service.
20+
services.nix-daemon.enable = true;
21+
# nix.package = pkgs.nix;
22+
23+
# Necessary for using flakes on this system.
24+
nix.settings.experimental-features = "nix-command flakes";
25+
26+
# Create /etc/zshrc that loads the nix-darwin environment.
27+
programs.zsh.enable = true; # default shell on catalina
28+
# programs.fish.enable = true;
29+
30+
# Set Git commit hash for darwin-version.
31+
system.configurationRevision = self.rev or self.dirtyRev or null;
32+
33+
# Used for backwards compatibility, please read the changelog before changing.
34+
# $ darwin-rebuild changelog
35+
system.stateVersion = 5;
36+
37+
# The platform the configuration will be used on.
38+
nixpkgs.hostPlatform = "x86_64-darwin";
39+
};
40+
in
41+
{
42+
# Build darwin flake using:
43+
# $ darwin-rebuild build --flake .#dass-MacBook-Pro
44+
darwinConfigurations."dass-MacBook-Pro" = nix-darwin.lib.darwinSystem {
45+
modules = [ configuration ];
46+
};
47+
48+
# Expose the package set, including overlays, for convenience.
49+
darwinPackages = self.darwinConfigurations."dass-MacBook-Pro".pkgs;
50+
};
51+
}

darwin/mbp/flake.lock

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

darwin/mbp/flake.nix

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
description = "My system configuration";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
nix-darwin = {
7+
url = "github:LnL7/nix-darwin";
8+
inputs.nixpkgs.follows = "nixpkgs";
9+
};
10+
home-manager = {
11+
url = "github:nix-community/home-manager";
12+
inputs.nixpkgs.follows = "nixpkgs";
13+
};
14+
};
15+
16+
outputs = inputs@{ self, nixpkgs, nix-darwin, home-manager }:
17+
let
18+
configuration = { pkgs, ... }: {
19+
20+
services.nix-daemon.enable = true;
21+
# Necessary for using flakes on this system.
22+
nix.settings.experimental-features = "nix-command flakes";
23+
24+
system.configurationRevision = self.rev or self.dirtyRev or null;
25+
26+
# Used for backwards compatibility. please read the changelog
27+
# before changing: `darwin-rebuild changelog`.
28+
system.stateVersion = 5;
29+
30+
# The platform the configuration will be used on.
31+
# If you're on an older system, replace with "x86_64-darwin"
32+
nixpkgs.hostPlatform = "x86_64-darwin";
33+
34+
# Declare the user that will be running `nix-darwin`.
35+
users.users.das = {
36+
name = "das";
37+
home = "/Users/das";
38+
};
39+
40+
security.pam.enableSudoTouchIdAuth = true;
41+
42+
# Create /etc/zshrc that loads the nix-darwin environment.
43+
programs.zsh.enable = true;
44+
environment.systemPackages = [ pkgs.neofetch ];
45+
46+
# homebrew = {
47+
# enable = true;
48+
# # onActivation.cleanup = "uninstall";
49+
50+
# taps = [ ];
51+
# brews = [ "cowsay" ];
52+
# casks = [ ];
53+
# };
54+
};
55+
homeconfig = { pkgs, ... }: {
56+
# this is internal compatibility configuration for home-manager,
57+
# don't change this!
58+
home.stateVersion = "24.05";
59+
# Let home-manager install and manage itself.
60+
programs.home-manager.enable = true;
61+
62+
home.packages = with pkgs; [
63+
gcc
64+
automake
65+
gnumake
66+
#cmake
67+
pkg-config
68+
git
69+
htop
70+
screen
71+
go
72+
tcpdump
73+
];
74+
75+
home.sessionVariables = {
76+
EDITOR = "vim";
77+
};
78+
79+
#home.file.".vimrc".source = ./vim_configuration;
80+
81+
programs.zsh = {
82+
enable = true;
83+
shellAliases = {
84+
switch = "darwin-rebuild switch --flake ~/.config/nix";
85+
};
86+
};
87+
88+
programs.git = {
89+
enable = true;
90+
userEmail = "[email protected]";
91+
userName = "randomizedcoder ";
92+
};
93+
};
94+
in
95+
{
96+
darwinConfigurations.dass-MacBook-Pro = nix-darwin.lib.darwinSystem {
97+
modules = [
98+
configuration
99+
home-manager.darwinModules.home-manager
100+
{
101+
home-manager.useGlobalPkgs = true;
102+
home-manager.useUserPackages = true;
103+
home-manager.verbose = true;
104+
home-manager.users.das = homeconfig;
105+
}
106+
];
107+
};
108+
};
109+
}

0 commit comments

Comments
 (0)