updates to migrate to apple silicon / apple m3 processor
This commit is contained in:
parent
1c0cb47c5b
commit
bd57d53565
5 changed files with 129 additions and 111 deletions
|
@ -1,40 +0,0 @@
|
||||||
{ pkgs, nix, nixpkgs, config, lib, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs;
|
|
||||||
[
|
|
||||||
home-manager
|
|
||||||
];
|
|
||||||
|
|
||||||
fonts = {
|
|
||||||
fontDir.enable = true;
|
|
||||||
fonts = with pkgs; [
|
|
||||||
fira-code
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = 4;
|
|
||||||
users = {
|
|
||||||
users.salar = {
|
|
||||||
home = /Users/salar;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
nixPath = lib.mkForce [
|
|
||||||
"nixpkgs=${nixpkgs}"
|
|
||||||
];
|
|
||||||
package = pkgs.nixUnstable;
|
|
||||||
settings = {
|
|
||||||
experimental-features = "nix-command flakes repl-flake";
|
|
||||||
trusted-users = [ "root" "salar" ];
|
|
||||||
};
|
|
||||||
distributedBuilds = false;
|
|
||||||
};
|
|
||||||
services.nix-daemon.enable = true;
|
|
||||||
services.emacs = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.emacsMacport;
|
|
||||||
};
|
|
||||||
}
|
|
61
flake.lock
61
flake.lock
|
@ -1,26 +1,5 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"darwin": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1697723594,
|
|
||||||
"narHash": "sha256-W7lTC+kHGS1YCOutGpxUHF0cK66iY/GYr3INaTyVa/I=",
|
|
||||||
"owner": "lnl7",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"rev": "19f75c2b45fbfc307ecfeb9dadc41a4c1e4fb980",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "lnl7",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -28,11 +7,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697838989,
|
"lastModified": 1701609479,
|
||||||
"narHash": "sha256-hwVlO+st8vWJO6iy3/JbMHrUyY4Ak7xUSmffoWqBPUg=",
|
"narHash": "sha256-mcEnMz7XB3K57ZX16VXoEkswljSNGXdMuUu5+g8a8R8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "ae631b0b20f06f7d239d160723d228891ddb2fe0",
|
"rev": "e504e8d01f950776c3a3160ba38c5957a1b89e66",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -41,13 +20,33 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1700795494,
|
||||||
|
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||||
|
"owner": "LnL7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "LnL7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697723726,
|
"lastModified": 1701253981,
|
||||||
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
|
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0",
|
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -59,11 +58,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697866785,
|
"lastModified": 1701645127,
|
||||||
"narHash": "sha256-68Qf0RuGKnihfsR45ugZZsBhnVY7dtX7lKbjOF3A43Y=",
|
"narHash": "sha256-MhsntrTDlOnlGW3HRTxs1H+BUCHbA0uYb0i3pwxugi8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "f45bab34a6b89a8d004517012d3285fd00d6b114",
|
"rev": "e7d5551b1d558382e503c8b827c6ff48cd50baa7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -74,8 +73,8 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": "darwin",
|
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nix-darwin": "nix-darwin",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nur": "nur"
|
"nur": "nur"
|
||||||
}
|
}
|
||||||
|
|
71
flake.nix
71
flake.nix
|
@ -1,34 +1,85 @@
|
||||||
{
|
{
|
||||||
description = "Nix and home-manager configurations for Softinio's macbook";
|
description = "Nix and home-manager configurations for Softinio's macbook";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
nix-darwin = {
|
||||||
|
url = "github:LnL7/nix-darwin";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
nur.url = github:nix-community/nur;
|
nur.url = github:nix-community/nur;
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
darwin = {
|
|
||||||
url = "github:lnl7/nix-darwin/master";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
outputs = {darwin, home-manager, nur, nixpkgs, ...}:
|
outputs = {self, nix-darwin, home-manager, nur, nixpkgs, ...}:
|
||||||
let
|
let
|
||||||
homeManagerConfFor = config: { ... }: {
|
homeManagerConfFor = config: { ... }: {
|
||||||
nixpkgs.overlays = [ nur.overlay ];
|
nixpkgs.overlays = [ nur.overlay ];
|
||||||
imports = [ config ];
|
imports = [ config ];
|
||||||
};
|
};
|
||||||
darwinSystem = darwin.lib.darwinSystem {
|
|
||||||
system = "x86_64-darwin";
|
m3maxConfiguration = { pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs;
|
||||||
|
[
|
||||||
|
home-manager
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts = {
|
||||||
|
fontDir.enable = true;
|
||||||
|
fonts = with pkgs; [
|
||||||
|
fira-code
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nix-daemon.enable = true;
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
nixPath = nixpkgs.lib.mkForce [
|
||||||
|
"nixpkgs=${nixpkgs}"
|
||||||
|
];
|
||||||
|
|
||||||
|
package = pkgs.nixUnstable;
|
||||||
|
settings = {
|
||||||
|
experimental-features = "nix-command flakes repl-flake";
|
||||||
|
extra-platforms = [ "x86_64-darwin" "aarch64-darwin" ];
|
||||||
|
trusted-users = [ "root" "salar" ];
|
||||||
|
};
|
||||||
|
distributedBuilds = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
|
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||||
|
|
||||||
|
system.stateVersion = 4;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||||
|
|
||||||
|
users = {
|
||||||
|
users.salar = {
|
||||||
|
home = /Users/salar;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
darwinConfigurations.salarm3max = nix-darwin.lib.darwinSystem {
|
||||||
|
system = "aarc64-darwin";
|
||||||
modules = [
|
modules = [
|
||||||
./darwin-configuration.nix
|
m3maxConfiguration
|
||||||
home-manager.darwinModules.home-manager {
|
home-manager.darwinModules.home-manager {
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.salar = homeManagerConfFor ./home.nix;
|
home-manager.users.salar = homeManagerConfFor ./home.nix;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
specialArgs = { inherit nixpkgs; };
|
specialArgs = { inherit nixpkgs; };
|
||||||
};
|
};
|
||||||
in {
|
|
||||||
defaultPackage.x86_64-darwin = darwinSystem.system;
|
darwinPackages = self.darwinConfigurations.salarm3max.pkgs;
|
||||||
|
|
||||||
|
defaultPackage.aarch64-darwin = self.darwinConfigurations.salarm3max.system;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
54
home.nix
54
home.nix
|
@ -7,11 +7,15 @@
|
||||||
imports = (import ./programs);
|
imports = (import ./programs);
|
||||||
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
|
"discord"
|
||||||
|
"idea-ultimate"
|
||||||
|
"slack"
|
||||||
"vscode"
|
"vscode"
|
||||||
|
"zoom"
|
||||||
];
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
stateVersion = "23.05";
|
stateVersion = "23.11";
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
VISUAL = "$EDITOR";
|
VISUAL = "$EDITOR";
|
||||||
|
@ -20,17 +24,19 @@
|
||||||
jdk21
|
jdk21
|
||||||
any-nix-shell
|
any-nix-shell
|
||||||
aspell
|
aspell
|
||||||
bloop
|
#bloop
|
||||||
cabal-install
|
cabal-install
|
||||||
cabal2nix
|
cabal2nix
|
||||||
cachix
|
cachix
|
||||||
|
cargo
|
||||||
cmake
|
cmake
|
||||||
coursier
|
coursier
|
||||||
curlFull
|
#curlFull
|
||||||
delta
|
delta
|
||||||
|
discord
|
||||||
fd
|
fd
|
||||||
ffmpeg
|
ffmpeg
|
||||||
fishPlugins.bass
|
#fishPlugins.bass
|
||||||
fishPlugins.foreign-env
|
fishPlugins.foreign-env
|
||||||
fishPlugins.bobthefish
|
fishPlugins.bobthefish
|
||||||
font-awesome
|
font-awesome
|
||||||
|
@ -40,6 +46,7 @@
|
||||||
gnupg
|
gnupg
|
||||||
go
|
go
|
||||||
graphviz
|
graphviz
|
||||||
|
jetbrains.idea-ultimate
|
||||||
haskell-language-server
|
haskell-language-server
|
||||||
hugo
|
hugo
|
||||||
luajit
|
luajit
|
||||||
|
@ -70,12 +77,13 @@
|
||||||
rclone
|
rclone
|
||||||
readline
|
readline
|
||||||
ripgrep
|
ripgrep
|
||||||
# ripgrep-all
|
ripgrep-all
|
||||||
rnix-lsp
|
rnix-lsp
|
||||||
rustup
|
rustc
|
||||||
sbt
|
sbt
|
||||||
scala-cli
|
scala-cli
|
||||||
shellcheck
|
shellcheck
|
||||||
|
slack
|
||||||
slides
|
slides
|
||||||
sqlite
|
sqlite
|
||||||
stylua
|
stylua
|
||||||
|
@ -87,9 +95,10 @@
|
||||||
tokei
|
tokei
|
||||||
tree
|
tree
|
||||||
tree-sitter
|
tree-sitter
|
||||||
# wget
|
wget
|
||||||
xz
|
xz
|
||||||
yq
|
yq
|
||||||
|
zoom-us
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -159,7 +168,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "Tokyo Night";
|
theme = "Tokyo Night";
|
||||||
font = {
|
font = {
|
||||||
name = "FiraCode Nerd Font Mono Retina";
|
name = "SF Mono";
|
||||||
size = 16;
|
size = 16;
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -171,16 +180,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# programs.nheko = {
|
|
||||||
# enable = true;
|
|
||||||
# settings = {
|
|
||||||
# scaleFactor = 1.0;
|
|
||||||
# user = {
|
|
||||||
# alertOnNotification = true;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -198,24 +197,37 @@
|
||||||
pkgs.vscode-extensions.scalameta.metals
|
pkgs.vscode-extensions.scalameta.metals
|
||||||
pkgs.vscode-extensions.usernamehw.errorlens
|
pkgs.vscode-extensions.usernamehw.errorlens
|
||||||
pkgs.vscode-extensions.redhat.java
|
pkgs.vscode-extensions.redhat.java
|
||||||
|
pkgs.vscode-extensions.redhat.vscode-yaml
|
||||||
pkgs.vscode-extensions.xyz.local-history
|
pkgs.vscode-extensions.xyz.local-history
|
||||||
pkgs.vscode-extensions.yzhang.markdown-all-in-one
|
pkgs.vscode-extensions.yzhang.markdown-all-in-one
|
||||||
pkgs.vscode-extensions.svsool.markdown-memo
|
pkgs.vscode-extensions.svsool.markdown-memo
|
||||||
pkgs.vscode-extensions.github.vscode-pull-request-github
|
pkgs.vscode-extensions.github.vscode-pull-request-github
|
||||||
|
pkgs.vscode-extensions.github.vscode-github-actions
|
||||||
|
pkgs.vscode-extensions.vscode-icons-team.vscode-icons
|
||||||
pkgs.vscode-extensions.github.github-vscode-theme
|
pkgs.vscode-extensions.github.github-vscode-theme
|
||||||
pkgs.vscode-extensions.jnoortheen.nix-ide
|
pkgs.vscode-extensions.jnoortheen.nix-ide
|
||||||
pkgs.vscode-extensions.timonwong.shellcheck
|
pkgs.vscode-extensions.timonwong.shellcheck
|
||||||
pkgs.vscode-extensions.skyapps.fish-vscode
|
pkgs.vscode-extensions.skyapps.fish-vscode
|
||||||
pkgs.vscode-extensions.baccata.scaladex-search
|
pkgs.vscode-extensions.baccata.scaladex-search
|
||||||
pkgs.vscode-extensions.davidanson.vscode-markdownlint
|
pkgs.vscode-extensions.davidanson.vscode-markdownlint
|
||||||
|
pkgs.vscode-extensions.ms-python.python
|
||||||
|
pkgs.vscode-extensions.mechatroner.rainbow-csv
|
||||||
|
pkgs.vscode-extensions.mkhl.direnv
|
||||||
|
pkgs.vscode-extensions.asvetliakov.vscode-neovim
|
||||||
];
|
];
|
||||||
userSettings = {
|
userSettings = {
|
||||||
editor.fontFamily = "FiraCode Nerd Font Mono Retina";
|
editor.fontFamily = "SF Mono";
|
||||||
editor.fontSize = 16;
|
editor.fontSize = 16;
|
||||||
editor.copyWithSyntaxHighlighting = true;
|
editor.copyWithSyntaxHighlighting = true;
|
||||||
telemetry.enableTelemetry = false;
|
telemetry.enableTelemetry = false;
|
||||||
workbench.colorTheme = "Solarized Light";
|
workbench.colorTheme = "Solarized Light";
|
||||||
workbench.iconTheme = "vscode-icons";
|
workbench.iconTheme = "vscode-icons";
|
||||||
|
workbench.sideBar.location = "right";
|
||||||
|
"githubPullRequests.pullBranch" = "never";
|
||||||
|
"markdown.extension.preview.autoShowPreviewToSide" = true;
|
||||||
|
"extensions.experimental.affinity" = {
|
||||||
|
"asvetliakov.vscode-neovim" = 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -250,10 +262,6 @@
|
||||||
|
|
||||||
set -xg JAVA_HOME /Users/salar/.nix-profile
|
set -xg JAVA_HOME /Users/salar/.nix-profile
|
||||||
|
|
||||||
set -xg JDTLS_CONFIG /Users/salar/.config/jdt-language-server/config_mac
|
|
||||||
|
|
||||||
set -xg JAR /Users/salar/.config/jdt-language-server/plugins/org.eclipse.equinox.launcher_1.6.200.v20210416-2027.jar
|
|
||||||
|
|
||||||
set -xg WORKSPACE /Users/salar/Projects
|
set -xg WORKSPACE /Users/salar/Projects
|
||||||
|
|
||||||
set -xg NIX_PATH $HOME/.nix-defexpr/channels $NIX_PATH
|
set -xg NIX_PATH $HOME/.nix-defexpr/channels $NIX_PATH
|
||||||
|
|
|
@ -10,14 +10,14 @@ return {
|
||||||
check_for_updates = false,
|
check_for_updates = false,
|
||||||
-- color_scheme = "Gruvbox Light";
|
-- color_scheme = "Gruvbox Light";
|
||||||
color_scheme = "tokyonight",
|
color_scheme = "tokyonight",
|
||||||
font = wezterm.font("FiraCode Nerd Font Mono"),
|
font = wezterm.font("SF Mono"),
|
||||||
font_size = 16,
|
font_size = 16,
|
||||||
dpi = 144,
|
dpi = 144,
|
||||||
scrollback_lines = 50000,
|
scrollback_lines = 50000,
|
||||||
initial_cols = 400,
|
initial_cols = 400,
|
||||||
initial_rows = 80,
|
initial_rows = 80,
|
||||||
leader = { key="b", mods="SUPER", timeout_milliseconds = 1000 },
|
leader = { key="b", mods="SUPER", timeout_milliseconds = 1000 },
|
||||||
default_prog = { "/Users/salar/.nix-profile/bin/fish" },
|
default_prog = { "/etc/profiles/per-user/salar/bin/fish" },
|
||||||
ssh_domains = {
|
ssh_domains = {
|
||||||
{
|
{
|
||||||
name = "hcloud1",
|
name = "hcloud1",
|
||||||
|
|
Loading…
Reference in a new issue