Compare commits
10 Commits
1adacf5e1e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
db850552e3
|
|||
|
63afac3d04
|
|||
|
645fc64ead
|
|||
|
6561d4c979
|
|||
|
f1ed339968
|
|||
|
50d14ecf83
|
|||
|
1cdc3f25e0
|
|||
|
9e62f755bb
|
|||
|
d0e6fe072a
|
|||
|
86ea11c8e8
|
BIN
Darwin.png
Normal file
BIN
Darwin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 MiB |
@ -3,6 +3,7 @@
|
||||
Modular NixOS configuration, using [Niri](https://github.com/niri-wm/niri) and [Waybar](https://github.com/Alexays/Waybar) for a light desktop.
|
||||
|
||||

|
||||

|
||||
|
||||
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
|
||||
Alternatively, use `nh os switch` or `nh os boot`.
|
||||
|
||||
12
flake.nix
12
flake.nix
@ -152,7 +152,17 @@
|
||||
config.allowUnfree = true;
|
||||
config.allowUnfreePredicate = pkg: true;
|
||||
|
||||
overlays = [];
|
||||
overlays = let
|
||||
pkgs-stable = import inputs.nixpkgs-stable {
|
||||
system = darwinSystem;
|
||||
|
||||
config.allowUnfree = true;
|
||||
config.allowUnfreePredicate = pkg: true;
|
||||
};
|
||||
in [
|
||||
# All my own overlays (derivations + modifications)
|
||||
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
|
||||
];
|
||||
};
|
||||
|
||||
# My own library functions are imported here.
|
||||
|
||||
@ -55,6 +55,13 @@
|
||||
homeDirectory = "/Users/${config.home.username}";
|
||||
enableNixpkgsReleaseCheck = true;
|
||||
|
||||
sessionVariables = {
|
||||
LANG = "en_US.UTF-8";
|
||||
EDITOR = "nvim";
|
||||
MANPAGER = "nvim +Man!";
|
||||
TERMINAL = "kitty";
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
(ripgrep.override {withPCRE2 = true;})
|
||||
gdu
|
||||
@ -87,7 +94,6 @@
|
||||
|
||||
dig
|
||||
tcpdump
|
||||
traceroute
|
||||
gping
|
||||
curlie
|
||||
wget
|
||||
@ -132,40 +138,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
cava = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
framerate = 60; # default 60
|
||||
autosens = 1; # default 1
|
||||
sensitivity = 100; # default 100
|
||||
lower_cutoff_freq = 50; # not passed to cava if not provided
|
||||
higher_cutoff_freq = 10000; # not passed to cava if not provided
|
||||
};
|
||||
|
||||
smoothing = {
|
||||
noise_reduction = 77; # default 77
|
||||
monstercat = false; # default false
|
||||
waves = false; # default false
|
||||
};
|
||||
|
||||
color = {
|
||||
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
|
||||
gradient = 1;
|
||||
|
||||
gradient_color_1 = "'${color.hexS.teal}'";
|
||||
gradient_color_2 = "'${color.hexS.sky}'";
|
||||
gradient_color_3 = "'${color.hexS.sapphire}'";
|
||||
gradient_color_4 = "'${color.hexS.blue}'";
|
||||
gradient_color_5 = "'${color.hexS.mauve}'";
|
||||
gradient_color_6 = "'${color.hexS.pink}'";
|
||||
gradient_color_7 = "'${color.hexS.maroon}'";
|
||||
gradient_color_8 = "'${color.hexS.red}'";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
@ -332,13 +304,6 @@
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
};
|
||||
|
||||
keychain = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
enableXsessionIntegration = false;
|
||||
keys = ["id_ed25519"];
|
||||
};
|
||||
|
||||
navi = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
@ -351,7 +316,7 @@
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
addKeysToAgent = "yes";
|
||||
compression = true;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
|
||||
@ -45,6 +45,18 @@ in {
|
||||
programs.fish = lib.mkMerge [
|
||||
# Darwin exclusive config
|
||||
(lib.mkIf pkgs.stdenv.isDarwin {
|
||||
shellInit = ''
|
||||
set fish_greeting
|
||||
yes | fish_config theme save "system-theme"
|
||||
|
||||
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
|
||||
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
|
||||
set --global --export HOMEBREW_REPOSITORY "/opt/homebrew"
|
||||
fish_add_path --global --move --path "/opt/homebrew/bin" "/opt/homebrew/sbin"
|
||||
if test -n "$MANPATH[1]"; set --global --export MANPATH ''' $MANPATH; end;
|
||||
if not contains "/opt/homebrew/share/info" $INFOPATH; set --global --export INFOPATH "/opt/homebrew/share/info" $INFOPATH; end;
|
||||
'';
|
||||
|
||||
shellAbbrs = let
|
||||
# These can be used for my config.homemodules and for HM config.programs,
|
||||
# as both of these add the package to home.packages
|
||||
@ -55,7 +67,9 @@ in {
|
||||
in
|
||||
lib.mkMerge [
|
||||
{
|
||||
rebuild = "sudo darwin-rebuild switch --flake .#darwinix";
|
||||
}
|
||||
|
||||
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'darwin,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
||||
];
|
||||
})
|
||||
@ -64,6 +78,11 @@ in {
|
||||
(lib.mkIf pkgs.stdenv.isLinux {
|
||||
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
||||
|
||||
shellInit = ''
|
||||
set fish_greeting
|
||||
yes | fish_config theme save "system-theme"
|
||||
'';
|
||||
|
||||
functions = lib.mergeAttrsList [
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {
|
||||
nnncd = {
|
||||
@ -226,11 +245,6 @@ in {
|
||||
];
|
||||
|
||||
plugins = [];
|
||||
|
||||
shellInit = ''
|
||||
set fish_greeting
|
||||
yes | fish_config theme save "system-theme"
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@ -126,7 +126,7 @@ in {
|
||||
maplocalleader = ",";
|
||||
};
|
||||
|
||||
opts = import ./vim_opts.nix {inherit lib mylib;};
|
||||
opts = import ./vim_opts.nix {inherit config lib mylib;};
|
||||
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
|
||||
extraConfigLua = builtins.readFile ./extraConfigLua.lua;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
_: {
|
||||
{config, ...}: {
|
||||
showmode = false; # Status line already shows this
|
||||
backspace = ["indent" "eol" "start"];
|
||||
termguicolors = true; # Required by multiple plugins
|
||||
@ -37,7 +37,7 @@ _: {
|
||||
# swapfile = true;
|
||||
# backup = false;
|
||||
undofile = true;
|
||||
undodir = "/home/christoph/.vim/undo";
|
||||
undodir = "${config.home.homeDirectory}/.vim/undo";
|
||||
undolevels = 10000;
|
||||
# autochdir = true;
|
||||
confirm = true;
|
||||
|
||||
@ -7,9 +7,12 @@
|
||||
config,
|
||||
inputs,
|
||||
publicKeys,
|
||||
hostname,
|
||||
...
|
||||
}: {
|
||||
nix = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.nixVersions.stable;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes pipe-operators
|
||||
@ -30,6 +33,67 @@
|
||||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "${hostname}";
|
||||
localHostName = "${hostname}";
|
||||
computerName = "${hostname}";
|
||||
|
||||
applicationFirewall = {
|
||||
enable = true;
|
||||
enableStealthMode = false;
|
||||
allowSigned = true;
|
||||
allowSignedApp = true;
|
||||
blockAllIncoming = false;
|
||||
};
|
||||
|
||||
knownNetworkServices = [
|
||||
"Wi-Fi"
|
||||
"Thunderbold Bridge"
|
||||
];
|
||||
|
||||
dns = [
|
||||
"192.168.86.26"
|
||||
"8.8.8.8"
|
||||
"8.8.4.4"
|
||||
];
|
||||
|
||||
# wg-quick = {};
|
||||
};
|
||||
|
||||
power = {
|
||||
# restartAfterFreeze = false;
|
||||
# restartAfterPowerFailure = false;
|
||||
|
||||
sleep = {
|
||||
computer = 10; # 10 minutes until sleep
|
||||
display = 5;
|
||||
harddisk = 5;
|
||||
};
|
||||
};
|
||||
|
||||
system = {
|
||||
primaryUser = "${username}";
|
||||
|
||||
# TODO:
|
||||
defaults = {
|
||||
# dock = {};
|
||||
|
||||
trackpad = {
|
||||
ActuateDetents = true; # Haptic feedback
|
||||
ActuationStrength = 1;
|
||||
Clicking = true; # Tap to click
|
||||
Dragging = true; # Double tap to drag
|
||||
TrackpadRightClick = true;
|
||||
};
|
||||
};
|
||||
|
||||
keyboard = {
|
||||
enableKeyMapping = true;
|
||||
swapLeftCtrlAndFn = true;
|
||||
swapLeftCommandAndLeftAlt = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.${username} = {
|
||||
isHidden = false;
|
||||
description = "Christoph";
|
||||
@ -46,16 +110,34 @@
|
||||
# packages = with pkgs; [];
|
||||
};
|
||||
|
||||
environment.shells = with pkgs; [pkgs.fish];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
alejandra
|
||||
neovim
|
||||
wget
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
monolisa
|
||||
];
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
# aerospace = {};
|
||||
};
|
||||
|
||||
# NOTE: Not installed automatically
|
||||
homebrew = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
# brews = [];
|
||||
};
|
||||
|
||||
# Set Git commit hash for darwin-version.
|
||||
# system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user