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": {
|
||||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -28,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1697838989,
|
||||
"narHash": "sha256-hwVlO+st8vWJO6iy3/JbMHrUyY4Ak7xUSmffoWqBPUg=",
|
||||
"lastModified": 1701609479,
|
||||
"narHash": "sha256-mcEnMz7XB3K57ZX16VXoEkswljSNGXdMuUu5+g8a8R8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ae631b0b20f06f7d239d160723d228891ddb2fe0",
|
||||
"rev": "e504e8d01f950776c3a3160ba38c5957a1b89e66",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -41,13 +20,33 @@
|
|||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1697723726,
|
||||
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
|
||||
"lastModified": 1701253981,
|
||||
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0",
|
||||
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -59,11 +58,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1697866785,
|
||||
"narHash": "sha256-68Qf0RuGKnihfsR45ugZZsBhnVY7dtX7lKbjOF3A43Y=",
|
||||
"lastModified": 1701645127,
|
||||
"narHash": "sha256-MhsntrTDlOnlGW3HRTxs1H+BUCHbA0uYb0i3pwxugi8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "f45bab34a6b89a8d004517012d3285fd00d6b114",
|
||||
"rev": "e7d5551b1d558382e503c8b827c6ff48cd50baa7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -74,8 +73,8 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nur": "nur"
|
||||
}
|
||||
|
|
71
flake.nix
71
flake.nix
|
@ -1,34 +1,85 @@
|
|||
{
|
||||
description = "Nix and home-manager configurations for Softinio's macbook";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nix-darwin = {
|
||||
url = "github:LnL7/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nur.url = github:nix-community/nur;
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
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
|
||||
homeManagerConfFor = config: { ... }: {
|
||||
nixpkgs.overlays = [ nur.overlay ];
|
||||
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 = [
|
||||
./darwin-configuration.nix
|
||||
m3maxConfiguration
|
||||
home-manager.darwinModules.home-manager {
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.salar = homeManagerConfFor ./home.nix;
|
||||
}
|
||||
];
|
||||
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);
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"discord"
|
||||
"idea-ultimate"
|
||||
"slack"
|
||||
"vscode"
|
||||
"zoom"
|
||||
];
|
||||
|
||||
home = {
|
||||
stateVersion = "23.05";
|
||||
stateVersion = "23.11";
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "$EDITOR";
|
||||
|
@ -20,17 +24,19 @@
|
|||
jdk21
|
||||
any-nix-shell
|
||||
aspell
|
||||
bloop
|
||||
#bloop
|
||||
cabal-install
|
||||
cabal2nix
|
||||
cachix
|
||||
cargo
|
||||
cmake
|
||||
coursier
|
||||
curlFull
|
||||
#curlFull
|
||||
delta
|
||||
discord
|
||||
fd
|
||||
ffmpeg
|
||||
fishPlugins.bass
|
||||
#fishPlugins.bass
|
||||
fishPlugins.foreign-env
|
||||
fishPlugins.bobthefish
|
||||
font-awesome
|
||||
|
@ -40,6 +46,7 @@
|
|||
gnupg
|
||||
go
|
||||
graphviz
|
||||
jetbrains.idea-ultimate
|
||||
haskell-language-server
|
||||
hugo
|
||||
luajit
|
||||
|
@ -70,12 +77,13 @@
|
|||
rclone
|
||||
readline
|
||||
ripgrep
|
||||
# ripgrep-all
|
||||
ripgrep-all
|
||||
rnix-lsp
|
||||
rustup
|
||||
rustc
|
||||
sbt
|
||||
scala-cli
|
||||
shellcheck
|
||||
slack
|
||||
slides
|
||||
sqlite
|
||||
stylua
|
||||
|
@ -87,9 +95,10 @@
|
|||
tokei
|
||||
tree
|
||||
tree-sitter
|
||||
# wget
|
||||
wget
|
||||
xz
|
||||
yq
|
||||
zoom-us
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -159,7 +168,7 @@
|
|||
enable = true;
|
||||
theme = "Tokyo Night";
|
||||
font = {
|
||||
name = "FiraCode Nerd Font Mono Retina";
|
||||
name = "SF Mono";
|
||||
size = 16;
|
||||
};
|
||||
settings = {
|
||||
|
@ -171,16 +180,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
# programs.nheko = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# scaleFactor = 1.0;
|
||||
# user = {
|
||||
# alertOnNotification = true;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
@ -198,24 +197,37 @@
|
|||
pkgs.vscode-extensions.scalameta.metals
|
||||
pkgs.vscode-extensions.usernamehw.errorlens
|
||||
pkgs.vscode-extensions.redhat.java
|
||||
pkgs.vscode-extensions.redhat.vscode-yaml
|
||||
pkgs.vscode-extensions.xyz.local-history
|
||||
pkgs.vscode-extensions.yzhang.markdown-all-in-one
|
||||
pkgs.vscode-extensions.svsool.markdown-memo
|
||||
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.jnoortheen.nix-ide
|
||||
pkgs.vscode-extensions.timonwong.shellcheck
|
||||
pkgs.vscode-extensions.skyapps.fish-vscode
|
||||
pkgs.vscode-extensions.baccata.scaladex-search
|
||||
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 = {
|
||||
editor.fontFamily = "FiraCode Nerd Font Mono Retina";
|
||||
editor.fontFamily = "SF Mono";
|
||||
editor.fontSize = 16;
|
||||
editor.copyWithSyntaxHighlighting = true;
|
||||
telemetry.enableTelemetry = false;
|
||||
workbench.colorTheme = "Solarized Light";
|
||||
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 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 NIX_PATH $HOME/.nix-defexpr/channels $NIX_PATH
|
||||
|
|
|
@ -10,14 +10,14 @@ return {
|
|||
check_for_updates = false,
|
||||
-- color_scheme = "Gruvbox Light";
|
||||
color_scheme = "tokyonight",
|
||||
font = wezterm.font("FiraCode Nerd Font Mono"),
|
||||
font = wezterm.font("SF Mono"),
|
||||
font_size = 16,
|
||||
dpi = 144,
|
||||
scrollback_lines = 50000,
|
||||
initial_cols = 400,
|
||||
initial_rows = 80,
|
||||
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 = {
|
||||
{
|
||||
name = "hcloud1",
|
||||
|
|
Loading…
Reference in a new issue