mirror of
https://github.com/larstvei/nix-config.git
synced 2025-08-30 12:50:12 +00:00
Compare commits
No commits in common. "0a348dcc7bb8d8f5389baa862f0aa6a9f988540d" and "9de0d57860444572b76151cd34655c0ffaff5565" have entirely different histories.
0a348dcc7b
...
9de0d57860
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "emacs"]
|
||||
path = emacs
|
||||
url = git@github.com:larstvei/dot-emacs.git
|
60
flake.lock
60
flake.lock
@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751313918,
|
||||
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
|
||||
"lastModified": 1744478979,
|
||||
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
|
||||
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -23,11 +23,11 @@
|
||||
"emacs-config": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1753376285,
|
||||
"narHash": "sha256-4Eop4e0WGXSfTUJNVvRX3LWmKYfqRHwyP7CQ29Ul1ec=",
|
||||
"lastModified": 1745013913,
|
||||
"narHash": "sha256-vOppZSLE0LuVO3GaF0sARwEfdTMtUswbn96B7CNjfQ8=",
|
||||
"owner": "larstvei",
|
||||
"repo": "dot-emacs",
|
||||
"rev": "ccb295f284d8e47d7904cb966734ce52dc32eb72",
|
||||
"rev": "72fbff0076f8ef417993510f0047dcc5a3fe1c18",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -45,11 +45,11 @@
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754925269,
|
||||
"narHash": "sha256-jQ9T5PFxb+5CcFoe3tCVZATv+kSHgn3uxg1CaFp99VU=",
|
||||
"lastModified": 1745014073,
|
||||
"narHash": "sha256-bUErPobuvffGHUqlQzCofTSqa5IVbrc5cj6MH5WrCPo=",
|
||||
"owner": "larstvei",
|
||||
"repo": "emacs-flake",
|
||||
"rev": "89b8619b12bbd876b1958403c8afb22cfec6474e",
|
||||
"rev": "c02fca42d35fb4755a33af6879a8cee8b1668172",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -64,11 +64,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754790584,
|
||||
"narHash": "sha256-vZgfYDPUNA+x/lDx0ncHwGKuPkbQOLxdmv4LGFOjZoE=",
|
||||
"lastModified": 1744993365,
|
||||
"narHash": "sha256-YAcjnoRJo7m9Sq9uNorkNM33f1oZIigVuNPvUy6y3po=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "c684c5f057409a42d83c45ce161781e91e5520a7",
|
||||
"rev": "90642af1fb7ab5e4c6deb221305acf6fc4472582",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -80,11 +80,11 @@
|
||||
"emacs-plus": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1754320041,
|
||||
"narHash": "sha256-BT0XP4/PUq1n7eboeoMD0POq+wps1dUkKpiBFvjwBjI=",
|
||||
"lastModified": 1743441558,
|
||||
"narHash": "sha256-Eepinxv05Yl79AoPVJveGDZPKHhlAes7XtUvrssflrU=",
|
||||
"owner": "d12frosted",
|
||||
"repo": "homebrew-emacs-plus",
|
||||
"rev": "cd8d57de9ac25d9822567ea4d51d5c67d791d7ab",
|
||||
"rev": "3e95d573d5f13aba7808193b66312b38a7c66851",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -118,11 +118,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754924470,
|
||||
"narHash": "sha256-asI/or9AcUMydwzodCgpHGytnMSNUlciw3uaycpXm4E=",
|
||||
"lastModified": 1745001336,
|
||||
"narHash": "sha256-R4HuzrgYtOYBNmB3lfRxcieHEBO4uSfgHNz4MzWkZ5M=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "67393957c27b4e4c6c48a60108a201413ced7800",
|
||||
"rev": "fc09cb7aaadb70d6c4898654ffc872f0d2415df9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -191,11 +191,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1754498491,
|
||||
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
|
||||
"lastModified": 1744932701,
|
||||
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
|
||||
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -207,11 +207,11 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1751274312,
|
||||
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
|
||||
"lastModified": 1744440957,
|
||||
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
|
||||
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -223,11 +223,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1754711617,
|
||||
"narHash": "sha256-WrZ280bT6NzNbBo+CKeJA/NW1rhvN/RUPZczqCpu2mI=",
|
||||
"lastModified": 1744536153,
|
||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "00b574b1ba8a352f0601c4dde4faff4b534ebb1e",
|
||||
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -239,11 +239,11 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1754800730,
|
||||
"narHash": "sha256-HfVZCXic9XLBgybP0318ym3cDnGwBs/+H5MgxFVYF4I=",
|
||||
"lastModified": 1744536153,
|
||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "641d909c4a7538f1539da9240dedb1755c907e40",
|
||||
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
43
flake.nix
43
flake.nix
@ -21,27 +21,34 @@
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ darwin, home-manager, nix-rosetta-builder, ... }@inputs:
|
||||
{
|
||||
darwin,
|
||||
home-manager,
|
||||
nix-rosetta-builder,
|
||||
emacs-larstvei,
|
||||
...
|
||||
}:
|
||||
{
|
||||
darwinConfigurations = {
|
||||
larstvei-macbookpro = darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
|
||||
specialArgs = { inherit emacs-larstvei; };
|
||||
modules = [
|
||||
./modules/core.nix
|
||||
./modules/macos.nix
|
||||
|
||||
modules = [
|
||||
home-manager.darwinModules.default
|
||||
./hosts/macbook/configuration.nix
|
||||
nix-rosetta-builder.darwinModules.default
|
||||
{ nix-rosetta-builder.onDemand = true; }
|
||||
];
|
||||
};
|
||||
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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,57 +0,0 @@
|
||||
{ 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"
|
||||
];
|
||||
};
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
username = "larstvei";
|
||||
userHome = "/Users/larstvei";
|
||||
hostName = "larstvei-macbookpro";
|
||||
}
|
@ -3,6 +3,9 @@
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
|
||||
|
||||
linux-builder.enable = true;
|
||||
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
@ -6,14 +6,14 @@
|
||||
}:
|
||||
let
|
||||
concatAttrVals = attrSet: lib.concatMap (x: x) (lib.attrValues attrSet);
|
||||
tools = import ./tools {
|
||||
tools = import ./tools.nix {
|
||||
inherit pkgs;
|
||||
inherit emacs-larstvei;
|
||||
};
|
||||
languages = import ./languages { inherit pkgs; };
|
||||
langauges = import ./languages.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
home.packages = concatAttrVals languages ++ concatAttrVals tools;
|
||||
home.packages = concatAttrVals langauges ++ concatAttrVals tools;
|
||||
|
||||
home.file.".config/enchant/hunspell/".source = "${pkgs.hunspellDicts.nb_NO}/share/hunspell/";
|
||||
|
@ -74,10 +74,6 @@ with pkgs;
|
||||
rust-analyzer
|
||||
];
|
||||
|
||||
scheme = [
|
||||
gambit
|
||||
];
|
||||
|
||||
tex = [
|
||||
texliveFull
|
||||
];
|
80
modules/macos.nix
Normal file
80
modules/macos.nix
Normal file
@ -0,0 +1,80 @@
|
||||
{ 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"
|
||||
];
|
||||
};
|
||||
}
|
@ -1,15 +1,4 @@
|
||||
{ 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;
|
||||
{
|
||||
|
||||
@ -43,7 +32,7 @@ with pkgs;
|
||||
multimedia = [
|
||||
dot2tex
|
||||
ffmpeg
|
||||
ghostscriptNoGsc
|
||||
ghostscript
|
||||
graphviz
|
||||
imagemagick
|
||||
inkscape
|
@ -1,45 +0,0 @@
|
||||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user