Compare commits
32 commits
a96879c99b
...
c509714b3d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c509714b3d | ||
| e2ff84273f | |||
| 5400818042 | |||
| e35d3be57b | |||
| 13dd1664ac | |||
| 54bec4ac8e | |||
| 03a630d9a4 | |||
| edab4272b7 | |||
| d2f4d99855 | |||
| 574426e767 | |||
| 1eb2dd350e | |||
| 9bdda09cc2 | |||
| e0aa9ee807 | |||
| 8ee072e3bd | |||
| 35a7d33dde | |||
| 042030359b | |||
| 2a86e83223 | |||
| e41b1b0211 | |||
| acc7191785 | |||
| ecf15a0b13 | |||
| e847261779 | |||
|
|
2638a6bc62 | ||
|
|
c569df345c | ||
|
|
80f2451e6b | ||
|
|
aba5201aac | ||
|
|
841a96fcde | ||
|
|
65845c5e45 | ||
| db1ec622ae | |||
| f0e5bc698a | |||
| 5a9ddd08ce | |||
| ff183e281f | |||
| 1c7ea2868c |
17 changed files with 353 additions and 48 deletions
|
|
@ -60,7 +60,9 @@
|
||||||
|
|
||||||
zip
|
zip
|
||||||
|
|
||||||
(python311.withPackages (pythonPackages: with pythonPackages; [
|
mupdf
|
||||||
|
|
||||||
|
(python3.withPackages (pythonPackages: with pythonPackages; [
|
||||||
pymupdf
|
pymupdf
|
||||||
pip
|
pip
|
||||||
colorama
|
colorama
|
||||||
|
|
@ -84,6 +86,10 @@
|
||||||
prawcore
|
prawcore
|
||||||
|
|
||||||
ofxclient
|
ofxclient
|
||||||
|
|
||||||
|
sympy
|
||||||
|
|
||||||
|
virtualenv
|
||||||
]))
|
]))
|
||||||
|
|
||||||
chromaprint
|
chromaprint
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,6 @@ in
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
] ++ import ./overlays.nix inputs ++ [
|
|
||||||
inputs.emacs-overlay.overlays.default
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
|
@ -104,9 +102,6 @@ in
|
||||||
|
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
|
|
|
||||||
25
common/exprs/make-vncserver.nix
Normal file
25
common/exprs/make-vncserver.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
pkgs: user: display: port: xstartup:
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
environment = {
|
||||||
|
PATH = pkgs.lib.mkForce "/run/wrappers/bin:/home/${user}/.nix-profile/bin:/nix/profile/bin:/home/${user}/.local/state/nix/profile/bin:/etc/profiles/per-user/user/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin";
|
||||||
|
};
|
||||||
|
unitConfig = {
|
||||||
|
Description = "Remote desktop service (VNC)";
|
||||||
|
After = "syslog.target network.target";
|
||||||
|
};
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "${user}";
|
||||||
|
WorkingDirectory = "/home/${user}";
|
||||||
|
Restart = "always";
|
||||||
|
|
||||||
|
ExecStartPre = "${pkgs.bash}/bin/bash -c '${pkgs.tigervnc}/bin/vncserver -kill ${display} > /dev/null 2>&1 || :'";
|
||||||
|
ExecStart = "${pkgs.xorg.xinit}/bin/xinit /home/${user}/.vnc/${xstartup} -- ${pkgs.tigervnc}/bin/Xvnc ${display} -rfbauth /home/${user}/.vnc/passwd -rfbport ${port}";
|
||||||
|
ExecStop = "${pkgs.tigervnc}/bin/vncserver -kill ${display}";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
}
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
windowManager.session = [{
|
windowManager.session = [{
|
||||||
name = "my-exwm";
|
name = "my-exwm";
|
||||||
start = ''
|
start = ''
|
||||||
|
systemctl --user import-environment PATH DISPLAY XAUTHORITY DESKTOP_SESSION XDG_CONFIG_DIRS XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID DBUS_SESSION_BUS_ADDRESS || true
|
||||||
|
dbus-update-activation-environment --systemd --all || true
|
||||||
${pkgs.myEmacs}/bin/emacs -l /home/benson/.emacs.d/init.el
|
${pkgs.myEmacs}/bin/emacs -l /home/benson/.emacs.d/init.el
|
||||||
'';
|
'';
|
||||||
}];
|
}];
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,12 @@
|
||||||
X11Forwarding yes
|
X11Forwarding yes
|
||||||
PasswordAuthentication yes
|
PasswordAuthentication yes
|
||||||
ChallengeResponseAuthentication yes
|
ChallengeResponseAuthentication yes
|
||||||
|
|
||||||
|
Match Address 100.121.66.46
|
||||||
|
X11UseLocalhost yes
|
||||||
|
X11Forwarding yes
|
||||||
|
PasswordAuthentication yes
|
||||||
|
ChallengeResponseAuthentication yes
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
inputs:
|
inputs: system:
|
||||||
[
|
[
|
||||||
|
inputs.emacs-overlay.overlays.default
|
||||||
|
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
mps-debug = prev.mps.overrideAttrs (old: {
|
mps-debug = prev.mps.overrideAttrs (old: {
|
||||||
pname = old.pname + "-debug";
|
pname = old.pname + "-debug";
|
||||||
|
|
@ -19,5 +21,34 @@ inputs:
|
||||||
treesit-grammars.with-all-grammars
|
treesit-grammars.with-all-grammars
|
||||||
mu4e
|
mu4e
|
||||||
]));
|
]));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(final: prev: {
|
||||||
|
unstable = import inputs.unstable {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
(final: prev: {
|
||||||
|
update = import inputs.update {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
# https://discourse.nixos.org/t/dolphin-does-not-have-mime-associations/48985/14
|
||||||
|
# https://github.com/rumboon/dolphin-overlay/blob/main/default.nix
|
||||||
|
(final: prev: {
|
||||||
|
kdePackages = prev.kdePackages.overrideScope (kfinal: kprev: {
|
||||||
|
dolphin = kprev.dolphin.overrideAttrs (oldAttrs: {
|
||||||
|
nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ prev.makeWrapper ];
|
||||||
|
postInstall = (oldAttrs.postInstall or "") + ''
|
||||||
|
wrapProgram $out/bin/dolphin \
|
||||||
|
--set XDG_CONFIG_DIRS "${prev.libsForQt5.kservice}/etc/xdg:$XDG_CONFIG_DIRS" \
|
||||||
|
--run "${kprev.kservice}/bin/kbuildsycoca6 --noincremental ${prev.libsForQt5.kservice}/etc/xdg/menus/applications.menu"
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
]
|
]
|
||||||
|
|
|
||||||
20
flake.lock
20
flake.lock
|
|
@ -8,11 +8,11 @@
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770053181,
|
"lastModified": 1774889817,
|
||||||
"narHash": "sha256-YxLkG+tzWSX98pRt+4frXkZHPrHpu7afZXe9gCJ+aEo=",
|
"narHash": "sha256-jTTsnHmkpP6Nls+zAeTkcXHYH5MQTwp9j0XojfhyRn4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "a4a3e2816dc1adff3fa15fcf01dd95bf556ec96f",
|
"rev": "4627a115d6169feff1518ed0b243734f6cce717d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -133,16 +133,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767313136,
|
"lastModified": 1774388614,
|
||||||
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
|
"narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
|
"rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-25.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
@ -176,11 +176,11 @@
|
||||||
},
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763966396,
|
"lastModified": 1770197578,
|
||||||
"narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=",
|
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5ae3b07d8d6527c42f17c876e404993199144b6a",
|
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
53
flake.nix
53
flake.nix
|
|
@ -19,20 +19,29 @@
|
||||||
url = "github:nix-community/NixOS-WSL/main";
|
url = "github:nix-community/NixOS-WSL/main";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# drift = {
|
||||||
|
# url = "github:phlx0/drift";
|
||||||
|
# inputs = {
|
||||||
|
# nixpkgs.follows = "nixpkgs";
|
||||||
|
# flake-utils.follows = "flake-utils";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, update, unstable, home-manager, nixos-hardware, emacs-overlay, ... }@inputs:
|
outputs = { self, nixpkgs, update, unstable, home-manager, nixos-hardware, emacs-overlay, ... }@inputs:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
overlays =
|
||||||
|
[emacs-overlay.overlays.default] ++
|
||||||
|
(import ./common/overlays.nix inputs system);
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system overlays;
|
||||||
overlays =
|
config.allowUnfree = true;
|
||||||
[emacs-overlay.overlays.default] ++
|
|
||||||
(import ./common/overlays.nix inputs);
|
|
||||||
};
|
};
|
||||||
mkSystem = h: {
|
mkSystem = h: {
|
||||||
"${h}" = nixpkgs.lib.nixosSystem {
|
"${h}" = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system pkgs;
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
(./. + "/hosts/${h}/configuration.nix")
|
(./. + "/hosts/${h}/configuration.nix")
|
||||||
|
|
@ -50,7 +59,7 @@
|
||||||
|
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
(pkgs.lib.foldr (a: b: a // b) {}
|
(pkgs.lib.foldr (a: b: a // b) {}
|
||||||
(map mkSystem ["NixDawn" "NixFrame"]))
|
(map mkSystem ["NixDawn" "NixFrame" "Ythotha"]))
|
||||||
|
|
||||||
// {
|
// {
|
||||||
NixWSL = nixpkgs.lib.nixosSystem {
|
NixWSL = nixpkgs.lib.nixosSystem {
|
||||||
|
|
@ -62,7 +71,7 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
NixGate = pkgs.lib.nixosSystem {
|
NixGate = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
|
|
@ -71,7 +80,7 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
NixSentinel = pkgs.lib.nixosSystem {
|
NixSentinel = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
|
|
@ -88,17 +97,32 @@
|
||||||
|
|
||||||
packages."${system}" = {
|
packages."${system}" = {
|
||||||
mps-debug = pkgs.mps-debug;
|
mps-debug = pkgs.mps-debug;
|
||||||
|
my-mu = pkgs.mu;
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells."${system}" = {
|
devShells."${system}" = rec {
|
||||||
emacs-min = pkgs.mkShell {
|
emacs-min = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
emacs
|
myEmacs
|
||||||
git
|
git
|
||||||
libtool
|
libtool
|
||||||
cmake gcc gnumake
|
cmake gcc gnumake
|
||||||
roboto-mono ripgrep
|
ripgrep
|
||||||
|
|
||||||
|
fontconfig
|
||||||
|
commit-mono
|
||||||
|
roboto-mono
|
||||||
];
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
export FONTCONFIG_FILE="${
|
||||||
|
pkgs.makeFontsConf {
|
||||||
|
fontDirectories = with pkgs; [
|
||||||
|
commit-mono
|
||||||
|
roboto-mono
|
||||||
|
];
|
||||||
|
}}"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
emacs-devel = pkgs.mkShell {
|
emacs-devel = pkgs.mkShell {
|
||||||
|
|
@ -123,6 +147,8 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
default = emacs-devel;
|
||||||
|
|
||||||
pymupdf = pkgs.mkShell {
|
pymupdf = pkgs.mkShell {
|
||||||
venvDir = "./venv";
|
venvDir = "./venv";
|
||||||
buildInputs = with pkgs.python312Packages; [
|
buildInputs = with pkgs.python312Packages; [
|
||||||
|
|
@ -148,6 +174,11 @@
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./home/users/work.nix
|
./home/users/work.nix
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
(pkgs.callPackage ./packages/drift.nix {})
|
||||||
|
];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
52
home/common/offlineimap.nix
Normal file
52
home/common/offlineimap.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.offlineimap ];
|
||||||
|
|
||||||
|
systemd.user.services.offlineimap = {
|
||||||
|
Unit = {
|
||||||
|
Description = "OfflineIMAP - mail synchronization";
|
||||||
|
After = [ "network-online.target" ];
|
||||||
|
Wants = [ "network-online.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.offlineimap}/bin/offlineimap -u quiet";
|
||||||
|
# Restart on failure with a delay
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 30;
|
||||||
|
# Timeout for long syncs
|
||||||
|
TimeoutStartSec = 300;
|
||||||
|
# Environment (optional, e.g. for GPG/pass-based passwords)
|
||||||
|
Environment = [
|
||||||
|
"PATH=${lib.makeBinPath [ pkgs.gnupg pkgs.pass ]}"
|
||||||
|
];
|
||||||
|
ExecStartPost = ''
|
||||||
|
${pkgs.myEmacs}/bin/emacsclient -e \
|
||||||
|
"(mu4e-update-mail-and-index mu4e-index-update-in-background)"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Timer to run periodically
|
||||||
|
systemd.user.timers.offlineimap = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Run OfflineIMAP periodically";
|
||||||
|
};
|
||||||
|
|
||||||
|
Timer = {
|
||||||
|
OnBootSec = "2min";
|
||||||
|
OnUnitActiveSec = "5min";
|
||||||
|
Unit = "offlineimap.service";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -37,10 +37,10 @@ in
|
||||||
source ${bash-drv}/bashrc.sh
|
source ${bash-drv}/bashrc.sh
|
||||||
|
|
||||||
# Need to figure out how to conditionally generate this
|
# Need to figure out how to conditionally generate this
|
||||||
if [[ -n $(which kubectl) ]]; then
|
# if [[ -n $(which kubectl) ]]; then
|
||||||
alias k=kubectl
|
# alias k=kubectl
|
||||||
source <(kubectl completion bash | sed s/kubectl/k/g)
|
# source <(kubectl completion bash | sed s/kubectl/k/g)
|
||||||
fi
|
# fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
../modules
|
../modules
|
||||||
../../submodules
|
../../submodules
|
||||||
|
../common/offlineimap.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = (lib.mkIf (!config.submoduleSupport.enable) [
|
nixpkgs.overlays = (lib.mkIf (!config.submoduleSupport.enable) [
|
||||||
|
|
@ -11,6 +12,8 @@
|
||||||
|
|
||||||
my.beets-config.enable = true;
|
my.beets-config.enable = true;
|
||||||
my.tmux-config.enable = true;
|
my.tmux-config.enable = true;
|
||||||
|
my.bash-config.enable = true;
|
||||||
|
my.wezterm-config.enable = true;
|
||||||
|
|
||||||
my.flakeLocation = if (builtins.hasAttr "osConfig" args)
|
my.flakeLocation = if (builtins.hasAttr "osConfig" args)
|
||||||
then args.osConfig.my.flakeLocation
|
then args.osConfig.my.flakeLocation
|
||||||
|
|
@ -29,8 +32,6 @@
|
||||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
});
|
});
|
||||||
|
|
||||||
my.bash-config.enable = true;
|
|
||||||
|
|
||||||
# This value determines the Home Manager release that your configuration is
|
# This value determines the Home Manager release that your configuration is
|
||||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||||
# introduces backwards incompatible changes.
|
# introduces backwards incompatible changes.
|
||||||
|
|
@ -55,6 +56,7 @@
|
||||||
git
|
git
|
||||||
|
|
||||||
cmake gnumake libtool gcc
|
cmake gnumake libtool gcc
|
||||||
|
claude-code
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
|
@ -142,11 +144,5 @@
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
kdeconnect.enable = true;
|
kdeconnect.enable = true;
|
||||||
mbsync = {
|
|
||||||
enable = true;
|
|
||||||
frequency = "*:0/10";
|
|
||||||
verbose = true;
|
|
||||||
postExec = "${pkgs.mu}/bin/mu index";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
nix = (lib.mkIf (!config.submoduleSupport.enable) {
|
nix = (lib.mkIf (!config.submoduleSupport.enable) {
|
||||||
package = pkgs.nix;
|
package = pkgs.nix;
|
||||||
settings.experimental-features = "nix-command flakes";
|
settings.experimental-features = "nix-command flakes";
|
||||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
# registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
});
|
});
|
||||||
|
|
||||||
# This value determines the Home Manager release that your configuration is
|
# This value determines the Home Manager release that your configuration is
|
||||||
|
|
@ -67,6 +67,14 @@
|
||||||
tmux
|
tmux
|
||||||
|
|
||||||
mold
|
mold
|
||||||
|
|
||||||
|
aider-chat
|
||||||
|
|
||||||
|
rr
|
||||||
|
|
||||||
|
unstable.isync
|
||||||
|
|
||||||
|
mu
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
|
@ -108,9 +116,11 @@
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Benson Chu";
|
settings = {
|
||||||
userEmail = "b-chu1@ti.com";
|
user = {
|
||||||
extraConfig = {
|
name = "Benson Chu";
|
||||||
|
email = "b-chu1@ti.com";
|
||||||
|
};
|
||||||
core = {
|
core = {
|
||||||
editor = "emacsclient";
|
editor = "emacsclient";
|
||||||
};
|
};
|
||||||
|
|
@ -128,8 +138,13 @@
|
||||||
services = {
|
services = {
|
||||||
mbsync = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
frequency = "*:0/10";
|
frequency = "*:0/5";
|
||||||
verbose = true;
|
verbose = true;
|
||||||
|
package = pkgs.isync;
|
||||||
|
postExec = ''
|
||||||
|
${pkgs.myEmacs}/bin/emacsclient -e \
|
||||||
|
"(mu4e-update-mail-and-index mu4e-index-update-in-background)"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
69
hosts/Ythotha/configuration.nix
Normal file
69
hosts/Ythotha/configuration.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../common/configuration.nix
|
||||||
|
../../common/user-facing.nix
|
||||||
|
../../common/development-machine.nix
|
||||||
|
../../common/moms-house
|
||||||
|
../../common/flake-location.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
my.flakeLocation = "/home/benson/nixos-config/";
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
services.xserver.windowManager.i3.enable = true;
|
||||||
|
|
||||||
|
# Make a VNC server available
|
||||||
|
systemd.services.vncserver_emacs = (import ../../common/exprs/make-vncserver.nix pkgs "benson" ":1" "5901" "xstartup");
|
||||||
|
systemd.services.vncserver_i3 = (import ../../common/exprs/make-vncserver.nix pkgs "benson" ":2" "5902" "i3");
|
||||||
|
networking = {
|
||||||
|
hostName = "Ythotha";
|
||||||
|
interfaces = {
|
||||||
|
eno2 = {
|
||||||
|
wakeOnLan.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
firewall = {
|
||||||
|
# VNC Servers
|
||||||
|
allowedTCPPorts = [ 5901 5902 ];
|
||||||
|
# Wake-On-LAN
|
||||||
|
allowedUDPPorts = [ 9 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.benson = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Benson Chu";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
|
packages = with pkgs; [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Install firefox.
|
||||||
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
cmatrix
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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.11"; # Did you read the comment?
|
||||||
|
|
||||||
|
}
|
||||||
41
hosts/Ythotha/hardware-configuration.nix
Normal file
41
hosts/Ythotha/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/0dc5588c-97af-478a-8a6c-66ef8a99b699";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/3789-E85B";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/35c500a7-5b1e-4ba6-a1ad-1397b8c6d79a"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eno2.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
34
packages/drift.nix
Normal file
34
packages/drift.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
fetchFromGitHub
|
||||||
|
}:
|
||||||
|
pkgs.buildGoModule rec {
|
||||||
|
pname = "drift";
|
||||||
|
version = "dev";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "phlx0";
|
||||||
|
repo = "drift";
|
||||||
|
rev = "main";
|
||||||
|
hash = "sha256-QfxT7fhYeu70ZJnbJ3/LaBPgBzHbjwhQ0bPIMeR46/o=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = "sha256-FsNa9qp2MnPk1onv/O13mFi+82yP7D4LdILZsNzHs+4=";
|
||||||
|
|
||||||
|
# CGO_ENABLED = 0;
|
||||||
|
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X main.version=${version}"
|
||||||
|
"-X main.commit=none"
|
||||||
|
"-X main.date=unknown"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with pkgs.lib; {
|
||||||
|
description = "Terminal screensaver and ambient visualiser";
|
||||||
|
homepage = "https://github.com/phlx0/drift";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [ ];
|
||||||
|
mainProgram = "drift";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2c8225b986dfd503cc3e5ce82d8105ccd2a57131
|
Subproject commit e576ce1278aacdaa3d0307e30128ef56c20ae67e
|
||||||
|
|
@ -3,6 +3,7 @@ let
|
||||||
beets-cfg = config.my.beets-config;
|
beets-cfg = config.my.beets-config;
|
||||||
tmux-cfg = config.my.tmux-config;
|
tmux-cfg = config.my.tmux-config;
|
||||||
work-bash-cfg = config.my.work-bash-config;
|
work-bash-cfg = config.my.work-bash-config;
|
||||||
|
wezterm-cfg = config.my.wezterm-config;
|
||||||
mkIfFlakeLoc = condition: errorMsg: value:
|
mkIfFlakeLoc = condition: errorMsg: value:
|
||||||
(lib.mkIf (condition &&
|
(lib.mkIf (condition &&
|
||||||
!(config.my.flakeLocation == null &&
|
!(config.my.flakeLocation == null &&
|
||||||
|
|
@ -18,6 +19,7 @@ in
|
||||||
type = lib.types.nullOr lib.types.path;
|
type = lib.types.nullOr lib.types.path;
|
||||||
};
|
};
|
||||||
my.beets-config.enable = lib.mkEnableOption "Enable beets configuration file";
|
my.beets-config.enable = lib.mkEnableOption "Enable beets configuration file";
|
||||||
|
my.wezterm-config.enable = lib.mkEnableOption "Enable wezterm configuration file";
|
||||||
my.tmux-config.enable = lib.mkEnableOption "Enable tmux configuration file";
|
my.tmux-config.enable = lib.mkEnableOption "Enable tmux configuration file";
|
||||||
my.work-bash-config.enable = lib.mkEnableOption "Enable work bash configurations";
|
my.work-bash-config.enable = lib.mkEnableOption "Enable work bash configurations";
|
||||||
};
|
};
|
||||||
|
|
@ -66,7 +68,7 @@ in
|
||||||
"${flakeSubmodules}/tmux-config/tmux.conf";
|
"${flakeSubmodules}/tmux-config/tmux.conf";
|
||||||
});
|
});
|
||||||
|
|
||||||
"wezterm/" = (mkIfFlakeLoc beets-cfg.enable
|
"wezterm/" = (mkIfFlakeLoc wezterm-cfg.enable
|
||||||
"I won't symlink wezterm config folder into place"
|
"I won't symlink wezterm config folder into place"
|
||||||
{
|
{
|
||||||
source = config.lib.file.mkOutOfStoreSymlink
|
source = config.lib.file.mkOutOfStoreSymlink
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue