Formatting

This commit is contained in:
larstvei 2024-10-06 21:53:29 +02:00
parent f2ee1682c1
commit b6b5c8a1fc
6 changed files with 94 additions and 46 deletions

View File

@ -16,31 +16,48 @@
emacs-larstvei.url = "github:larstvei/emacs-flake"; emacs-larstvei.url = "github:larstvei/emacs-flake";
}; };
outputs = { self, nixpkgs, darwin, home-manager, emacs-larstvei, ... }@inputs: { outputs =
darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem { {
system = "aarch64-darwin"; self,
nixpkgs,
darwin,
home-manager,
emacs-larstvei,
...
}@inputs:
{
darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [ modules = [
./modules/core.nix ./modules/core.nix
./modules/macos.nix ./modules/macos.nix
home-manager.darwinModule home-manager.darwinModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users.larstvei = { users.larstvei = {
imports = [ imports = [
{ _module.args = inputs; } # <- one could ask, why? { _module.args = inputs; } # <- one could ask, why?
./modules/home.nix ./modules/home.nix
]; ];
};
}; };
}; }
} (
({ config, pkgs, lib, ... }: { {
services.nix-daemon.enable = true; config,
}) pkgs,
]; lib,
...
}:
{
services.nix-daemon.enable = true;
}
)
];
};
}; };
};
} }

View File

@ -5,10 +5,19 @@
settings = { settings = {
system = "aarch64-darwin"; system = "aarch64-darwin";
extra-platforms = [ "aarch64-darwin" "x86_64-darwin" ]; extra-platforms = [
experimental-features = [ "nix-command" "flakes" ]; "aarch64-darwin"
"x86_64-darwin"
];
experimental-features = [
"nix-command"
"flakes"
];
build-users-group = "nixbld"; build-users-group = "nixbld";
trusted-users = [ "root" "larstvei" ]; trusted-users = [
"root"
"larstvei"
];
substituters = [ substituters = [
"https://cache.nixos.org" "https://cache.nixos.org"
@ -24,9 +33,9 @@
}; };
}; };
environment.systemPackages = environment.systemPackages = [
[ pkgs.git pkgs.git
pkgs.htop pkgs.htop
pkgs.tree pkgs.tree
]; ];
} }

View File

@ -1,7 +1,15 @@
{ lib, pkgs, emacs-larstvei, ... }: {
lib,
pkgs,
emacs-larstvei,
...
}:
let let
concatAttrVals = attrSet: lib.concatMap (x: x) (lib.attrValues attrSet); concatAttrVals = attrSet: lib.concatMap (x: x) (lib.attrValues attrSet);
tools = import ./tools.nix { inherit pkgs; inherit emacs-larstvei; }; tools = import ./tools.nix {
inherit pkgs;
inherit emacs-larstvei;
};
langauges = import ./languages.nix { inherit pkgs; }; langauges = import ./languages.nix { inherit pkgs; };
in in
{ {
@ -54,7 +62,11 @@ in
enable = true; enable = true;
userName = "larstvei"; userName = "larstvei";
userEmail = "larstvei@ifi.uio.no"; userEmail = "larstvei@ifi.uio.no";
ignores = [ ".envrc" ".DS_Store" ".direnv" ]; ignores = [
".envrc"
".DS_Store"
".direnv"
];
}; };
direnv = { direnv = {

View File

@ -1,5 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
with pkgs; { with pkgs;
{
bqn = [ bqn = [
cbqn cbqn
]; ];
@ -18,10 +19,11 @@ with pkgs; {
]; ];
haskell = [ haskell = [
(haskell.packages.ghc96.ghcWithPackages (haskell.packages.ghc96.ghcWithPackages (
(ps: with ps; [ ps: with ps; [
QuickCheck QuickCheck
])) ]
))
stack stack
]; ];
@ -40,12 +42,12 @@ with pkgs; {
nix = [ nix = [
nil nil
nixfmt nixfmt-rfc-style
]; ];
python = [ python = [
(python3.withPackages (python3.withPackages (
(python-packages: with python-packages; [ python-packages: with python-packages; [
graphviz graphviz
html2text html2text
hypothesis hypothesis
@ -60,7 +62,8 @@ with pkgs; {
xlsxwriter xlsxwriter
yattag yattag
z3 z3
])) ]
))
]; ];
tex = [ tex = [

View File

@ -1,4 +1,5 @@
{ pkgs, lib, ... }: { { pkgs, lib, ... }:
{
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
fira fira
@ -30,7 +31,9 @@
remapCapsLockToControl = true; remapCapsLockToControl = true;
}; };
defaults = { defaults = {
screencapture = { location = "/tmp"; }; screencapture = {
location = "/tmp";
};
dock = { dock = {
autohide = true; autohide = true;
showhidden = true; showhidden = true;
@ -62,7 +65,10 @@
upgrade = true; upgrade = true;
cleanup = "uninstall"; cleanup = "uninstall";
}; };
taps = [ "homebrew/cask" "homebrew/cask-versions" ]; taps = [
"homebrew/cask"
"homebrew/cask-versions"
];
casks = [ casks = [
"amethyst" "amethyst"
"arc" "arc"

View File

@ -1,5 +1,6 @@
{ pkgs, emacs-larstvei, ... }: { pkgs, emacs-larstvei, ... }:
with pkgs; { with pkgs;
{
editor = [ editor = [
emacs-larstvei.defaultPackage.${pkgs.system} emacs-larstvei.defaultPackage.${pkgs.system}