Compare commits

..

1 commit

Author SHA1 Message Date
Benson Chu
b528fa5cb7 experimental getPath 2025-08-11 14:12:57 -05:00
16 changed files with 124 additions and 260 deletions

View file

@ -23,7 +23,6 @@
keychain ledger gnupg
ledger2beancount beancount fava
hledger
ledger-autosync
mailutils
pandoc texlive.combined.scheme-full
texlivePackages.noto
@ -73,17 +72,6 @@
# chromaprint
lxml
# RedditArchiver dependencies
pyyaml
anytree
colored
markdown2
praw
colored
prawcore
ofxclient
]))
chromaprint

View file

@ -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

@ -21,8 +21,8 @@
lldb
mold
lld
clang-tools # clangd, clang-format
llvmPackages.libllvm
clang-tools_16 # clangd, clang-format
llvmPackages_16.libllvm
bear
rr
valgrind

View file

@ -12,12 +12,11 @@ inputs:
})
(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
]));
myEmacs =
((prev.emacsPackagesFor final.emacs-unstable)
.emacsWithPackages (epkgs: with epkgs; [
treesit-grammars.with-all-grammars
mu4e
]));
})
]

View file

@ -5,10 +5,11 @@
./exwm.nix
];
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services = {
# Enable sound with pipewire.
pipewire = {
enable = true;
alsa.enable = true;
@ -20,37 +21,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,6 +57,7 @@
packages = with pkgs; [
roboto-mono
noto-fonts
noto-fonts-extra
noto-fonts-cjk-sans
noto-fonts-cjk-serif
commit-mono
@ -67,7 +67,7 @@
environment.systemPackages = with pkgs; [
update.firefox
update.google-chrome
bitwarden-desktop
bitwarden
vlc
mpv
obs-studio
@ -80,10 +80,10 @@
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,10 +91,10 @@
docker
pcmanfm
kdePackages.dolphin
kdePackages.dolphin-plugins
kdePackages.ffmpegthumbs
kdePackages.kdegraphics-thumbnailers
libsForQt5.dolphin
libsForQt5.dolphin-plugins
libsForQt5.ffmpegthumbs
libsForQt5.kdegraphics-thumbnailers
p7zip
unzip
@ -134,7 +134,5 @@
xorg.xkbcomp
insomnia
mujmap
];
}

View file

@ -8,11 +8,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1765729484,
"narHash": "sha256-exsMvinnpTWm+lZiq8RucYejmS605EP8uny/32KzlE8=",
"lastModified": 1750523034,
"narHash": "sha256-4jYxNHn/9iyAANAXc3pkhhNeTyAJISshP3lgjH9l70o=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "60f44dfc7fedf818666436d3b341858a400e31e0",
"rev": "7a26e0974d0a1dd5d295a80f533814206d78523f",
"type": "github"
},
"original": {
@ -22,22 +22,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,16 +47,16 @@
]
},
"locked": {
"lastModified": 1765605144,
"narHash": "sha256-RM2xs+1HdHxesjOelxoA3eSvXShC8pmBvtyTke4Ango=",
"lastModified": 1736373539,
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "90b62096f099b73043a747348c11dbfcfbdea949",
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
@ -93,56 +77,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": 1750330365,
"narHash": "sha256-hJ7XMNVsTnnbV2NPmStCC07gvv5l2x7+Skb7hyUzazg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "28bb483c11a1214a73f9fd2d9928a6e2ea86ec71",
"rev": "d883b6213afa179b58ba8bace834f1419707d0ad",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1765363881,
"narHash": "sha256-3C3xWn8/2Zzr7sxVBmpc1H1QfxjNfta5IMFe3O9ZEPw=",
"lastModified": 1750330365,
"narHash": "sha256-hJ7XMNVsTnnbV2NPmStCC07gvv5l2x7+Skb7hyUzazg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d2b1213bf5ec5e62d96b003ab4b5cbc42abfc0d0",
"rev": "d883b6213afa179b58ba8bace834f1419707d0ad",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
@ -153,7 +115,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 +137,11 @@
},
"unstable": {
"locked": {
"lastModified": 1765472234,
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
"lastModified": 1746904237,
"narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
"rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956",
"type": "github"
},
"original": {
@ -192,16 +153,16 @@
},
"update": {
"locked": {
"lastModified": 1765608474,
"narHash": "sha256-9Wx53UK0z8Di5iesJID0tS1dRKwGxI4i7tsSanOHhF0=",
"lastModified": 1746957726,
"narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "28bb483c11a1214a73f9fd2d9928a6e2ea86ec71",
"rev": "a39ed32a651fdee6842ec930761e31d1f242cb94",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}

View file

@ -1,24 +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.11";
update.url = "github:nixos/nixpkgs/nixos-24.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-24.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";
};
};
outputs = { self, nixpkgs, update, unstable, home-manager, nixos-hardware, emacs-overlay, ... }@inputs:
@ -41,7 +37,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,39 +49,30 @@
(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;
};

View file

@ -12,9 +12,7 @@
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 +36,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.
@ -107,8 +105,6 @@
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;
};
};

View file

@ -53,19 +53,9 @@
git
cmatrix
gnumake libtool roswell sbcl
cmake gnumake libtool roswell sbcl
dtc
clang-tools
jira-cli-go
direnv
firefox
tmux
mold
];

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
@ -37,11 +36,11 @@
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
@ -79,12 +78,10 @@
fwupd.enable = true;
logind = {
settings = {
Login = {
IdleAction = "hybrid-sleep";
IdleActionSec = "30min";
};
};
extraConfig = ''
IdleAction=hybrid-sleep
IdleActionSec=30min
'';
};
apcupsd = {
@ -145,11 +142,13 @@
# unstable.rustdesk
tarsnap
# (pkgs.callPackage /home/benson/workspace/peter-nixos/mfcl2690dw/default.nix { } )
clasp-common-lisp
clasp
leiningen
supercollider-with-sc3-plugins
];
hardware.gkraken.enable = true;
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
@ -206,5 +205,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 = "23.11";
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -47,7 +47,7 @@
description = "Benson Chu";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
kate
steam
];
};
@ -65,6 +65,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 = "23.11"; # Did you read the comment?
system.stateVersion = "24.05"; # Did you read the comment?
}

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 +1,3 @@
{ 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"];
};
}

@ -1 +1 @@
Subproject commit ae7e236072bcc0fc7d7bd3ca58bc0ad5cff0fdd2
Subproject commit 69ed4fe876144b2d8cd3fc7edeaa7a4c98b0616d

View file

@ -9,6 +9,9 @@ let
(lib.warn ("Didn't set 'my.flakeLocation', " + errorMsg) true)))
value);
flakeSubmodules = "${config.my.flakeLocation}/submodules";
getPath = (file: if true # config.my.flakeLocation != null
then config.lib.file.mkOutOfStoreSymlink "${file}"
else ./. + file);
in
{
options = {
@ -52,18 +55,10 @@ 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
"I won't symlink tmux's tmux.conf into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/tmux-config/tmux.conf";
source = getPath "${flakeSubmodules}/tmux-config/tmux.conf";
});
"wezterm/" = (mkIfFlakeLoc beets-cfg.enable