Compare commits
No commits in common. "659a4f29bc02d4cd7c1227888d4d3a6ddfdd4098" and "8075ec0091af825eb9e1c667e849312d27eca7d4" have entirely different histories.
659a4f29bc
...
8075ec0091
5 changed files with 24 additions and 146 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
|
@ -1,2 +1,7 @@
|
||||||
# Secret variables shouldn't get committed!
|
*.sw*
|
||||||
secret-variables.nix
|
vim-files/vim/bundle
|
||||||
|
vim-files/vim/plugged/
|
||||||
|
vim-files/vim/undofiles/
|
||||||
|
.youcompletemesetup
|
||||||
|
vim-files/vim/.init.vim-rplugin~
|
||||||
|
vim-files/vim/.netrwhist
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
Symlink the flake file into `/etc/nix-darwin/flake.nix` before initializing the
|
|
||||||
system!
|
|
||||||
|
|
||||||
You'll also need to populate the hostname in a `secret-variables.nix` file with
|
|
||||||
the output of `scutil --get LocalHostName`
|
|
||||||
|
|
@ -62,8 +62,8 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [ <home-manager/nix-darwin> ];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
# List packages installed in system profile. To search by name, run:
|
# List packages installed in system profile. To search by name, run:
|
||||||
# $ nix-env -qaP | grep wget
|
# $ nix-env -qaP | grep wget
|
||||||
|
|
@ -73,10 +73,10 @@ in
|
||||||
pkgs.obsidian
|
pkgs.obsidian
|
||||||
pkgs.syncthing
|
pkgs.syncthing
|
||||||
pkgs.slack
|
pkgs.slack
|
||||||
pkgs._1password-cli
|
pkgs._1password
|
||||||
pkgs._1password-gui
|
# pkgs._1password-gui
|
||||||
pkgs.tailscale
|
pkgs.tailscale
|
||||||
#whatsapp
|
whatsapp
|
||||||
obs-studio
|
obs-studio
|
||||||
vlc
|
vlc
|
||||||
keycastr
|
keycastr
|
||||||
|
|
@ -99,9 +99,16 @@ in
|
||||||
# have to do this to play nicely with home-manager:
|
# have to do this to play nicely with home-manager:
|
||||||
# https://github.com/nix-community/home-manager/issues/4026
|
# https://github.com/nix-community/home-manager/issues/4026
|
||||||
users.users.haak.home = "/Users/haak/";
|
users.users.haak.home = "/Users/haak/";
|
||||||
|
home-manager.users.haak.imports = [
|
||||||
|
../../home/commandline.nix
|
||||||
|
../../home/programs/alacritty
|
||||||
|
];
|
||||||
|
|
||||||
|
# nix.package = pkgs.nix;
|
||||||
|
|
||||||
# Create /etc/bashrc that loads the nix-darwin environment.
|
# Create /etc/bashrc that loads the nix-darwin environment.
|
||||||
programs.zsh.enable = true; # default shell on catalina
|
programs.zsh.enable = true; # default shell on catalina
|
||||||
|
# programs.fish.enable = true;
|
||||||
|
|
||||||
system.primaryUser = "haak";
|
system.primaryUser = "haak";
|
||||||
|
|
||||||
|
|
@ -109,14 +116,12 @@ in
|
||||||
# by nix-darwin
|
# by nix-darwin
|
||||||
system.activationScripts.applications.text = pkgs.lib.mkForce (
|
system.activationScripts.applications.text = pkgs.lib.mkForce (
|
||||||
''
|
''
|
||||||
userDir="${config.users.users.haak.home}Applications/Nix Apps"
|
userDir="$HOME/Applications/Nix Apps"
|
||||||
echo "setting up $userDir"
|
echo "setting up $userDir"
|
||||||
rm -rf "$userDir"
|
rm -rf $userDir
|
||||||
mkdir -p "$userDir"
|
mkdir -p $userDir
|
||||||
chown haak "$userDir"
|
chown haak $userDir
|
||||||
find ${config.system.build.applications}/Applications -maxdepth 1 -type l -exec sh -c '
|
for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do
|
||||||
userDir="${config.users.users.haak.home}Applications/Nix Apps"
|
|
||||||
app=$1
|
|
||||||
src="$(/usr/bin/stat -f%Y "$app")"
|
src="$(/usr/bin/stat -f%Y "$app")"
|
||||||
dst="$userDir/$(basename $src)"
|
dst="$userDir/$(basename $src)"
|
||||||
echo "app: $app, src: $src, dst: $dst"
|
echo "app: $app, src: $src, dst: $dst"
|
||||||
|
|
@ -124,7 +129,7 @@ in
|
||||||
echo "Linking $app"
|
echo "Linking $app"
|
||||||
ln -s "$app" "$dst"
|
ln -s "$app" "$dst"
|
||||||
fi
|
fi
|
||||||
' sh {} \;
|
done
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -257,7 +262,4 @@ in
|
||||||
# Used for backwards compatibility, please read the changelog before changing.
|
# Used for backwards compatibility, please read the changelog before changing.
|
||||||
# $ darwin-rebuild changelog
|
# $ darwin-rebuild changelog
|
||||||
system.stateVersion = 4;
|
system.stateVersion = 4;
|
||||||
|
|
||||||
# something odd about the migration from 4 to 5, or to Lix?
|
|
||||||
ids.gids.nixbld = 350;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
83
nix/system/worktop/flake.lock
generated
83
nix/system/worktop/flake.lock
generated
|
|
@ -1,83 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1774379316,
|
|
||||||
"narHash": "sha256-0nGNxWDUH2Hzlj/R3Zf4FEK6fsFNB/dvewuboSRZqiI=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "1eb0549a1ab3fe3f5acf86668249be15fa0e64f7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-darwin": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1773000227,
|
|
||||||
"narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=",
|
|
||||||
"owner": "nix-darwin",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"rev": "da529ac9e46f25ed5616fd634079a5f3c579135f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-darwin",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1774218495,
|
|
||||||
"narHash": "sha256-5g/jjDqSwZ0cbUpUTJ/ip/otL3P7O9Q6fUg3Z3eBKt4=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "03e95ed5e97dce71ef304ef35954593dd988e4b6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"nix-darwin": "nix-darwin",
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"variables": "variables"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"variables": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"path": "./secret-variables.nix",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"path": "./secret-variables.nix",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"parent": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
{
|
|
||||||
description = "Worktop darwin system";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
||||||
|
|
||||||
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
|
|
||||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
variables = {
|
|
||||||
url = "./secret-variables.nix";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, variables }:
|
|
||||||
let
|
|
||||||
vars = import variables;
|
|
||||||
in {
|
|
||||||
darwinConfigurations."${vars.hostname}" = nix-darwin.lib.darwinSystem {
|
|
||||||
modules = [
|
|
||||||
./darwin-configuration.nix
|
|
||||||
|
|
||||||
home-manager.darwinModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.haak = {
|
|
||||||
imports = [
|
|
||||||
../../home/commandline.nix
|
|
||||||
../../home/programs/alacritty
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue