Compare commits

...

20 Commits

Author SHA1 Message Date
0a348dcc7b Add some simple variables 2025-08-23 16:28:52 +02:00
67c3453177 Rename 2025-08-23 16:07:27 +02:00
c81438603c Move user specific stuff to host 2025-08-23 16:04:21 +02:00
205f731bd1 Move homebrew to host 2025-08-23 15:58:02 +02:00
edb3686d34 Move linux builder to darwin only 2025-08-23 15:57:32 +02:00
793c310cf2 Add environment shells 2025-08-23 15:45:14 +02:00
a45875053f Move hostname 2025-08-23 15:45:04 +02:00
329882275b Rename macos and core modules to system and system/darwin 2025-08-23 15:28:17 +02:00
85429dcf7e This should have been deleted ages ago? 2025-08-23 15:20:02 +02:00
e719a6320d Can remove hacky way of enabling fish 2025-08-23 15:18:08 +02:00
2b5b572a39 Move fonts to home 2025-08-23 15:07:14 +02:00
9b4918f8e1 Populate home with tools and languages 2025-08-23 15:01:36 +02:00
d346072104 Move home 2025-08-23 14:57:31 +02:00
d7d6b952d6 Restructure to using hosts 2025-08-23 14:31:51 +02:00
4da1182c6f Pass input more sensibly 2025-08-23 13:16:06 +02:00
16115be5c9 Install Racket as a cask 2025-08-23 13:03:09 +02:00
53fa87d037 Typo 2025-08-23 13:03:05 +02:00
5657930899 Installer gambit 2025-08-11 17:59:19 +02:00
0b0924e7fd Update and install darktable 2025-07-24 19:11:14 +02:00
09fbe602fa Update 2025-07-24 17:30:13 +02:00
12 changed files with 174 additions and 145 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "emacs"]
path = emacs
url = git@github.com:larstvei/dot-emacs.git

View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1744478979,
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
"lastModified": 1751313918,
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
"type": "github"
},
"original": {
@ -23,11 +23,11 @@
"emacs-config": {
"flake": false,
"locked": {
"lastModified": 1745013913,
"narHash": "sha256-vOppZSLE0LuVO3GaF0sARwEfdTMtUswbn96B7CNjfQ8=",
"lastModified": 1753376285,
"narHash": "sha256-4Eop4e0WGXSfTUJNVvRX3LWmKYfqRHwyP7CQ29Ul1ec=",
"owner": "larstvei",
"repo": "dot-emacs",
"rev": "72fbff0076f8ef417993510f0047dcc5a3fe1c18",
"rev": "ccb295f284d8e47d7904cb966734ce52dc32eb72",
"type": "github"
},
"original": {
@ -45,11 +45,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1745014073,
"narHash": "sha256-bUErPobuvffGHUqlQzCofTSqa5IVbrc5cj6MH5WrCPo=",
"lastModified": 1754925269,
"narHash": "sha256-jQ9T5PFxb+5CcFoe3tCVZATv+kSHgn3uxg1CaFp99VU=",
"owner": "larstvei",
"repo": "emacs-flake",
"rev": "c02fca42d35fb4755a33af6879a8cee8b1668172",
"rev": "89b8619b12bbd876b1958403c8afb22cfec6474e",
"type": "github"
},
"original": {
@ -64,11 +64,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1744993365,
"narHash": "sha256-YAcjnoRJo7m9Sq9uNorkNM33f1oZIigVuNPvUy6y3po=",
"lastModified": 1754790584,
"narHash": "sha256-vZgfYDPUNA+x/lDx0ncHwGKuPkbQOLxdmv4LGFOjZoE=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "90642af1fb7ab5e4c6deb221305acf6fc4472582",
"rev": "c684c5f057409a42d83c45ce161781e91e5520a7",
"type": "github"
},
"original": {
@ -80,11 +80,11 @@
"emacs-plus": {
"flake": false,
"locked": {
"lastModified": 1743441558,
"narHash": "sha256-Eepinxv05Yl79AoPVJveGDZPKHhlAes7XtUvrssflrU=",
"lastModified": 1754320041,
"narHash": "sha256-BT0XP4/PUq1n7eboeoMD0POq+wps1dUkKpiBFvjwBjI=",
"owner": "d12frosted",
"repo": "homebrew-emacs-plus",
"rev": "3e95d573d5f13aba7808193b66312b38a7c66851",
"rev": "cd8d57de9ac25d9822567ea4d51d5c67d791d7ab",
"type": "github"
},
"original": {
@ -118,11 +118,11 @@
]
},
"locked": {
"lastModified": 1745001336,
"narHash": "sha256-R4HuzrgYtOYBNmB3lfRxcieHEBO4uSfgHNz4MzWkZ5M=",
"lastModified": 1754924470,
"narHash": "sha256-asI/or9AcUMydwzodCgpHGytnMSNUlciw3uaycpXm4E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fc09cb7aaadb70d6c4898654ffc872f0d2415df9",
"rev": "67393957c27b4e4c6c48a60108a201413ced7800",
"type": "github"
},
"original": {
@ -191,11 +191,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1744932701,
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
"lastModified": 1754498491,
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
"type": "github"
},
"original": {
@ -207,11 +207,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1744440957,
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
"lastModified": 1751274312,
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
"type": "github"
},
"original": {
@ -223,11 +223,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"lastModified": 1754711617,
"narHash": "sha256-WrZ280bT6NzNbBo+CKeJA/NW1rhvN/RUPZczqCpu2mI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"rev": "00b574b1ba8a352f0601c4dde4faff4b534ebb1e",
"type": "github"
},
"original": {
@ -239,11 +239,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"lastModified": 1754800730,
"narHash": "sha256-HfVZCXic9XLBgybP0318ym3cDnGwBs/+H5MgxFVYF4I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"rev": "641d909c4a7538f1539da9240dedb1755c907e40",
"type": "github"
},
"original": {

View File

@ -21,34 +21,27 @@
};
outputs =
{ darwin, home-manager, nix-rosetta-builder, ... }@inputs:
{
darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
darwin,
home-manager,
nix-rosetta-builder,
emacs-larstvei,
...
}:
{
darwinConfigurations = {
larstvei-macbookpro = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
./modules/core.nix
./modules/macos.nix
specialArgs = { inherit emacs-larstvei; };
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
];
};
};
}
];
modules = [
home-manager.darwinModules.default
./hosts/macbook/configuration.nix
nix-rosetta-builder.darwinModules.default
{ nix-rosetta-builder.onDemand = true; }
];
};
};
};
}

View File

@ -6,14 +6,14 @@
}:
let
concatAttrVals = attrSet: lib.concatMap (x: x) (lib.attrValues attrSet);
tools = import ./tools.nix {
tools = import ./tools {
inherit pkgs;
inherit emacs-larstvei;
};
langauges = import ./languages.nix { inherit pkgs; };
languages = import ./languages { inherit pkgs; };
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/";

View File

@ -74,6 +74,10 @@ with pkgs;
rust-analyzer
];
scheme = [
gambit
];
tex = [
texliveFull
];

View File

@ -1,4 +1,15 @@
{ 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;
{
@ -32,7 +43,7 @@ with pkgs;
multimedia = [
dot2tex
ffmpeg
ghostscript
ghostscriptNoGsc
graphviz
imagemagick
inkscape

View 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"
];
};
}

View File

@ -0,0 +1,5 @@
{
username = "larstvei";
userHome = "/Users/larstvei";
hostName = "larstvei-macbookpro";
}

View File

@ -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
View 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;
};
};
};
}

View File

@ -3,9 +3,6 @@
nix = {
package = pkgs.nix;
linux-builder.enable = true;
settings = {
experimental-features = [
"nix-command"