mirror of
https://github.com/larstvei/nix-config.git
synced 2025-08-30 12:50:12 +00:00
Compare commits
20 Commits
9de0d57860
...
0a348dcc7b
Author | SHA1 | Date | |
---|---|---|---|
0a348dcc7b | |||
67c3453177 | |||
c81438603c | |||
205f731bd1 | |||
edb3686d34 | |||
793c310cf2 | |||
a45875053f | |||
329882275b | |||
85429dcf7e | |||
e719a6320d | |||
2b5b572a39 | |||
9b4918f8e1 | |||
d346072104 | |||
d7d6b952d6 | |||
4da1182c6f | |||
16115be5c9 | |||
53fa87d037 | |||
5657930899 | |||
0b0924e7fd | |||
09fbe602fa |
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
|||||||
[submodule "emacs"]
|
|
||||||
path = emacs
|
|
||||||
url = git@github.com:larstvei/dot-emacs.git
|
|
60
flake.lock
60
flake.lock
@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744478979,
|
"lastModified": 1751313918,
|
||||||
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
|
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
|
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -23,11 +23,11 @@
|
|||||||
"emacs-config": {
|
"emacs-config": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1745013913,
|
"lastModified": 1753376285,
|
||||||
"narHash": "sha256-vOppZSLE0LuVO3GaF0sARwEfdTMtUswbn96B7CNjfQ8=",
|
"narHash": "sha256-4Eop4e0WGXSfTUJNVvRX3LWmKYfqRHwyP7CQ29Ul1ec=",
|
||||||
"owner": "larstvei",
|
"owner": "larstvei",
|
||||||
"repo": "dot-emacs",
|
"repo": "dot-emacs",
|
||||||
"rev": "72fbff0076f8ef417993510f0047dcc5a3fe1c18",
|
"rev": "ccb295f284d8e47d7904cb966734ce52dc32eb72",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -45,11 +45,11 @@
|
|||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1745014073,
|
"lastModified": 1754925269,
|
||||||
"narHash": "sha256-bUErPobuvffGHUqlQzCofTSqa5IVbrc5cj6MH5WrCPo=",
|
"narHash": "sha256-jQ9T5PFxb+5CcFoe3tCVZATv+kSHgn3uxg1CaFp99VU=",
|
||||||
"owner": "larstvei",
|
"owner": "larstvei",
|
||||||
"repo": "emacs-flake",
|
"repo": "emacs-flake",
|
||||||
"rev": "c02fca42d35fb4755a33af6879a8cee8b1668172",
|
"rev": "89b8619b12bbd876b1958403c8afb22cfec6474e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -64,11 +64,11 @@
|
|||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744993365,
|
"lastModified": 1754790584,
|
||||||
"narHash": "sha256-YAcjnoRJo7m9Sq9uNorkNM33f1oZIigVuNPvUy6y3po=",
|
"narHash": "sha256-vZgfYDPUNA+x/lDx0ncHwGKuPkbQOLxdmv4LGFOjZoE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "90642af1fb7ab5e4c6deb221305acf6fc4472582",
|
"rev": "c684c5f057409a42d83c45ce161781e91e5520a7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -80,11 +80,11 @@
|
|||||||
"emacs-plus": {
|
"emacs-plus": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743441558,
|
"lastModified": 1754320041,
|
||||||
"narHash": "sha256-Eepinxv05Yl79AoPVJveGDZPKHhlAes7XtUvrssflrU=",
|
"narHash": "sha256-BT0XP4/PUq1n7eboeoMD0POq+wps1dUkKpiBFvjwBjI=",
|
||||||
"owner": "d12frosted",
|
"owner": "d12frosted",
|
||||||
"repo": "homebrew-emacs-plus",
|
"repo": "homebrew-emacs-plus",
|
||||||
"rev": "3e95d573d5f13aba7808193b66312b38a7c66851",
|
"rev": "cd8d57de9ac25d9822567ea4d51d5c67d791d7ab",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -118,11 +118,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1745001336,
|
"lastModified": 1754924470,
|
||||||
"narHash": "sha256-R4HuzrgYtOYBNmB3lfRxcieHEBO4uSfgHNz4MzWkZ5M=",
|
"narHash": "sha256-asI/or9AcUMydwzodCgpHGytnMSNUlciw3uaycpXm4E=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "fc09cb7aaadb70d6c4898654ffc872f0d2415df9",
|
"rev": "67393957c27b4e4c6c48a60108a201413ced7800",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -191,11 +191,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744932701,
|
"lastModified": 1754498491,
|
||||||
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
|
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
|
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -207,11 +207,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744440957,
|
"lastModified": 1751274312,
|
||||||
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
|
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
|
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -223,11 +223,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744536153,
|
"lastModified": 1754711617,
|
||||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
"narHash": "sha256-WrZ280bT6NzNbBo+CKeJA/NW1rhvN/RUPZczqCpu2mI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
"rev": "00b574b1ba8a352f0601c4dde4faff4b534ebb1e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -239,11 +239,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744536153,
|
"lastModified": 1754800730,
|
||||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
"narHash": "sha256-HfVZCXic9XLBgybP0318ym3cDnGwBs/+H5MgxFVYF4I=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
"rev": "641d909c4a7538f1539da9240dedb1755c907e40",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
43
flake.nix
43
flake.nix
@ -21,34 +21,27 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ darwin, home-manager, nix-rosetta-builder, ... }@inputs:
|
|
||||||
{
|
{
|
||||||
darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem {
|
darwin,
|
||||||
system = "aarch64-darwin";
|
home-manager,
|
||||||
|
nix-rosetta-builder,
|
||||||
|
emacs-larstvei,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
darwinConfigurations = {
|
||||||
|
larstvei-macbookpro = darwin.lib.darwinSystem {
|
||||||
|
system = "aarch64-darwin";
|
||||||
|
|
||||||
modules = [
|
specialArgs = { inherit emacs-larstvei; };
|
||||||
./modules/core.nix
|
|
||||||
./modules/macos.nix
|
|
||||||
|
|
||||||
nix-rosetta-builder.darwinModules.default
|
modules = [
|
||||||
{
|
home-manager.darwinModules.default
|
||||||
nix-rosetta-builder.onDemand = true;
|
./hosts/macbook/configuration.nix
|
||||||
}
|
nix-rosetta-builder.darwinModules.default
|
||||||
|
{ nix-rosetta-builder.onDemand = true; }
|
||||||
home-manager.darwinModules.default
|
];
|
||||||
{
|
};
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
users.larstvei = {
|
|
||||||
imports = [
|
|
||||||
{ _module.args = inputs; } # <- one could ask, why?
|
|
||||||
./modules/home.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
concatAttrVals = attrSet: lib.concatMap (x: x) (lib.attrValues attrSet);
|
concatAttrVals = attrSet: lib.concatMap (x: x) (lib.attrValues attrSet);
|
||||||
tools = import ./tools.nix {
|
tools = import ./tools {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit emacs-larstvei;
|
inherit emacs-larstvei;
|
||||||
};
|
};
|
||||||
langauges = import ./languages.nix { inherit pkgs; };
|
languages = import ./languages { inherit pkgs; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = concatAttrVals langauges ++ concatAttrVals tools;
|
home.packages = concatAttrVals languages ++ concatAttrVals tools;
|
||||||
|
|
||||||
home.file.".config/enchant/hunspell/".source = "${pkgs.hunspellDicts.nb_NO}/share/hunspell/";
|
home.file.".config/enchant/hunspell/".source = "${pkgs.hunspellDicts.nb_NO}/share/hunspell/";
|
||||||
|
|
@ -74,6 +74,10 @@ with pkgs;
|
|||||||
rust-analyzer
|
rust-analyzer
|
||||||
];
|
];
|
||||||
|
|
||||||
|
scheme = [
|
||||||
|
gambit
|
||||||
|
];
|
||||||
|
|
||||||
tex = [
|
tex = [
|
||||||
texliveFull
|
texliveFull
|
||||||
];
|
];
|
@ -1,4 +1,15 @@
|
|||||||
{ pkgs, emacs-larstvei, ... }:
|
{ pkgs, emacs-larstvei, ... }:
|
||||||
|
let
|
||||||
|
# Ghostscript has a name collision with gambit (scheme). Let's nuke the
|
||||||
|
# offending binary, as gsc most likely unused on my system.
|
||||||
|
ghostscriptNoGsc = pkgs.symlinkJoin {
|
||||||
|
name = "ghostscript-no-gsc";
|
||||||
|
paths = [ pkgs.ghostscript ];
|
||||||
|
postBuild = ''
|
||||||
|
rm -f $out/bin/gsc
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
with pkgs;
|
with pkgs;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -32,7 +43,7 @@ with pkgs;
|
|||||||
multimedia = [
|
multimedia = [
|
||||||
dot2tex
|
dot2tex
|
||||||
ffmpeg
|
ffmpeg
|
||||||
ghostscript
|
ghostscriptNoGsc
|
||||||
graphviz
|
graphviz
|
||||||
imagemagick
|
imagemagick
|
||||||
inkscape
|
inkscape
|
57
hosts/macbook/configuration.nix
Normal file
57
hosts/macbook/configuration.nix
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
{ pkgs, emacs-larstvei, ... }:
|
||||||
|
let
|
||||||
|
v = import ./variables.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../system
|
||||||
|
../../system/darwin
|
||||||
|
];
|
||||||
|
|
||||||
|
system.primaryUser = v.username;
|
||||||
|
|
||||||
|
networking.hostName = v.hostName;
|
||||||
|
|
||||||
|
users.users.${v.username} = {
|
||||||
|
home = v.userHome;
|
||||||
|
shell = pkgs.fish;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = { inherit emacs-larstvei; };
|
||||||
|
users.${v.username}.imports = [ ../../home ];
|
||||||
|
};
|
||||||
|
|
||||||
|
homebrew = {
|
||||||
|
enable = true;
|
||||||
|
onActivation = {
|
||||||
|
# autoUpdate = true;
|
||||||
|
upgrade = true;
|
||||||
|
cleanup = "uninstall";
|
||||||
|
};
|
||||||
|
casks = [
|
||||||
|
"amethyst"
|
||||||
|
"arc"
|
||||||
|
"chatgpt"
|
||||||
|
"darktable"
|
||||||
|
"dropbox"
|
||||||
|
"google-chrome"
|
||||||
|
"iina"
|
||||||
|
"karabiner-elements"
|
||||||
|
"obs"
|
||||||
|
"ollama"
|
||||||
|
"processing"
|
||||||
|
"racket"
|
||||||
|
"raycast"
|
||||||
|
"remarkable"
|
||||||
|
"signal"
|
||||||
|
"skim"
|
||||||
|
"supercollider"
|
||||||
|
"utm"
|
||||||
|
"zoom"
|
||||||
|
"zen-browser"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
5
hosts/macbook/variables.nix
Normal file
5
hosts/macbook/variables.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
username = "larstvei";
|
||||||
|
userHome = "/Users/larstvei";
|
||||||
|
hostName = "larstvei-macbookpro";
|
||||||
|
}
|
@ -1,80 +0,0 @@
|
|||||||
{ pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
|
|
||||||
fonts.packages = import ./fonts.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
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";
|
|
||||||
|
|
||||||
system = {
|
|
||||||
stateVersion = 4;
|
|
||||||
|
|
||||||
keyboard = {
|
|
||||||
enableKeyMapping = true;
|
|
||||||
remapCapsLockToControl = true;
|
|
||||||
};
|
|
||||||
defaults = {
|
|
||||||
screencapture = {
|
|
||||||
location = "/tmp";
|
|
||||||
};
|
|
||||||
dock = {
|
|
||||||
autohide = true;
|
|
||||||
showhidden = true;
|
|
||||||
mru-spaces = false;
|
|
||||||
};
|
|
||||||
finder = {
|
|
||||||
AppleShowAllExtensions = true;
|
|
||||||
QuitMenuItem = true;
|
|
||||||
FXEnableExtensionChangeWarning = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
NSGlobalDomain = {
|
|
||||||
AppleKeyboardUIMode = 3;
|
|
||||||
ApplePressAndHoldEnabled = false;
|
|
||||||
AppleFontSmoothing = 1;
|
|
||||||
_HIHideMenuBar = true;
|
|
||||||
InitialKeyRepeat = 15;
|
|
||||||
KeyRepeat = 1;
|
|
||||||
"com.apple.mouse.tapBehavior" = 1;
|
|
||||||
"com.apple.swipescrolldirection" = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
homebrew = {
|
|
||||||
enable = true;
|
|
||||||
onActivation = {
|
|
||||||
# autoUpdate = true;
|
|
||||||
upgrade = true;
|
|
||||||
cleanup = "uninstall";
|
|
||||||
};
|
|
||||||
casks = [
|
|
||||||
"amethyst"
|
|
||||||
"arc"
|
|
||||||
"chatgpt"
|
|
||||||
"dropbox"
|
|
||||||
"google-chrome"
|
|
||||||
"iina"
|
|
||||||
"karabiner-elements"
|
|
||||||
"obs"
|
|
||||||
"ollama"
|
|
||||||
"processing"
|
|
||||||
"raycast"
|
|
||||||
"remarkable"
|
|
||||||
"signal"
|
|
||||||
"skim"
|
|
||||||
"supercollider"
|
|
||||||
"utm"
|
|
||||||
"zoom"
|
|
||||||
"zen-browser"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
45
system/darwin/default.nix
Normal file
45
system/darwin/default.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
fonts.packages = import ../../home/fonts { inherit pkgs; };
|
||||||
|
|
||||||
|
nix.linux-builder.enable = true;
|
||||||
|
|
||||||
|
programs.fish.enable = true;
|
||||||
|
environment.shells = [ pkgs.fish ];
|
||||||
|
|
||||||
|
system = {
|
||||||
|
stateVersion = 4;
|
||||||
|
|
||||||
|
keyboard = {
|
||||||
|
enableKeyMapping = true;
|
||||||
|
remapCapsLockToControl = true;
|
||||||
|
};
|
||||||
|
defaults = {
|
||||||
|
screencapture = {
|
||||||
|
location = "/tmp";
|
||||||
|
};
|
||||||
|
dock = {
|
||||||
|
autohide = true;
|
||||||
|
showhidden = true;
|
||||||
|
mru-spaces = false;
|
||||||
|
};
|
||||||
|
finder = {
|
||||||
|
AppleShowAllExtensions = true;
|
||||||
|
QuitMenuItem = true;
|
||||||
|
FXEnableExtensionChangeWarning = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
NSGlobalDomain = {
|
||||||
|
AppleKeyboardUIMode = 3;
|
||||||
|
ApplePressAndHoldEnabled = false;
|
||||||
|
AppleFontSmoothing = 1;
|
||||||
|
_HIHideMenuBar = true;
|
||||||
|
InitialKeyRepeat = 15;
|
||||||
|
KeyRepeat = 1;
|
||||||
|
"com.apple.mouse.tapBehavior" = 1;
|
||||||
|
"com.apple.swipescrolldirection" = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -3,9 +3,6 @@
|
|||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nix;
|
package = pkgs.nix;
|
||||||
|
|
||||||
|
|
||||||
linux-builder.enable = true;
|
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = [
|
experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
Loading…
Reference in New Issue
Block a user