Compare commits

..

3 commits

Author SHA1 Message Date
Benson Chu
606d3d6c20 Powertop 2024-10-29 07:51:15 -05:00
Benson Chu
4e7c61afe9 Temporary modification of time zone 2024-10-29 07:51:15 -05:00
Benson Chu
a1e137b547 Virtualbox, required nixpkgs update 2024-10-27 14:54:14 -05:00
28 changed files with 211 additions and 538 deletions

1
.gitattributes vendored
View file

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

3
.gitmodules vendored
View file

@ -7,6 +7,3 @@
[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

@ -17,13 +17,20 @@
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
mu4e
]))
notmuch mu isync
keychain ledger gnupg
ledger2beancount beancount fava
hledger
ledger-autosync
mailutils
pandoc texlive.combined.scheme-full
texlivePackages.noto
@ -73,17 +80,6 @@
# chromaprint
lxml
# RedditArchiver dependencies
pyyaml
anytree
colored
markdown2
praw
colored
prawcore
ofxclient
]))
chromaprint

View file

@ -54,7 +54,7 @@ in
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Chicago";
# time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
@ -71,18 +71,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 +89,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 = "24.05"; # Did you read the comment?
}

View file

@ -12,8 +12,6 @@
zstd.dev
zstd.out
devenv
racket
ninja
@ -21,8 +19,8 @@
lldb
mold
lld
clang-tools # clangd, clang-format
llvmPackages.libllvm
clang-tools_16 # clangd, clang-format
llvmPackages_16.libllvm
bear
rr
valgrind
@ -36,11 +34,10 @@
cutter
nodejs_22
wireshark
minikube
kubectl
unstable.talosctl
talosctl
k9s
(wrapHelm kubernetes-helm {
plugins = with pkgs.kubernetes-helmPlugins; [
@ -51,11 +48,9 @@
];
})
sops
postgresql_16
postgresql
basez
zeal
# mps.overrideAttrs (old: {
# pname = "mps";
# version = "1.118.0";
@ -69,8 +64,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,12 @@
{ config, pkgs, ... }:
let
emacs =
((pkgs.emacsPackagesFor pkgs.emacs-unstable).emacsWithPackages
(epkgs: with epkgs; [
treesit-grammars.with-all-grammars
mu4e
]));
in
{
environment.systemPackages = with pkgs; [
picom
@ -11,7 +19,7 @@
windowManager.session = [{
name = "my-exwm";
start = ''
${pkgs.myEmacs}/bin/emacs -l /home/benson/.emacs.d/init.el
${emacs}/bin/emacs -l /home/benson/.emacs.d/init.el
'';
}];

View file

@ -15,17 +15,10 @@
# 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" ];
};
};
layout = lib.mkForce "us,us";
variant = lib.mkForce "dvorak,";
options = "grp:win_space_toggle";
};
};
};
@ -37,5 +30,6 @@
brightnessctl
remmina
acpi
powertop
];
}

View file

@ -10,14 +10,4 @@ inputs:
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,37 +22,35 @@
# 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 and startx
displayManager = {
sddm.enable = true;
startx.enable = true;
};
libinput = {
enable = true;
touchpad = {
naturalScrolling = true;
};
# Configure keymap in X11
xkb = {
layout = "us";
variant = "";
};
};
services.displayManager = {
sddm.enable = true;
};
services.libinput = {
enable = true;
touchpad = {
naturalScrolling = true;
};
};
@ -58,16 +58,16 @@
packages = with pkgs; [
roboto-mono
noto-fonts
noto-fonts-extra
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 +76,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,24 +89,18 @@
docker
pcmanfm
kdePackages.dolphin
kdePackages.dolphin-plugins
kdePackages.ffmpegthumbs
kdePackages.kdegraphics-thumbnailers
p7zip
unzip
libsForQt5.dolphin
libsForQt5.dolphin-plugins
libsForQt5.ffmpegthumbs
libsForQt5.kdegraphics-thumbnailers
qemu
pavucontrol
update.yt-dlp
ffmpeg
yt-dlp
dconf
xfce.xfce4-terminal
# TODO: Re-enable extrafiles
(unstable.beets# .override {
# pluginOverrides = {
@ -132,9 +124,5 @@
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": 1722791415,
"narHash": "sha256-7n9UqBkTAF/RikFzCyHKz50kzBDF5GYgVb3J5wCh4EY=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "60f44dfc7fedf818666436d3b341858a400e31e0",
"rev": "c4f6796e5c499cf6370a45fff08a03e848b9abad",
"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": 1726989464,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "90b62096f099b73043a747348c11dbfcfbdea949",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1722332872,
"narHash": "sha256-2xLM4sc5QBfi0U/AANJAW21Bj4ZX479MHPMPkB+eKBU=",
"lastModified": 1729509737,
"narHash": "sha256-8OHgqz+tFo21h3hg4/GHizFPws+MMzpEru/+62Z0E8c=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "14c333162ba53c02853add87a0000cbd7aa230c2",
"rev": "cc2d3c0e060f981905d52337340ee6ec8b8eb037",
"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": 1729307008,
"narHash": "sha256-QUvb6epgKi9pCu9CttRQW4y5NqJ+snKr1FZpG/x3Wtc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "28bb483c11a1214a73f9fd2d9928a6e2ea86ec71",
"rev": "a9b86fc2290b69375c5542b622088eb6eca2a7c3",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1765363881,
"narHash": "sha256-3C3xWn8/2Zzr7sxVBmpc1H1QfxjNfta5IMFe3O9ZEPw=",
"lastModified": 1722651103,
"narHash": "sha256-IRiJA0NVAoyaZeKZluwfb2DoTpBAj+FLI0KfybBeDU0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d2b1213bf5ec5e62d96b003ab4b5cbc42abfc0d0",
"rev": "a633d89c6dc9a2a8aae11813a62d7c58b2c0cc51",
"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": 1729256560,
"narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
"rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0",
"type": "github"
},
"original": {
@ -192,16 +156,16 @@
},
"update": {
"locked": {
"lastModified": 1765608474,
"narHash": "sha256-9Wx53UK0z8Di5iesJID0tS1dRKwGxI4i7tsSanOHhF0=",
"lastModified": 1729307008,
"narHash": "sha256-QUvb6epgKi9pCu9CttRQW4y5NqJ+snKr1FZpG/x3Wtc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "28bb483c11a1214a73f9fd2d9928a6e2ea86ec71",
"rev": "a9b86fc2290b69375c5542b622088eb6eca2a7c3",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}

105
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-24.05";
update.url = "github:nixos/nixpkgs/nixos-24.05";
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-24.05";
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,55 @@
(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"'
echo "If you are using Emacs from emacs-overlay, remember to unset environment variable EMACSLOADPATH"
echo "Need to investigate further as to why"
'';
};
pymupdf = pkgs.mkShell {
venvDir = "./venv";
buildInputs = with pkgs.python312Packages; [
venvShellHook
python
pymupdf
icecream
];
};
};
homeConfigurations = {
@ -143,7 +110,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,20 +1,24 @@
{ inputs, config, pkgs, lib, ... }@args:
{
let
my-emacs = ((pkgs.emacsPackagesFor pkgs.emacs-unstable)
.emacsWithPackages (epkgs: with epkgs; [
treesit-grammars.with-all-grammars
mu4e
]));
in {
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";
my.flakeLocation = lib.mkIf (builtins.hasAttr "osConfig" args) args.osConfig.my.flakeLocation;
# Home Manager needs a bit of information about you and the paths it should
# manage.
@ -38,7 +42,7 @@
# 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 = "23.11"; # Please read the comment before changing.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
@ -96,7 +100,7 @@
primary = true;
realName = "Benson Chu";
address = "bensonchu@fastmail.com";
aliases = ["dev@mail.pestctrl.io" "me@mail.pestctrl.io" "bensonchu457@fastmail.com"];
aliases = ["me@mail.pestctrl.io" "bensonchu457@fastmail.com"];
flavor = "fastmail.com";
@ -104,11 +108,9 @@
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 '"' '';
passwordCommand = ''${my-emacs}/bin/emacsclient -e '(get-authinfo "imap.fastmail.com" "993" "bensonchu457@fastmail.com")' | ${pkgs.coreutils}/bin/tr -d '"' '';
mu.enable = true;
mujmap.enable = true;
};
};
@ -118,7 +120,7 @@
git = {
enable = true;
userName = "Benson Chu";
userEmail = "dev@mail.pestctrl.io";
userEmail = "bensonchu457@gmail.com";
extraConfig = {
core = {
editor = "emacsclient";
@ -127,7 +129,7 @@
};
emacs = {
package = pkgs.myEmacs;
package = my-emacs;
enable = true;
};

View file

@ -1,24 +1,20 @@
{ inputs, config, pkgs, lib, ... }:
{ inputs, config, pkgs, ... }:
{
imports = [
../modules
../../submodules
];
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;
};
nix = (lib.mkIf (!config.submoduleSupport.enable) {
package = pkgs.nix;
@ -46,27 +42,11 @@
# '')
roboto-mono
fastfetch
rizin radare2 cutter
ripgrep
git
cmatrix
gnumake libtool roswell sbcl
dtc
clang-tools
jira-cli-go
direnv
firefox
tmux
mold
cmake gnumake libtool gcc
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
@ -119,7 +99,12 @@
emacs = {
enable = true;
package = pkgs.myEmacs;
package = (
(pkgs.emacsPackagesFor pkgs.emacs-unstable)
.emacsWithPackages (epkgs: with epkgs; [
treesit-grammars.with-all-grammars
mu4e
]));
};
# bash.enable = true; # see note on other shells below

View file

@ -8,8 +8,7 @@
../../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
@ -23,6 +22,7 @@
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 +37,12 @@
description = "Benson Chu";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
kdePackages.dolphin
kdePackages.breeze-icons
kate
steam
moonlight-qt
dolphin
breeze-icons
xautolock
unstable.mqtt-explorer
musescore
unstable.spotify
pulseaudio
immich-cli
];
};
@ -60,7 +55,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 +63,6 @@
# appearance.
#
# picom.enable = true;
pipewire.pulse.enable = true;
pcscd.enable = true;
tailscale.enable = true;
gvfs.enable = true;
@ -79,12 +72,10 @@
fwupd.enable = true;
logind = {
settings = {
Login = {
IdleAction = "hybrid-sleep";
IdleActionSec = "30min";
};
};
extraConfig = ''
IdleAction=hybrid-sleep
IdleActionSec=30min
'';
};
apcupsd = {
@ -123,14 +114,6 @@
};
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
xdgOpenUsePortal = true;
};
virtualisation = {
virtualbox.host.enable = true;
@ -142,14 +125,15 @@
environment.systemPackages = with pkgs; [
pavucontrol
# unstable.rustdesk
unstable.rustdesk
gkraken
tarsnap
# (pkgs.callPackage /home/benson/workspace/peter-nixos/mfcl2690dw/default.nix { } )
clasp-common-lisp
leiningen
supercollider-with-sc3-plugins
clasp
];
hardware.gkraken.enable = true;
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
@ -160,11 +144,7 @@
];
# Syncthing
allowedTCPPorts = [
# vlc audio streaming
8888
22000
];
allowedTCPPorts = [ 22000 ];
allowedUDPPorts = [ 22000 21027 ];
};
@ -176,35 +156,12 @@
"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 = "24.05"; # Did you read the comment?
}

View file

@ -12,6 +12,8 @@
my.flakeLocation = "/home/benson/workspace/nixos-config";
time.timeZone = "America/Los_Angeles";
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -47,7 +49,7 @@
description = "Benson Chu";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
kate
steam
];
};
@ -59,12 +61,16 @@
];
virtualisation = {
virtualbox.host.enable = true;
};
# 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?
system.stateVersion = "24.05"; # Did you read the comment?
}

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

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

@ -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 +1 @@
Subproject commit ae7e236072bcc0fc7d7bd3ca58bc0ad5cff0fdd2
Subproject commit 69ed4fe876144b2d8cd3fc7edeaa7a4c98b0616d

View file

@ -2,7 +2,6 @@
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 &&
@ -19,28 +18,14 @@ in
};
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".source = ./beets-config/config.yaml;
}
);
xdg = {
configFile = {
"beets/config.yaml" = (mkIfFlakeLoc beets-cfg.enable
home = {
file = {
".config/beets/config.yaml" = (mkIfFlakeLoc beets-cfg.enable
"I won't symlink beets' config.yaml into place"
{
source = config.lib.file.mkOutOfStoreSymlink
@ -52,41 +37,18 @@ in
# 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
".config/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
".config/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";
"${config.my.flakeLocation}/submodules/wezterm-config/";
});
};
};

Binary file not shown.

@ -1 +1 @@
Subproject commit d28c28e27b24a5848e41df1419f17fce289d73a0
Subproject commit e5aa35f4f8ed5aad24844d56d2782ba924a38c8a

@ -1 +1 @@
Subproject commit dfaad48b33fdd89eef3f88da00bcfd13dcd11074
Subproject commit 54dcdc0c412b08c10d9cd6599e4589b068154db7

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