Compare commits

..

1 commit

Author SHA1 Message Date
Benson Chu
eda4eb0920 FileTote? 2024-08-04 15:39:13 -05:00
32 changed files with 261 additions and 761 deletions

1
.gitattributes vendored
View file

@ -1 +0,0 @@
*.ttf filter=lfs diff=lfs merge=lfs -text

12
.gitmodules vendored
View file

@ -1,12 +0,0 @@
[submodule "submodules/beets-config"]
path = submodules/beets-config
url = ssh://git@gitea.pestctrl.io:2223/pestctrl/beets-config.git
[submodule "submodules/tmux-config"]
path = submodules/tmux-config
url = git@github.com:pestctrl/tmux-config
[submodule "submodules/wezterm-config"]
path = submodules/wezterm-config
url = git@github.com:pestctrl/wezterm-config
[submodule "submodules/work-bash-config"]
path = submodules/work-bash-config
url = git@github.com:pestctrl/work-bash-config

View file

@ -15,20 +15,20 @@
samba
cifs-utils
nfs-utils
sshfs
myEmacs
# unstable.emacs
#
# Probably this is being overwritten by home-manager.
#
# TODO: Resolve the disparity.
((emacsPackagesFor emacs-unstable).emacsWithPackages
(epkgs: with epkgs; [ treesit-grammars.with-all-grammars ]))
notmuch mu isync
keychain ledger gnupg
ledger2beancount beancount fava
hledger
ledger-autosync
ledger2beancount beancount
mailutils
pandoc texlive.combined.scheme-full
texlivePackages.noto
w3m lynx
fzf
# sendmail
cmake
@ -58,8 +58,6 @@
mtr
# tftp
zip
(python311.withPackages (pythonPackages: with pythonPackages; [
pymupdf
pip
@ -71,19 +69,6 @@
beets
clint
# chromaprint
lxml
# RedditArchiver dependencies
pyyaml
anytree
colored
markdown2
praw
colored
prawcore
ofxclient
]))
chromaprint

View file

@ -2,14 +2,13 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ inputs, config, pkgs, lib, ... }:
{ inputs, config, pkgs, ... }:
let
system = "x86_64-linux";
in
{
imports = [
../modules/default.nix
./flake-location.nix
];
nixpkgs.overlays = [
@ -30,12 +29,9 @@ in
];
nix = {
settings.experimental-features = "nix-command flakes";
nixPath = [
"/home/benson/.nix-defexpr/channels"
nixPath = [ # "/home/benson/.nix-defexpr/channels"
"nixpkgs=${inputs.nixpkgs}"
config.my.nixosConfigLocation
"nixos-config=${inputs.self}/hosts/${config.networking.hostName}/configuration.nix"
"/nix/var/nix/profiles/per-user/root/channels"];
# MY GOD, this is what is used for nix develop, nix run, etc.
@ -50,6 +46,8 @@ in
};
};
nix.settings.experimental-features = "nix-command flakes";
# Enable networking
networking.networkmanager.enable = true;
@ -71,18 +69,6 @@ in
LC_TIME = "en_US.UTF-8";
};
system.autoUpgrade = {
enable = true;
flake = "/home/benson/nixos-config";
flags = [
"--update-input"
"unstable"
"-L" # print build logs
];
dates = "12:00";
randomizedDelaySec = "45min";
};
environment.systemPackages = import ./base-packages.nix { inherit pkgs; };
services.tailscale.enable = true;
@ -101,4 +87,13 @@ in
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -9,11 +9,6 @@
environment.systemPackages = with pkgs; [
sbcl
zstd.dev
zstd.out
devenv
racket
ninja
@ -21,13 +16,11 @@
lldb
mold
lld
clang-tools # clangd, clang-format
llvmPackages.libllvm
clang-tools_16 # clangd, clang-format
llvmPackages_16.libllvm
bear
rr
valgrind
xdot
graphviz
# RE Tools
radare2
@ -35,26 +28,12 @@
rizin
cutter
nodejs_22
wireshark
nodejs_21
minikube
kubectl
unstable.talosctl
talosctl
k9s
(wrapHelm kubernetes-helm {
plugins = with pkgs.kubernetes-helmPlugins; [
# helm-secrets
helm-diff
helm-s3
helm-git
];
})
sops
postgresql_16
basez
zeal
# mps.overrideAttrs (old: {
# pname = "mps";
@ -69,8 +48,5 @@
# })
];
boot.kernel.sysctl = {
# "kernel.yama.ptrace_scope" = 0;
"kernel.perf_event_paranoid" = 1;
};
boot.kernel.sysctl."kernel.perf_event_paranoid" = 1;
}

View file

@ -1,4 +1,5 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
picom
@ -7,31 +8,24 @@
];
services.xserver = {
displayManager = {
defaultSession = "none+my-exwm";
};
windowManager.session = [{
name = "my-exwm";
start = ''
${pkgs.myEmacs}/bin/emacs -l /home/benson/.emacs.d/init.el
${pkgs.emacs-unstable}/bin/emacs -l /home/benson/.emacs.d/init.el
'';
}];
# gpg-agent = {
# enable = true;
# pinentryFlavor = "gtk2";
# };
};
services.displayManager = {
defaultSession = "none+my-exwm";
};
programs = {
nm-applet.enable = true;
gnupg.agent = {
enable = true;
pinentryFlavor = "gtk2";
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-gtk2;
};
};

View file

@ -1,24 +0,0 @@
{ inputs, config, lib, pkgs, ... }:
{
options = {
my.flakeLocation = lib.mkOption {
default = null;
description = "Location of nixos flake for config";
type = lib.types.nullOr lib.types.path;
};
my.nixosConfigLocation = lib.mkOption {
# default = "/etc/nixos/";
internal = true;
description = "Location of nixos configuration";
type = lib.types.path;
};
};
config = {
my.nixosConfigLocation =
if (config.my.flakeLocation != null)
then "${config.my.flakeLocation}/hosts/${config.networking.hostName}/configuration.nix"
else lib.warn "Didn't set 'my.flakeLocation', NIX_PATH functionality will degrade a little"
"${inputs.self}/hosts/${config.networking.hostName}/configuration.nix";
};
}

View file

@ -5,29 +5,19 @@
./user-facing.nix
];
services.logind = {
extraConfig = "HandlePowerKey=suspend";
lidSwitch = "suspend";
};
hardware.bluetooth.enable = true; # enables support for Bluetooth
networking.wireless.enable = true;
services = {
logind = {
extraConfig = "HandlePowerKey=suspend";
lidSwitch = "suspend";
};
# Configure keymap in X11
xserver = {
layout = lib.mkForce "neo_dvorak,us";
xkbOptions = "grp:ctrls_toggle";
xkb = {
extraLayouts = {
neo_dvorak = {
description = "Dvorak with Neo2 Extensions";
symbolsFile = ../res/xkb/symbols/neo_dvorak;
languages = [ "eng" ];
};
};
};
};
# Configure keymap in X11
services.xserver = {
layout = lib.mkForce "us,us";
xkbVariant = lib.mkForce "dvorak,";
xkbOptions = "grp:win_space_toggle";
};
# Configure console keymap
@ -35,7 +25,5 @@
environment.systemPackages = with pkgs; [
brightnessctl
remmina
acpi
];
}

View file

@ -16,7 +16,7 @@
# Enable auto-discovery of printers
avahi = {
enable = true;
nssmdns4 = true;
nssmdns = true;
openFirewall = true;
};
};

View file

@ -6,18 +6,9 @@ inputs:
# Need to do this to patch dwarf information. For some reason,
# stdenv copies the source into /build/source, and then builds
# from there, leaving all the dwarf information hanging.
env.NIX_CFLAGS_COMPILE = "-fdebug-prefix-map=/build/source=${old.src}";
env.NIX_CFLAGS_COMPILE =
old.env.NIX_CFLAGS_COMPILE + " " + "-fdebug-prefix-map=/build/source=${old.src}";
dontStrip = true;
});
})
(final: prev: {
# final.emacs-git, final.emacs-unstable, or final.emacs-igc
myEmacs =
((prev.emacsPackagesFor final.emacs-unstable)
.emacsWithPackages (epkgs: with epkgs; [
treesit-grammars.with-all-grammars
mu4e
]));
})
]

View file

@ -5,10 +5,12 @@
./exwm.nix
];
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services = {
# Enable sound with pipewire.
pipewire = {
enable = true;
alsa.enable = true;
@ -20,32 +22,25 @@
# no need to redefine it in your config for now)
# media-session.enable = true;
};
};
pulseaudio.enable = false;
services.xserver = {
# Enable the X11 windowing system.
enable = true;
# Enable the KDE Plasma Desktop Environment.
desktopManager.plasma6.enable = true;
xserver = {
# Enable the X11 windowing system.
enable = true;
# Enable sddm and startx
displayManager = {
startx.enable = true;
};
# Configure keymap in X11
xkb = {
layout = "us";
variant = "";
};
};
desktopManager.plasma5.enable = true;
# Enable sddm
displayManager = {
sddm.enable = true;
startx.enable = true;
};
# Configure keymap in X11
layout = "us";
xkbVariant = "";
libinput = {
enable = true;
touchpad = {
@ -57,17 +52,13 @@
fonts = {
packages = with pkgs; [
roboto-mono
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
commit-mono
];
};
environment.systemPackages = with pkgs; [
update.firefox
update.google-chrome
bitwarden-desktop
bitwarden
vlc
mpv
obs-studio
@ -76,14 +67,12 @@
libreoffice
imagemagick
gimp
inkscape
qdirstat
unstable.signal-desktop
update.signal-desktop
parsec-bin
unstable.discord
unstable.telegram-desktop
update.discord
update.telegram-desktop
dunst
shutter
# update.rustdesk
@ -91,50 +80,26 @@
docker
pcmanfm
kdePackages.dolphin
kdePackages.dolphin-plugins
kdePackages.ffmpegthumbs
kdePackages.kdegraphics-thumbnailers
p7zip
unzip
qemu
libsForQt5.dolphin
libsForQt5.dolphin-plugins
libsForQt5.ffmpegthumbs
libsForQt5.kdegraphics-thumbnailers
pavucontrol
update.yt-dlp
ffmpeg
yt-dlp
dconf
xfce.xfce4-terminal
# TODO: Re-enable extrafiles
(unstable.beets# .override {
# pluginOverrides = {
# extrafiles = {
# enable = true;
# propagatedBuildInputs = [ beetsPackages.extrafiles ];
# };
# };
# }
(beets.override {
pluginOverrides = {
filetote = {
enable = true;
propagatedBuildInputs = [ (callPackage ../packages/beets-filetote.nix { beets = beetsPackages.beets-minimal; }) ];
};
};
}
)
(gnuplot.override { withQt = true; })
appflowy
tageditor
easytag
seafile-client
wezterm
xorg.xkbcomp
insomnia
mujmap
];
}

View file

@ -2,17 +2,20 @@
"nodes": {
"emacs-overlay": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1765729484,
"narHash": "sha256-exsMvinnpTWm+lZiq8RucYejmS605EP8uny/32KzlE8=",
"lastModified": 1721552966,
"narHash": "sha256-zvzQgQEMxTaRpvtHlsNMjgdOiOvexfCE2hRaadSS6OY=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "60f44dfc7fedf818666436d3b341858a400e31e0",
"rev": "ab15d82f94c8f6373fec1f363c5b6c631453950b",
"type": "github"
},
"original": {
@ -22,22 +25,6 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -63,27 +50,27 @@
]
},
"locked": {
"lastModified": 1765605144,
"narHash": "sha256-RM2xs+1HdHxesjOelxoA3eSvXShC8pmBvtyTke4Ango=",
"lastModified": 1719827415,
"narHash": "sha256-pvh+1hStXXAZf0sZ1xIJbWGx4u+OGBC1rVx6Wsw0fBw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "90b62096f099b73043a747348c11dbfcfbdea949",
"rev": "f2e3c19867262dbe84fdfab42467fc8dd83a2005",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1722332872,
"narHash": "sha256-2xLM4sc5QBfi0U/AANJAW21Bj4ZX479MHPMPkB+eKBU=",
"lastModified": 1711352745,
"narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "14c333162ba53c02853add87a0000cbd7aa230c2",
"rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0",
"type": "github"
},
"original": {
@ -93,56 +80,34 @@
"type": "github"
}
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1752199438,
"narHash": "sha256-xSBMmGtq8K4Qv80TMqREmESCAsRLJRHAbFH2T/2Bf1Y=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "d34d9412556d3a896e294534ccd25f53b6822e80",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "main",
"repo": "NixOS-WSL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1765608474,
"narHash": "sha256-9Wx53UK0z8Di5iesJID0tS1dRKwGxI4i7tsSanOHhF0=",
"lastModified": 1716061101,
"narHash": "sha256-H0eCta7ahEgloGIwE/ihkyGstOGu+kQwAiHvwVoXaA0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "28bb483c11a1214a73f9fd2d9928a6e2ea86ec71",
"rev": "e7cc61784ddf51c81487637b3031a6dd2d6673a2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1765363881,
"narHash": "sha256-3C3xWn8/2Zzr7sxVBmpc1H1QfxjNfta5IMFe3O9ZEPw=",
"lastModified": 1721409541,
"narHash": "sha256-b6PLr0Ty7JPDBtJtjnYzlBf02bbH9alWMAgispMkTwk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d2b1213bf5ec5e62d96b003ab4b5cbc42abfc0d0",
"rev": "0c53b6b8c2a3e46c68e04417e247bba660689c9d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
@ -153,7 +118,6 @@
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs",
"unstable": "unstable",
"update": "update"
@ -176,11 +140,11 @@
},
"unstable": {
"locked": {
"lastModified": 1765472234,
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
"lastModified": 1712963716,
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
"type": "github"
},
"original": {
@ -192,16 +156,16 @@
},
"update": {
"locked": {
"lastModified": 1765608474,
"narHash": "sha256-9Wx53UK0z8Di5iesJID0tS1dRKwGxI4i7tsSanOHhF0=",
"lastModified": 1716061101,
"narHash": "sha256-H0eCta7ahEgloGIwE/ihkyGstOGu+kQwAiHvwVoXaA0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "28bb483c11a1214a73f9fd2d9928a6e2ea86ec71",
"rev": "e7cc61784ddf51c81487637b3031a6dd2d6673a2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}

103
flake.nix
View file

@ -1,23 +1,20 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
update.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
update.url = "github:nixos/nixpkgs/nixos-23.11";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-wsl = {
url = "github:nix-community/NixOS-WSL/main";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};
@ -41,7 +38,7 @@
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.benson = ./home/users/benson.nix;
home-manager.users.benson.imports = [ ./home/users/benson.nix ];
}
];
};
@ -53,85 +50,53 @@
(map mkSystem ["NixDawn" "NixFrame"]))
// {
NixWSL = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./common/configuration.nix
./hosts/NixWSL/configuration.nix
];
};
NixGate = pkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./common/configuration.nix
./hosts/NixGate/configuration.nix
];
};
NixSentinel = pkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./common/configuration.nix
./hosts/NixSentinel/configuration.nix
];
};
# LenoNix = nixpkgs.lib.nixosSystem {
# system = "x86_64-linux";
# modules = [ ./hosts/NixFrame/configuration.nix ];
# };
NixGate = pkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./common/configuration.nix
./hosts/NixGate/configuration.nix
];
};
NixSentinel = pkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./common/configuration.nix
./hosts/NixSentinel/configuration.nix
];
};
# LenoNix = nixpkgs.lib.nixosSystem {
# system = "x86_64-linux";
# modules = [ ./hosts/NixFrame/configuration.nix ];
# };
};
packages."${system}" = {
mps-debug = pkgs.mps-debug;
};
devShells."${system}" = {
emacs-min = pkgs.mkShell {
packages = with pkgs; [
emacs
git
libtool
cmake gcc gnumake
roboto-mono ripgrep
];
};
emacs-devel = pkgs.mkShell {
default = pkgs.mkShell {
# packages = with pkgs; [mps-debug];
# nativeBuildInputs = with pkgs; [ mps-debug ] ++ pkgs.emacs.nativeBuildInputs;
# buildInputs = pkgs.emacs.buildInputs;
# packages = with pkgs; [ mps-debug ];
inputsFrom = with pkgs; [ emacs ];
packages = with pkgs; [ mps ];
buildInputs = with pkgs; [ xorg.libXrandr ];
packages = with pkgs; [ mps-debug ];
# inputsFrom = with pkgs; [ emacs ];
shellHook = ''
echo "MPS debug environment!"
set -x
export MPS_LIB="${pkgs.mps-debug}/lib"
export MPS_INC="${pkgs.mps-debug}/include"
unset EMACSLOADPATH
set +x
echo "MPS debug environment!"
echo "MPS_LIB = $MPS_LIB"
echo "MPS_INC = $MPS_INC"
echo "Configure Command: "
echo -n ' LDFLAGS="-L$MPS_LIB" CFLAGS="-O0 -g3 -isystem $MPS_INC" '
echo './configure --with-mps=debug --with-native-compilation=no --enable-checking="yes,glyphs"'
'';
};
pymupdf = pkgs.mkShell {
venvDir = "./venv";
buildInputs = with pkgs.python312Packages; [
venvShellHook
python
pymupdf
icecream
];
};
};
homeConfigurations = {
@ -143,7 +108,7 @@
];
};
"a0487752" = home-manager.lib.homeManagerConfiguration {
"work" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit inputs; };
modules = [

View file

@ -27,21 +27,12 @@ in
xdg.configFile."bash-config/emacs.sh".source = "${bash-drv}/emacs.sh";
# home.file.".bashrc".source = "${bash-drv}/bashrc.sh";
programs.bash = {
shellAliases = {
enable_gdb = "sudo sysctl kernel.yama.ptrace_scope=0";
disable_gdb = "sudo sysctl kernel.yama.ptrace_scope=3";
};
programs.bash.bashrcExtra = ''
source ${bash-drv}/bashrc.sh
bashrcExtra = ''
source ${bash-drv}/bashrc.sh
# Need to figure out how to conditionally generate this
if [[ -n $(which kubectl) ]]; then
alias k=kubectl
source <(kubectl completion bash | sed s/kubectl/k/g)
fi
'';
};
# Need to figure out how to conditionally generate this
alias k=kubectl
source <(kubectl completion bash | sed s/kubectl/k/g)
'';
};
}

View file

@ -1,33 +1,18 @@
{ inputs, config, pkgs, lib, ... }@args:
{ inputs, config, pkgs, ... }:
{
imports = [
../modules
../../submodules
];
nixpkgs.overlays = (lib.mkIf (!config.submoduleSupport.enable) [
nixpkgs.overlays = [
inputs.emacs-overlay.overlays.default
]);
my.beets-config.enable = true;
my.tmux-config.enable = true;
my.flakeLocation = if (builtins.hasAttr "osConfig" args)
then args.osConfig.my.flakeLocation
else "/home/benson/nixos-config";
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
home = {
username = "benson";
homeDirectory = "/home/benson";
};
nix = (lib.mkIf (!config.submoduleSupport.enable) {
package = pkgs.nix;
settings.experimental-features = "nix-command flakes";
registry.nixpkgs.flake = inputs.nixpkgs;
});
home.username = "benson";
home.homeDirectory = "/home/benson";
my.bash-config.enable = true;
@ -42,19 +27,23 @@
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
home.packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
roboto-mono
rizin radare2 cutter
ripgrep
git
cmake gnumake libtool gcc
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
@ -91,26 +80,7 @@
EDITOR = "emacsclient -n";
};
accounts.email.accounts = {
fastmail = {
primary = true;
realName = "Benson Chu";
address = "bensonchu@fastmail.com";
aliases = ["dev@mail.pestctrl.io" "me@mail.pestctrl.io" "bensonchu457@fastmail.com"];
flavor = "fastmail.com";
imap.host = "imap.fastmail.com";
smtp.host = "smtp.fastmail.com";
userName = "bensonchu@fastmail.com";
passwordCommand = ''${pkgs.myEmacs}/bin/emacsclient -e '(get-authinfo "imap.fastmail.com" "993" "bensonchu457@fastmail.com")' | ${pkgs.coreutils}/bin/tr -d '"' '';
mu.enable = true;
mujmap.enable = true;
};
};
nix.registry.nixpkgs.flake = inputs.nixpkgs;
# Let Home Manager install and manage itself.
programs = {
@ -118,7 +88,7 @@
git = {
enable = true;
userName = "Benson Chu";
userEmail = "dev@mail.pestctrl.io";
userEmail = "bensonchu457@gmail.com";
extraConfig = {
core = {
editor = "emacsclient";
@ -127,8 +97,15 @@
};
emacs = {
package = pkgs.myEmacs;
package = (
(pkgs.emacsPackagesFor pkgs.emacs-unstable)
.emacsWithPackages (epkgs: with epkgs; [
treesit-grammars.with-all-grammars
]));
enable = true;
extraPackages = epkgs: with epkgs; [
mu4e
];
};
direnv = {
@ -146,7 +123,6 @@
enable = true;
frequency = "*:0/10";
verbose = true;
postExec = "${pkgs.mu}/bin/mu index";
};
};
}

View file

@ -1,30 +1,22 @@
{ inputs, config, pkgs, lib, ... }:
{ inputs, config, pkgs, ... }:
{
imports = [
../modules
../../submodules
./modules
];
nixpkgs.overlays = [
inputs.emacs-overlay.overlays.default
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
# home.username = "cvs";
# home.homeDirectory = "/home/cvs";
home.username = "a0487752";
home.homeDirectory = "/home/a0487752";
home.username = "cvs";
home.homeDirectory = "/home/cvs";
# my.bash-config.enable = true;
my = {
flakeLocation = "/scratch/benson/_repos-personal/nixos-config";
tmux-config.enable = true;
# work-bash-config.enable = true;
};
my.bash-config.enable = true;
nix = (lib.mkIf (!config.submoduleSupport.enable) {
package = pkgs.nix;
settings.experimental-features = "nix-command flakes";
registry.nixpkgs.flake = inputs.nixpkgs;
});
nix.registry.nixpkgs.flake = inputs.nixpkgs;
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
@ -33,40 +25,27 @@
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
home.stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
home.packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
roboto-mono
fastfetch
rizin radare2 cutter
ripgrep
git
cmatrix
gnumake libtool roswell sbcl
dtc
clang-tools
jira-cli-go
direnv
firefox
tmux
mold
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
@ -118,11 +97,14 @@
};
emacs = {
package = pkgs.emacs-unstable;
enable = true;
package = pkgs.myEmacs;
extraPackages = epkgs: with epkgs; [
mu4e
];
};
# bash.enable = true; # see note on other shells below
bash.enable = true; # see note on other shells below
};
services = {

View file

@ -8,21 +8,18 @@
../../common/configuration.nix
../../common/user-facing.nix
../../common/development-machine.nix
# Unmaintained
# ../../common/lxd-setup.nix
../../common/lxd-setup.nix
../../common/moms-house
# Include the results of the hardware scan.
./hardware-configuration.nix
];
my.flakeLocation = "/home/benson/nixos-config/";
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "NixDawn"; # Define your hostname.
networking.hostId = "5640b87e";
networking.wireless.enable = true;
fileSystems."/home/benson/workspace" = {
device = "/dev/disk/by-uuid/aa640eb6-0655-446a-8a12-5867eeef6638";
@ -37,17 +34,13 @@
description = "Benson Chu";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
kdePackages.dolphin
kdePackages.breeze-icons
firefox
kate
steam
moonlight-qt
dolphin
breeze-icons
xautolock
unstable.mqtt-explorer
musescore
unstable.spotify
pulseaudio
immich-cli
];
};
@ -60,7 +53,6 @@
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
coolercontrol.enable = true;
};
services = {
@ -69,7 +61,6 @@
# appearance.
#
# picom.enable = true;
pipewire.pulse.enable = true;
pcscd.enable = true;
tailscale.enable = true;
gvfs.enable = true;
@ -79,12 +70,10 @@
fwupd.enable = true;
logind = {
settings = {
Login = {
IdleAction = "hybrid-sleep";
IdleActionSec = "30min";
};
};
extraConfig = ''
IdleAction=hybrid-sleep
IdleActionSec=30min
'';
};
apcupsd = {
@ -123,14 +112,6 @@
};
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
xdgOpenUsePortal = true;
};
virtualisation = {
virtualbox.host.enable = true;
@ -142,14 +123,13 @@
environment.systemPackages = with pkgs; [
pavucontrol
# unstable.rustdesk
tarsnap
unstable.rustdesk
gkraken
# (pkgs.callPackage /home/benson/workspace/peter-nixos/mfcl2690dw/default.nix { } )
clasp-common-lisp
leiningen
supercollider-with-sc3-plugins
];
hardware.gkraken.enable = true;
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
@ -160,11 +140,7 @@
];
# Syncthing
allowedTCPPorts = [
# vlc audio streaming
8888
22000
];
allowedTCPPorts = [ 22000 ];
allowedUDPPorts = [ 22000 21027 ];
};
@ -172,39 +148,12 @@
boot.supportedFilesystems = [ "nfs" ];
services.rpcbind.enable = true;
networking.hosts = {
"10.254.0.1" = ["test.pestctrl.io"];
};
systemd = {
targets.machines.enable = true;
nspawn."arch" = {
enable = true;
execConfig = {Boot = true;};
filesConfig = {
# Bind resolve.conf to get networking
BindReadOnly = ["/etc/resolv.conf:/etc/resolv.conf"];
# Bind any directories that you want to be shared
# Bind = ["/home/benson/"];
# BindUser = ["benson"];
};
networkConfig = {Private = false;};
};
services."systemd-nspawn@arch" = {
enable = true;
requiredBy = ["machines.target"];
overrideStrategy = "asDropin";
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11";
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -10,8 +10,6 @@
./hardware-configuration.nix
];
my.flakeLocation = "/home/benson/workspace/nixos-config";
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -47,7 +45,8 @@
description = "Benson Chu";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
firefox
kate
steam
];
};

View file

@ -19,7 +19,7 @@
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D289-46FB";
{ device = "/dev/disk/by-uuid/7CFD-742B";
fsType = "vfat";
};

View file

@ -40,9 +40,9 @@
};
# Configure keymap in X11
services.xserver.xkb = {
services.xserver = {
layout = "us";
variant = "";
xkbVariant = "";
};
# Virtualizer Agent
@ -104,5 +104,5 @@
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -129,6 +129,6 @@
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -1,30 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, inputs, ... }:
{
imports = [
../../common/configuration.nix
../../common/user-facing.nix
../../common/development-machine.nix
inputs.nixos-wsl.nixosModules.default
];
networking.hostName = "NixWSL";
wsl.enable = true;
wsl.defaultUser = "benson";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -1,20 +0,0 @@
{ inputs, config, pkgs, lib, ... }:
{
fileSystems."/mnt/media" = {
device = "//atlantis.local/media2";
fsType = "cifs";
options = [ "username=bchu" "password=Mathexpert457" "uid=1000" "x-systemd.automount" "noauto"];
};
fileSystems."/mnt/dump" = {
device = "//atlantis.local/dump";
fsType = "cifs";
options = [ "username=bchu" "password=Mathexpert457" "uid=1000" "x-systemd.automount" "noauto"];
};
fileSystems."/mnt/puppet_recordings" = {
device = "//atlantis.local/Puppet Recordings";
fsType = "cifs";
options = [ "username=bchu" "password=Mathexpert457" "uid=1000" "x-systemd.automount" "noauto"];
};
}

View file

@ -0,0 +1,36 @@
{ lib, fetchFromGitHub, beets, python3Packages }:
python3Packages.buildPythonApplication rec {
pname = "beets-filetote";
version = "0.4.9";
pyproject = true;
src = fetchFromGitHub {
repo = "${pname}";
owner = "gtronset";
rev = "v${version}";
sha256 = "sha256-pZ6c2XQMSiiPHyZMLSiSE+LXeCfi3HEWtsTK5DP9YZE=";
};
nativeBuildInputs = [
beets
python3Packages.poetry-core
];
nativeCheckInputs = with python3Packages; [
pytestCheckHook
pytest-cov
mock
typeguard
];
preCheck = ''
export HOME=$(mktemp -d)
'';
meta = with lib; {
description = "Beets plugin that manages non-music extra files";
homepage = "https://github.com/gtronset/beets-filetote";
# maintainers = with maintainers; [ aszlig lovesegfault ];
license = licenses.mit;
};
}

View file

@ -1 +0,0 @@
setxkbmap -I. neo_dvorak -option grp:ctrls_toggle -print | xkbcomp -I. - $DISPLAY

View file

@ -1,67 +0,0 @@
partial alphanumeric_keys
xkb_symbols "neo_dvorak_base" {
include "de(neo_base)"
key.type[Group1] = "EIGHT_LEVEL_WITH_LEVEL5_LOCK";
key <AD01> { [ apostrophe, quotedbl, NoSymbol, Greek_eta, NoSymbol, NoSymbol, U2135, NoSymbol ] };
key <AD02> { [ comma, less, NoSymbol, U03F1, NoSymbol, NoSymbol, U21D2, NoSymbol ] };
key <AD03> { [ period, greater, NoSymbol, U03D1, NoSymbol, NoSymbol, U21A6, NoSymbol ] };
key <AD11> { [ slash, question, NoSymbol, NoSymbol, NoSymbol, NoSymbol, union, NoSymbol ] };
key <AD12> { [ equal, plus, dead_stroke, dead_psili, dead_doubleacute, NoSymbol, dead_breve, NoSymbol] };
key <AC11> { [ minus, underscore, NoSymbol, U2011, NoSymbol, NoSymbol, hyphen, NoSymbol ] };
key <AB01> { [ semicolon, colon, NoSymbol, U03F5, NoSymbol, NoSymbol, intersection, NoSymbol ] };
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK";
key <AE11> { [ sharp, U1E9E, NoSymbol, Greek_finalsmallsigma, NoSymbol, NoSymbol, jot, NoSymbol ] };
key <AD04> { [ p, P, NoSymbol, Greek_pi, NoSymbol, NoSymbol, Greek_PI, NoSymbol ] };
key <AD05> { [ y, Y, NoSymbol, Greek_upsilon, NoSymbol, NoSymbol, nabla, NoSymbol ] };
key <AD06> { [ f, F, NoSymbol, Greek_phi, NoSymbol, NoSymbol, Greek_PHI, NoSymbol ] };
key <AD07> { [ g, G, NoSymbol, Greek_gamma, NoSymbol, NoSymbol, Greek_GAMMA, NoSymbol ] };
key <AD08> { [ c, C, NoSymbol, Greek_chi, NoSymbol, NoSymbol, U2102, NoSymbol ] };
key <AD09> { [ r, R, NoSymbol, Greek_rho, NoSymbol, NoSymbol, U211D, NoSymbol ] };
key <AD10> { [ l, L, NoSymbol, Greek_lambda, NoSymbol, NoSymbol, Greek_LAMBDA, NoSymbol ] };
key <AC01> { [ a, A, NoSymbol, Greek_alpha, NoSymbol, NoSymbol, U2200, NoSymbol ] };
key <AC02> { [ o, O, NoSymbol, Greek_omicron, NoSymbol, NoSymbol, elementof, NoSymbol ] };
key <AC03> { [ e, E, NoSymbol, Greek_epsilon, NoSymbol, NoSymbol, U2203, NoSymbol ] };
key <AC04> { [ u, U, NoSymbol, NoSymbol, NoSymbol, NoSymbol, includedin, NoSymbol ] };
key <AC05> { [ i, I, NoSymbol, Greek_iota, NoSymbol, NoSymbol, integral, NoSymbol ] };
key <AC06> { [ d, D, NoSymbol, Greek_delta, NoSymbol, NoSymbol, Greek_DELTA, NoSymbol ] };
key <AC07> { [ h, H, NoSymbol, Greek_psi, NoSymbol, NoSymbol, Greek_PSI, NoSymbol ] };
key <AC08> { [ t, T, NoSymbol, Greek_tau, NoSymbol, NoSymbol, partialderivative, NoSymbol ] };
key <AC09> { [ n, N, NoSymbol, Greek_nu, NoSymbol, NoSymbol, U2115, NoSymbol ] };
key <AC10> { [ s, S, NoSymbol, Greek_sigma, NoSymbol, NoSymbol, Greek_SIGMA, NoSymbol ] };
key <AB02> { [ q, Q, NoSymbol, U03D5, NoSymbol, NoSymbol, U211A, NoSymbol ] };
key <AB03> { [ j, J, NoSymbol, Greek_theta, NoSymbol, NoSymbol, Greek_THETA, NoSymbol ] };
key <AB04> { [ k, K, NoSymbol, Greek_kappa, NoSymbol, NoSymbol, multiply, NoSymbol ] };
key <AB05> { [ x, X, NoSymbol, Greek_xi, NoSymbol, NoSymbol, Greek_XI, NoSymbol ] };
key <AB06> { [ b, B, NoSymbol, Greek_beta, NoSymbol, NoSymbol, U21D0, NoSymbol ] };
key <AB07> { [ m, M, NoSymbol, Greek_mu, NoSymbol, NoSymbol, ifonlyif, NoSymbol ] };
key <AB08> { [ w, W, NoSymbol, Greek_omega, NoSymbol, NoSymbol, Greek_OMEGA, NoSymbol ] };
key <AB09> { [ v, V, NoSymbol, NoSymbol, NoSymbol, NoSymbol, radical, NoSymbol ] };
key <AB10> { [ z, Z, NoSymbol, Greek_zeta, NoSymbol, NoSymbol, U2124, NoSymbol ] };
key <AE01> { [ 1, exclam, onesuperior, onesubscript, ordfeminine, NoSymbol, notsign, NoSymbol ] };
key <AE02> { [ 2, at, twosuperior, twosubscript, masculine, NoSymbol, logicalor, NoSymbol ] };
key <AE03> { [ 3, numbersign, threesuperior, threesubscript, numerosign, NoSymbol, logicaland, NoSymbol ] };
key <AE04> { [ 4, dollar, U203A, femalesymbol, NoSymbol, NoSymbol, U22A5, NoSymbol ] };
key <AE05> { [ 5, percent, U2039, malesymbol, periodcentered, NoSymbol, U2221, NoSymbol ] };
key <AE06> { [ 6, asciicircum, cent, U26A5, sterling, NoSymbol, U2225, NoSymbol ] };
key <AE07> { [ 7, ampersand, yen, U03F0, currency, NoSymbol, rightarrow, NoSymbol ] };
key <AE08> { [ 8, asterisk, singlelowquotemark, U27E8, Tab, ISO_Left_Tab, U221E, NoSymbol ] };
key <AE09> { [ 9, parenleft, leftsinglequotemark, U27E9, KP_Divide, KP_Divide, variation, NoSymbol ] };
key <AE10> { [ 0, parenright, rightsinglequotemark, zerosubscript, KP_Multiply, KP_Multiply, emptyset, NoSymbol ] };
};
default partial alphanumeric_keys modifier_keys keypad_keys
xkb_symbols "neo_dvorak" {
include "neo_dvorak(neo_dvorak_base)"
name[Group1]= "English (Neo, DVORAK)";
include "shift(both_capslock)"
include "level3(caps_switch)"
include "level3(bksl_switch)"
include "level5(lsgt_switch_lock)"
include "level5(ralt_switch_lock)"
};

@ -1 +0,0 @@
Subproject commit ae7e236072bcc0fc7d7bd3ca58bc0ad5cff0fdd2

View file

@ -1,94 +0,0 @@
{ inputs, config, pkgs, lib, ... }@args:
let
beets-cfg = config.my.beets-config;
tmux-cfg = config.my.tmux-config;
work-bash-cfg = config.my.work-bash-config;
mkIfFlakeLoc = condition: errorMsg: value:
(lib.mkIf (condition &&
!(config.my.flakeLocation == null &&
(lib.warn ("Didn't set 'my.flakeLocation', " + errorMsg) true)))
value);
flakeSubmodules = "${config.my.flakeLocation}/submodules";
in
{
options = {
my.flakeLocation = lib.mkOption {
default = null;
description = "Location of nixos flake for config";
type = lib.types.nullOr lib.types.path;
};
my.beets-config.enable = lib.mkEnableOption "Enable beets configuration file";
my.tmux-config.enable = lib.mkEnableOption "Enable tmux configuration file";
my.work-bash-config.enable = lib.mkEnableOption "Enable work bash configurations";
};
config = {
home.file = (mkIfFlakeLoc work-bash-cfg.enable
"I won't symlink bashrc and bash_profile into place"
{
".bashrc" = {
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/work-bash-config/dot-bashrc.sh";
};
".bash_profile" = {
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/work-bash-config/dot-bash_profile.sh";
};
}
);
xdg = {
configFile = {
"beets/config.yaml" = (mkIfFlakeLoc beets-cfg.enable
"I won't symlink beets' config.yaml into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/beets-config/config.yaml";
# Recursive only applies to directories. If false, do one
# symlink (which is the directory). Otherwise, do every file
# recursively
#
# recursive = true;
});
"beets/plugins/" = (mkIfFlakeLoc beets-cfg.enable
"I won't symlink beets' plugins directory into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/beets-config/plugins/";
});
"tmux/tmux.conf" = (mkIfFlakeLoc tmux-cfg.enable
"I won't symlink tmux's tmux.conf into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/tmux-config/tmux.conf";
});
"wezterm/" = (mkIfFlakeLoc beets-cfg.enable
"I won't symlink wezterm config folder into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/wezterm-config/";
});
"bash/" = (mkIfFlakeLoc work-bash-cfg.enable
"I won't symlink bash config folder into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/work-bash-config/dot-config-bash/";
});
};
dataFile = {
"fonts/.ttf" = (mkIfFlakeLoc true
"I won't symlink chinese fonts into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/fonts/.ttf";
});
};
};
};
}

Binary file not shown.

@ -1 +0,0 @@
Subproject commit d28c28e27b24a5848e41df1419f17fce289d73a0

@ -1 +0,0 @@
Subproject commit dfaad48b33fdd89eef3f88da00bcfd13dcd11074

@ -1 +0,0 @@
Subproject commit 369bbcbd4734110389dfebc719b5add555447795