mirror of
https://github.com/larstvei/nix-config.git
synced 2024-11-26 08:58:31 +00:00
Compare commits
No commits in common. "733a94450778233a649a42834005097abbbff3ad" and "d818c16e8f518acde0f1351ec893c3322c50b8ae" have entirely different histories.
733a944507
...
d818c16e8f
72
flake.lock
72
flake.lock
@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727507295,
|
||||
"narHash": "sha256-I/FrX1peu4URoj5T5odfuKR2rm4GjYJJpCGF9c0/lDA=",
|
||||
"lastModified": 1721270582,
|
||||
"narHash": "sha256-MdZmYPPExntE5rJu88IhJSy8Um4UyZCTXhOwvzbjDVI=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "f2e1c4aa29fc211947c3a7113cba1dd707433b70",
|
||||
"rev": "a3e4a7b8ffc08c7dc1973822a77ad432e1ec3dec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -23,11 +23,11 @@
|
||||
"emacs-config": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1725551480,
|
||||
"narHash": "sha256-NP2qZrT799JCny+8MKWSL6gdJGr1BxAoo9QOaNWo9UM=",
|
||||
"lastModified": 1721497986,
|
||||
"narHash": "sha256-Z3Lx7334AiV/g0VYMZw0QLaZbnyLbEhKUvc0uAOTgNo=",
|
||||
"owner": "larstvei",
|
||||
"repo": "dot-emacs",
|
||||
"rev": "32cbab47f8020cde616f16f0f0590612b637f2a3",
|
||||
"rev": "8d5c90d13f16e09e13ecffde45523b27134b6c6b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -45,11 +45,11 @@
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726969086,
|
||||
"narHash": "sha256-CHKX91NOuVOiVQPzxNNZJLxi+bD/ACbTbbTGOplieGE=",
|
||||
"lastModified": 1721524893,
|
||||
"narHash": "sha256-bI4wxmfDyA4Qb0EmqGNujsPxsKlrRxWl7X3xX1bRtZk=",
|
||||
"owner": "larstvei",
|
||||
"repo": "emacs-flake",
|
||||
"rev": "678b51e6607341da055ad471de66c319536aada7",
|
||||
"rev": "a1bcb1220b072f38fb39a0843040c35c892d9751",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -65,11 +65,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726967971,
|
||||
"narHash": "sha256-UO0TQbj8UFI4tioDTjmui0UqTL8CZkwizolvxqJLGu0=",
|
||||
"lastModified": 1721524329,
|
||||
"narHash": "sha256-SyAHDx9l5cITXVfP48YFRZ9sfAh2dwIU4H3ed/T9Vrs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "2c5171a36fcd616753b204c34ef38bf7729825e2",
|
||||
"rev": "717ae15d3131b195df37cc807ec3c4bff2342c06",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -81,11 +81,11 @@
|
||||
"emacs-plus": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1726592256,
|
||||
"narHash": "sha256-Twamd/Doh2btEix3TK/NfilT5eZ6jEJ9rBXbJeVb6Yw=",
|
||||
"lastModified": 1721032571,
|
||||
"narHash": "sha256-jKTOwbm0cNp8D5pinF4wtn5beQRlLmsnClg+8ooDkX0=",
|
||||
"owner": "d12frosted",
|
||||
"repo": "homebrew-emacs-plus",
|
||||
"rev": "cc3280dfdf7562dd69c97d0dfa872b1c3313a18a",
|
||||
"rev": "323d86b2685a2420341e648bbc6c7b7c02029fa9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -99,11 +99,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -117,11 +117,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -137,11 +137,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727383923,
|
||||
"narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=",
|
||||
"lastModified": 1721135958,
|
||||
"narHash": "sha256-H548rpPMsn25LDKn1PCFmPxmWlClJJGnvdzImHkqjuY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ffe2d07e771580a005e675108212597e5b367d2d",
|
||||
"rev": "afd2021bedff2de92dfce0e257a3d03ae65c603d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -152,11 +152,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1726755586,
|
||||
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
|
||||
"lastModified": 1721379653,
|
||||
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
|
||||
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -168,11 +168,11 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1726838390,
|
||||
"narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=",
|
||||
"lastModified": 1721409541,
|
||||
"narHash": "sha256-b6PLr0Ty7JPDBtJtjnYzlBf02bbH9alWMAgispMkTwk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101",
|
||||
"rev": "0c53b6b8c2a3e46c68e04417e247bba660689c9d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -184,11 +184,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1726871744,
|
||||
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
|
||||
"lastModified": 1721466660,
|
||||
"narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2",
|
||||
"rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -200,11 +200,11 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1727492312,
|
||||
"narHash": "sha256-oRkgc+DosM3HIl9el98TxF2rtliKHCNVw00nlQC7xYM=",
|
||||
"lastModified": 1721466660,
|
||||
"narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4471f9f67fe0f95f5fec4cc2ebac59fe32af2b62",
|
||||
"rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
13
flake.nix
13
flake.nix
@ -1,5 +1,5 @@
|
||||
{
|
||||
description = "My nix configuration.";
|
||||
description = "Lars' MacBook Pro";
|
||||
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
@ -16,16 +16,12 @@
|
||||
emacs-larstvei.url = "github:larstvei/emacs-flake";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ darwin, home-manager, ... }@inputs:
|
||||
{
|
||||
outputs = { self, nixpkgs, darwin, home-manager, emacs-larstvei, ... }@inputs: {
|
||||
darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
|
||||
modules = [
|
||||
./modules/core.nix
|
||||
./modules/macos.nix
|
||||
|
||||
./modules/mac.nix
|
||||
home-manager.darwinModule
|
||||
{
|
||||
home-manager = {
|
||||
@ -39,6 +35,9 @@
|
||||
};
|
||||
};
|
||||
}
|
||||
({ config, pkgs, lib, ... }: {
|
||||
services.nix-daemon.enable = true;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -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;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ pkgs }:
|
||||
with pkgs;
|
||||
[
|
||||
source-sans
|
||||
source-code-pro
|
||||
source-serif
|
||||
]
|
112
modules/home.nix
112
modules/home.nix
@ -1,22 +1,93 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
emacs-larstvei,
|
||||
...
|
||||
}:
|
||||
let
|
||||
concatAttrVals = attrSet: lib.concatMap (x: x) (lib.attrValues attrSet);
|
||||
tools = import ./tools.nix {
|
||||
inherit pkgs;
|
||||
inherit emacs-larstvei;
|
||||
};
|
||||
langauges = import ./languages.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
home.packages = concatAttrVals langauges ++ concatAttrVals tools;
|
||||
{ pkgs, emacs-larstvei, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
emacs-larstvei.defaultPackage.${pkgs.system}
|
||||
(hunspellWithDicts [ hunspellDicts.nb_NO ])
|
||||
(python3.withPackages
|
||||
(python-packages: with python-packages; [
|
||||
graphviz
|
||||
html2text
|
||||
hypothesis
|
||||
matplotlib
|
||||
numpy
|
||||
openpyxl
|
||||
pandas
|
||||
pygments
|
||||
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.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 = {
|
||||
fzf = {
|
||||
enable = true;
|
||||
@ -39,6 +110,7 @@ in
|
||||
track_directories
|
||||
end
|
||||
set -gx DIRENV_LOG_FORMAT ""
|
||||
direnv hook fish | source
|
||||
'';
|
||||
};
|
||||
|
||||
@ -62,11 +134,7 @@ in
|
||||
enable = true;
|
||||
userName = "larstvei";
|
||||
userEmail = "larstvei@ifi.uio.no";
|
||||
ignores = [
|
||||
".envrc"
|
||||
".DS_Store"
|
||||
".direnv"
|
||||
];
|
||||
ignores = [ ".envrc" ".DS_Store" ];
|
||||
};
|
||||
|
||||
direnv = {
|
||||
@ -89,5 +157,5 @@ in
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "24.11";
|
||||
home.stateVersion = "22.05";
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
@ -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";
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
system.activationScripts.postActivation.text = ''
|
||||
# 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
|
||||
'';
|
||||
|
||||
networking.hostName = "larstvei-macbookpro";
|
||||
networking.hostName = "macbookpro";
|
||||
|
||||
system = {
|
||||
stateVersion = 4;
|
||||
@ -22,9 +40,7 @@
|
||||
remapCapsLockToControl = true;
|
||||
};
|
||||
defaults = {
|
||||
screencapture = {
|
||||
location = "/tmp";
|
||||
};
|
||||
screencapture = { location = "/tmp"; };
|
||||
dock = {
|
||||
autohide = true;
|
||||
showhidden = true;
|
||||
@ -56,28 +72,25 @@
|
||||
upgrade = true;
|
||||
cleanup = "uninstall";
|
||||
};
|
||||
taps = [
|
||||
"homebrew/cask"
|
||||
"homebrew/cask-versions"
|
||||
];
|
||||
taps = [ "homebrew/cask" "homebrew/cask-versions" ];
|
||||
casks = [
|
||||
"amethyst"
|
||||
"arc"
|
||||
"chatgpt"
|
||||
"docker"
|
||||
"dropbox"
|
||||
# "expressvpn"
|
||||
# "firefox-developer-edition"
|
||||
"google-chrome"
|
||||
"iina"
|
||||
"karabiner-elements"
|
||||
# "mactex"
|
||||
"obs"
|
||||
"ollama"
|
||||
"processing"
|
||||
"raycast"
|
||||
"remarkable"
|
||||
"signal"
|
||||
"skim"
|
||||
"supercollider"
|
||||
"utm"
|
||||
"zoom"
|
||||
];
|
||||
};
|
@ -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
3
nix/nix.conf
Normal 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=
|
Loading…
Reference in New Issue
Block a user