Compare commits

..

No commits in common. "733a94450778233a649a42834005097abbbff3ad" and "d818c16e8f518acde0f1351ec893c3322c50b8ae" have entirely different histories.

9 changed files with 180 additions and 259 deletions

View File

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1727507295, "lastModified": 1721270582,
"narHash": "sha256-I/FrX1peu4URoj5T5odfuKR2rm4GjYJJpCGF9c0/lDA=", "narHash": "sha256-MdZmYPPExntE5rJu88IhJSy8Um4UyZCTXhOwvzbjDVI=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "f2e1c4aa29fc211947c3a7113cba1dd707433b70", "rev": "a3e4a7b8ffc08c7dc1973822a77ad432e1ec3dec",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -23,11 +23,11 @@
"emacs-config": { "emacs-config": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1725551480, "lastModified": 1721497986,
"narHash": "sha256-NP2qZrT799JCny+8MKWSL6gdJGr1BxAoo9QOaNWo9UM=", "narHash": "sha256-Z3Lx7334AiV/g0VYMZw0QLaZbnyLbEhKUvc0uAOTgNo=",
"owner": "larstvei", "owner": "larstvei",
"repo": "dot-emacs", "repo": "dot-emacs",
"rev": "32cbab47f8020cde616f16f0f0590612b637f2a3", "rev": "8d5c90d13f16e09e13ecffde45523b27134b6c6b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -45,11 +45,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1726969086, "lastModified": 1721524893,
"narHash": "sha256-CHKX91NOuVOiVQPzxNNZJLxi+bD/ACbTbbTGOplieGE=", "narHash": "sha256-bI4wxmfDyA4Qb0EmqGNujsPxsKlrRxWl7X3xX1bRtZk=",
"owner": "larstvei", "owner": "larstvei",
"repo": "emacs-flake", "repo": "emacs-flake",
"rev": "678b51e6607341da055ad471de66c319536aada7", "rev": "a1bcb1220b072f38fb39a0843040c35c892d9751",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -65,11 +65,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1726967971, "lastModified": 1721524329,
"narHash": "sha256-UO0TQbj8UFI4tioDTjmui0UqTL8CZkwizolvxqJLGu0=", "narHash": "sha256-SyAHDx9l5cITXVfP48YFRZ9sfAh2dwIU4H3ed/T9Vrs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "2c5171a36fcd616753b204c34ef38bf7729825e2", "rev": "717ae15d3131b195df37cc807ec3c4bff2342c06",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -81,11 +81,11 @@
"emacs-plus": { "emacs-plus": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1726592256, "lastModified": 1721032571,
"narHash": "sha256-Twamd/Doh2btEix3TK/NfilT5eZ6jEJ9rBXbJeVb6Yw=", "narHash": "sha256-jKTOwbm0cNp8D5pinF4wtn5beQRlLmsnClg+8ooDkX0=",
"owner": "d12frosted", "owner": "d12frosted",
"repo": "homebrew-emacs-plus", "repo": "homebrew-emacs-plus",
"rev": "cc3280dfdf7562dd69c97d0dfa872b1c3313a18a", "rev": "323d86b2685a2420341e648bbc6c7b7c02029fa9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -99,11 +99,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1710146030,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -117,11 +117,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1710146030,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -137,11 +137,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1727383923, "lastModified": 1721135958,
"narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=", "narHash": "sha256-H548rpPMsn25LDKn1PCFmPxmWlClJJGnvdzImHkqjuY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ffe2d07e771580a005e675108212597e5b367d2d", "rev": "afd2021bedff2de92dfce0e257a3d03ae65c603d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -152,11 +152,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1726755586, "lastModified": 1721379653,
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=", "narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e", "rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -168,11 +168,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1726838390, "lastModified": 1721409541,
"narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", "narHash": "sha256-b6PLr0Ty7JPDBtJtjnYzlBf02bbH9alWMAgispMkTwk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", "rev": "0c53b6b8c2a3e46c68e04417e247bba660689c9d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -184,11 +184,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1726871744, "lastModified": 1721466660,
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=", "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2", "rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -200,11 +200,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1727492312, "lastModified": 1721466660,
"narHash": "sha256-oRkgc+DosM3HIl9el98TxF2rtliKHCNVw00nlQC7xYM=", "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4471f9f67fe0f95f5fec4cc2ebac59fe32af2b62", "rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -1,5 +1,5 @@
{ {
description = "My nix configuration."; description = "Lars' MacBook Pro";
inputs = { inputs = {
nixpkgs = { nixpkgs = {
@ -16,30 +16,29 @@
emacs-larstvei.url = "github:larstvei/emacs-flake"; emacs-larstvei.url = "github:larstvei/emacs-flake";
}; };
outputs = outputs = { self, nixpkgs, darwin, home-manager, emacs-larstvei, ... }@inputs: {
{ darwin, home-manager, ... }@inputs: darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem {
{ system = "aarch64-darwin";
darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [ modules = [
./modules/core.nix ./modules/mac.nix
./modules/macos.nix home-manager.darwinModule
{
home-manager.darwinModule home-manager = {
{ useGlobalPkgs = true;
home-manager = { useUserPackages = true;
useGlobalPkgs = true; users.larstvei = {
useUserPackages = true; imports = [
users.larstvei = { { _module.args = inputs; } # <- one could ask, why?
imports = [ ./modules/home.nix
{ _module.args = inputs; } # <- one could ask, why? ];
./modules/home.nix
];
};
}; };
} };
]; }
}; ({ config, pkgs, lib, ... }: {
services.nix-daemon.enable = true;
})
];
}; };
};
} }

View File

@ -1,40 +0,0 @@
{ pkgs, ... }:
{
nix = {
package = pkgs.nix;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
build-users-group = "nixbld";
trusted-users = [
"root"
"larstvei"
];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://larstvei.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"larstvei.cachix.org-1:mJq98qeTBnm2xNNibn2BEwN1ggi6uQg+5hWASdG1Vys="
];
};
};
environment.systemPackages = [
pkgs.git
pkgs.htop
pkgs.tree
];
services.nix-daemon.enable = true;
}

View File

@ -1,7 +0,0 @@
{ pkgs }:
with pkgs;
[
source-sans
source-code-pro
source-serif
]

View File

@ -1,22 +1,93 @@
{ { pkgs, emacs-larstvei, ... }: {
lib,
pkgs, home.packages = with pkgs; [
emacs-larstvei, emacs-larstvei.defaultPackage.${pkgs.system}
... (hunspellWithDicts [ hunspellDicts.nb_NO ])
}: (python3.withPackages
let (python-packages: with python-packages; [
concatAttrVals = attrSet: lib.concatMap (x: x) (lib.attrValues attrSet); graphviz
tools = import ./tools.nix { html2text
inherit pkgs; hypothesis
inherit emacs-larstvei; matplotlib
}; numpy
langauges = import ./languages.nix { inherit pkgs; }; openpyxl
in pandas
{ pygments
home.packages = concatAttrVals langauges ++ concatAttrVals tools; python-lsp-server
scikit-learn
scipy
xlsxwriter
yattag
z3
]))
(haskell.packages.ghc96.ghcWithPackages
(ps: with ps; [
QuickCheck
]))
bat
babashka
# cargo
cbqn
clj-kondo
cloc
clojure
devenv
fd
ffmpeg
fzf
go
gopls
graphviz
htop
imagemagick
inkscape
jdk
jet
jq
leiningen
minizinc
nil
neil
nixfmt
pandoc
parallel
pdf2svg
poppler_utils
ripgrep
# rust-analyzer
rustup
stack
texlive.combined.scheme-full
tree
wget
];
home.file.".config/enchant/hunspell/".source = "${pkgs.hunspellDicts.nb_NO}/share/hunspell/"; home.file.".config/enchant/hunspell/".source = "${pkgs.hunspellDicts.nb_NO}/share/hunspell/";
home.file.karabiner = {
target = ".config/karabiner/assets/complex_modifications/df_escape.json";
text = builtins.toJSON {
title = "Simultaneously press f + d to escape";
rules = [{
description = "Simultaneously press f + d to escape";
manipulators = [
{
type = "basic";
from = {
simultaneous = [
{ key_code = "f"; }
{ key_code = "d"; }
];
};
to = [
{ key_code = "escape"; }
];
}
];
}];
};
};
programs = { programs = {
fzf = { fzf = {
enable = true; enable = true;
@ -39,6 +110,7 @@ in
track_directories track_directories
end end
set -gx DIRENV_LOG_FORMAT "" set -gx DIRENV_LOG_FORMAT ""
direnv hook fish | source
''; '';
}; };
@ -62,11 +134,7 @@ in
enable = true; enable = true;
userName = "larstvei"; userName = "larstvei";
userEmail = "larstvei@ifi.uio.no"; userEmail = "larstvei@ifi.uio.no";
ignores = [ ignores = [ ".envrc" ".DS_Store" ];
".envrc"
".DS_Store"
".direnv"
];
}; };
direnv = { direnv = {
@ -89,5 +157,5 @@ in
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home.stateVersion = "24.11"; home.stateVersion = "22.05";
} }

View File

@ -1,78 +0,0 @@
{ pkgs, ... }:
with pkgs;
{
bqn = [
cbqn
];
clojure = [
babashka
clj-kondo
clojure
leiningen
neil
];
go = [
go
gopls
];
haskell = [
(haskell.packages.ghc96.ghcWithPackages (
ps: with ps; [
QuickCheck
]
))
stack
];
java = [
jdk
jdt-language-server
];
maude = [
maude
];
minizinc = [
minizinc
];
nix = [
nil
nixfmt-rfc-style
];
python = [
(python3.withPackages (
python-packages: with python-packages; [
graphviz
html2text
hypothesis
matplotlib
numpy
openpyxl
pandas
pygments
python-lsp-server
scikit-learn
scipy
xlsxwriter
yattag
z3
]
))
];
rust = [
cargo
rustc
rust-analyzer
];
tex = [
texlive.combined.scheme-full
];
}

View File

@ -1,18 +1,36 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }: {
{
fonts.packages = import ./fonts.nix { inherit pkgs; }; nix = {
package = pkgs.nix;
extraOptions = ''
system = aarch64-darwin # M1 gang
extra-platforms = aarch64-darwin x86_64-darwin # But we use rosetta too
experimental-features = nix-command flakes
build-users-group = nixbld
trusted-users = root larstvei
'';
};
fonts.packages = with pkgs; [
fira
fira-code
iosevka
roboto
roboto-mono
source-sans
source-code-pro
source-serif
];
users.users."larstvei".home = "/Users/larstvei"; users.users."larstvei".home = "/Users/larstvei";
programs.fish.enable = true; programs.fish.enable = true;
system.activationScripts.postActivation.text = '' system.activationScripts.postActivation.text = ''
# Set the default shell as fish for the user. MacOS doesn't do this like nixOS does # Set the default shell as fish for the user. MacOS doesn't do this like nixOS does
sudo chsh -s ${lib.getBin pkgs.fish}/bin/fish larstvei sudo chsh -s ${lib.getBin pkgs.fish}/bin/fish larstvei
''; '';
networking.hostName = "larstvei-macbookpro"; networking.hostName = "macbookpro";
system = { system = {
stateVersion = 4; stateVersion = 4;
@ -22,9 +40,7 @@
remapCapsLockToControl = true; remapCapsLockToControl = true;
}; };
defaults = { defaults = {
screencapture = { screencapture = { location = "/tmp"; };
location = "/tmp";
};
dock = { dock = {
autohide = true; autohide = true;
showhidden = true; showhidden = true;
@ -56,28 +72,25 @@
upgrade = true; upgrade = true;
cleanup = "uninstall"; cleanup = "uninstall";
}; };
taps = [ taps = [ "homebrew/cask" "homebrew/cask-versions" ];
"homebrew/cask"
"homebrew/cask-versions"
];
casks = [ casks = [
"amethyst" "amethyst"
"arc" "arc"
"chatgpt" "chatgpt"
"docker" "docker"
"dropbox" "dropbox"
# "expressvpn"
# "firefox-developer-edition"
"google-chrome" "google-chrome"
"iina" "iina"
"karabiner-elements" "karabiner-elements"
# "mactex"
"obs" "obs"
"ollama" "ollama"
"processing"
"raycast" "raycast"
"remarkable" "remarkable"
"signal" "signal"
"skim"
"supercollider" "supercollider"
"utm"
"zoom" "zoom"
]; ];
}; };

View File

@ -1,37 +0,0 @@
{ pkgs, emacs-larstvei, ... }:
with pkgs;
{
editor = [
emacs-larstvei.defaultPackage.${pkgs.system}
];
spelling = [
(hunspellWithDicts [ hunspellDicts.nb_NO ])
];
modernReplacements = [
bat
fd
ripgrep
];
utils = [
cloc
jet
jq
pandoc
parallel
wget
];
multimedia = [
ffmpeg
graphviz
imagemagick
inkscape
pdf2svg
poppler_utils
];
}

3
nix/nix.conf Normal file
View File

@ -0,0 +1,3 @@
experimental-features = nix-command flakes
substituters = https://cache.nixos.org https://cache.nixos.org/ https://nix-community.cachix.org https://larstvei.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= larstvei.cachix.org-1:mJq98qeTBnm2xNNibn2BEwN1ggi6uQg+5hWASdG1Vys=