2021-12-16 00:40:44 +01:00
|
|
|
{ depot, pkgs, lib, ... }:
|
2021-12-24 00:30:31 +01:00
|
|
|
{ ... }:
|
2021-12-16 00:40:44 +01:00
|
|
|
|
|
|
|
let
|
2021-12-25 00:44:36 +01:00
|
|
|
inherit (depot.users) wpcarro;
|
2022-07-05 18:43:52 +02:00
|
|
|
inherit (depot.users.wpcarro.lib) usermod;
|
2022-07-01 19:06:37 +02:00
|
|
|
|
2022-01-28 07:21:37 +01:00
|
|
|
wpcarrosEmacs = wpcarro.emacs.nixos {
|
|
|
|
load = [ ./marcus.el ];
|
|
|
|
};
|
2021-12-24 18:56:27 +01:00
|
|
|
|
|
|
|
quasselClient = pkgs.quassel.override {
|
|
|
|
client = true;
|
|
|
|
enableDaemon = false;
|
|
|
|
monolithic = false;
|
|
|
|
};
|
2022-01-30 17:06:58 +01:00
|
|
|
in
|
|
|
|
{
|
2021-12-16 06:59:14 +01:00
|
|
|
imports = [
|
2022-05-26 14:47:30 +02:00
|
|
|
(depot.path.origSrc + "/users/wpcarro/nixos/marcus/hardware.nix")
|
|
|
|
(pkgs.home-manager.src + "/nixos")
|
2022-07-01 19:06:37 +02:00
|
|
|
(usermod "laptop.nix")
|
2021-12-16 06:59:14 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
# Use the TVL binary cache
|
|
|
|
tvl.cache.enable = true;
|
2021-12-16 00:40:44 +01:00
|
|
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
# The global useDHCP flag is deprecated, therefore explicitly set to false
|
|
|
|
# here. Per-interface useDHCP will be mandatory in the future, so this
|
|
|
|
# generated config replicates the default behaviour.
|
|
|
|
useDHCP = false;
|
|
|
|
hostName = "marcus";
|
|
|
|
networkmanager.enable = true;
|
|
|
|
interfaces.enp0s31f6.useDHCP = true;
|
|
|
|
interfaces.wlp0s20f3.useDHCP = true;
|
|
|
|
};
|
|
|
|
|
2022-01-31 22:56:58 +01:00
|
|
|
# Schedule daily reboots.
|
|
|
|
systemd.timers.auto-reboot = {
|
|
|
|
wantedBy = [ "timers.target" ];
|
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "*-*-* 03:00:00";
|
|
|
|
Unit = "reboot.target";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-12-25 03:11:24 +01:00
|
|
|
services = wpcarro.common.services // {
|
2022-08-06 22:47:30 +02:00
|
|
|
# Enable the Tailscale daemon to connect to work and personal Tailnet.
|
|
|
|
tailscale.enable = true;
|
|
|
|
|
2021-12-25 16:24:55 +01:00
|
|
|
tzupdate.enable = true;
|
2021-12-25 03:16:00 +01:00
|
|
|
|
2022-01-31 22:57:27 +01:00
|
|
|
depot.auto-deploy = {
|
|
|
|
enable = true;
|
|
|
|
interval = "1d";
|
|
|
|
};
|
|
|
|
|
2021-12-16 06:59:14 +01:00
|
|
|
xserver = {
|
2021-12-16 00:40:44 +01:00
|
|
|
enable = true;
|
2021-12-16 06:59:14 +01:00
|
|
|
libinput = {
|
|
|
|
enable = true;
|
|
|
|
touchpad.naturalScrolling = false;
|
|
|
|
touchpad.tapping = false;
|
|
|
|
};
|
|
|
|
layout = "us";
|
|
|
|
xkbOptions = "caps:escape";
|
|
|
|
displayManager = {
|
|
|
|
# Give EXWM permission to control the session (from tazjin's setup).
|
|
|
|
sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +SI:localhost:$USER";
|
|
|
|
lightdm.enable = true;
|
|
|
|
};
|
2021-12-23 18:29:49 +01:00
|
|
|
extraConfig = ''
|
|
|
|
Section "InputClass"
|
|
|
|
Identifier "Touchscreen catchall"
|
|
|
|
MatchIsTouchscreen "on"
|
|
|
|
Option "Ignore" "on"
|
|
|
|
EndSection
|
|
|
|
'';
|
2021-12-16 06:59:14 +01:00
|
|
|
windowManager.session = lib.singleton {
|
|
|
|
name = "exwm";
|
2021-12-24 00:30:31 +01:00
|
|
|
start = "${wpcarrosEmacs}/bin/wpcarros-emacs";
|
2021-12-16 06:59:14 +01:00
|
|
|
};
|
2021-12-16 00:40:44 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable sound.
|
|
|
|
sound.enable = true;
|
|
|
|
hardware.pulseaudio.enable = true;
|
|
|
|
|
|
|
|
users.mutableUsers = true;
|
|
|
|
users.users.wpcarro = {
|
|
|
|
isNormalUser = true;
|
2021-12-16 16:27:00 +01:00
|
|
|
extraGroups = [
|
2021-12-19 14:11:44 +01:00
|
|
|
"networkmanager"
|
2021-12-16 16:27:00 +01:00
|
|
|
"wheel"
|
|
|
|
"video" # needed to control the screen brightness
|
|
|
|
];
|
2021-12-16 00:40:44 +01:00
|
|
|
shell = pkgs.fish;
|
|
|
|
};
|
|
|
|
|
2021-12-19 14:09:52 +01:00
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
2021-12-16 00:40:44 +01:00
|
|
|
fonts = {
|
|
|
|
fonts = with pkgs; [
|
|
|
|
jetbrains-mono
|
|
|
|
];
|
|
|
|
|
|
|
|
fontconfig = {
|
|
|
|
defaultFonts = {
|
|
|
|
monospace = [ "JetBrains Mono" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-07-01 19:06:37 +02:00
|
|
|
programs = wpcarro.common.programs;
|
2021-12-16 00:40:44 +01:00
|
|
|
|
2021-12-20 03:58:40 +01:00
|
|
|
environment.variables = {
|
|
|
|
EDITOR = "emacsclient";
|
|
|
|
ALTERNATE_EDITOR = "emacs -q -nw";
|
|
|
|
VISUAL = "emacsclient";
|
|
|
|
};
|
|
|
|
|
2021-12-28 23:31:28 +01:00
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.users.wpcarro = { config, lib, ... }: {
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
userName = "William Carroll";
|
|
|
|
userEmail = "wpcarro@gmail.com";
|
|
|
|
extraConfig = {
|
|
|
|
pull.rebase = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.picom = {
|
|
|
|
enable = true;
|
|
|
|
vSync = true;
|
|
|
|
backend = "glx";
|
|
|
|
};
|
|
|
|
|
2022-02-01 08:45:30 +01:00
|
|
|
services.redshift = {
|
|
|
|
enable = true;
|
|
|
|
latitude = 37.4223931;
|
|
|
|
longitude = -122.0864016;
|
|
|
|
};
|
|
|
|
|
2021-12-28 23:31:28 +01:00
|
|
|
services.dunst.enable = true;
|
|
|
|
xdg.configFile."dunst/dunstrc" = {
|
|
|
|
source = wpcarro.dotfiles.dunstrc;
|
|
|
|
onChange = ''
|
|
|
|
${pkgs.procps}/bin/pkill -u "$USER" ''${VERBOSE+-e} dunst || true
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.startServices = true;
|
|
|
|
};
|
|
|
|
|
2021-12-25 00:44:36 +01:00
|
|
|
environment.systemPackages =
|
|
|
|
wpcarro.common.shell-utils ++
|
|
|
|
(with pkgs; [
|
|
|
|
alacritty
|
|
|
|
firefox
|
|
|
|
pavucontrol
|
|
|
|
quasselClient
|
|
|
|
tdesktop
|
|
|
|
weechat
|
|
|
|
wpcarrosEmacs
|
|
|
|
xsecurelock
|
|
|
|
]);
|
2021-12-16 00:40:44 +01:00
|
|
|
|
|
|
|
system.stateVersion = "21.11";
|
|
|
|
}
|