Start cleaning up

This commit is contained in:
larstvei 2024-10-06 01:03:31 +02:00
parent a97c687d62
commit 87849b99cd
5 changed files with 30 additions and 40 deletions

View File

@ -1,5 +1,5 @@
{
description = "Lars' MacBook Pro";
description = "My nix configuration.";
inputs = {
nixpkgs = {
@ -21,7 +21,9 @@
system = "aarch64-darwin";
modules = [
./modules/core.nix
./modules/mac.nix
home-manager.darwinModule
{
home-manager = {

26
modules/core.nix Normal file
View File

@ -0,0 +1,26 @@
{ pkgs, ... }:
{
nix = {
package = pkgs.nix;
settings = {
system = "aarch64-darwin";
extra-platforms = [ "aarch64-darwin" "x86_64-darwin" ];
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="
];
};
};
}

View File

@ -65,30 +65,6 @@
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;

View File

@ -1,17 +1,5 @@
{ pkgs, lib, ... }: {
nix = {
package = pkgs.nix;
settings = {
system = "aarch64-darwin";
extra-platforms = [ "aarch64-darwin" "x86_64-darwin" ];
experimental-features = [ "nix-command" "flakes" ];
build-users-group = "nixbld";
trusted-users = [ "root" "larstvei" ];
};
};
fonts.packages = with pkgs; [
fira
fira-code
@ -26,6 +14,7 @@
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

View File

@ -1,3 +0,0 @@
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=