2020-07-06 16:32:41 +02:00
|
|
|
{ pkgs, lib, config, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2020-04-05 21:26:16 +02:00
|
|
|
let
|
|
|
|
laptopKeyboardId = "25";
|
|
|
|
in {
|
2020-05-26 16:43:19 +02:00
|
|
|
imports = [
|
|
|
|
../platforms/linux.nix
|
|
|
|
../modules/common.nix
|
|
|
|
../modules/games.nix
|
2020-05-26 16:29:39 +02:00
|
|
|
../modules/rtlsdr.nix
|
2020-09-12 21:14:16 +02:00
|
|
|
../modules/ptt.nix
|
2020-05-26 16:43:19 +02:00
|
|
|
];
|
|
|
|
|
2020-05-26 17:27:54 +02:00
|
|
|
# for when hacking
|
|
|
|
programs.home-manager.path = "/home/grfn/code/home-manager";
|
2020-07-06 16:32:41 +02:00
|
|
|
programs.home-manager.enable = true;
|
|
|
|
home.stateVersion = "19.09";
|
2020-05-26 17:27:54 +02:00
|
|
|
|
2020-03-29 18:51:55 +02:00
|
|
|
system.machine = {
|
|
|
|
wirelessInterface = "wlp59s0";
|
|
|
|
i3FontSize = 9;
|
|
|
|
};
|
2020-04-05 21:26:16 +02:00
|
|
|
|
|
|
|
systemd.user.services.laptop-keyboard = {
|
|
|
|
Unit = {
|
|
|
|
Description = "Swap caps+escape and alt+super, but only on the built-in laptop keyboard";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
|
|
|
|
Service = {
|
|
|
|
Type = "oneshot";
|
|
|
|
RemainAfterExit = true;
|
|
|
|
ExecStart = (
|
|
|
|
"${pkgs.xorg.setxkbmap}/bin/setxkbmap "
|
|
|
|
+ "-device ${laptopKeyboardId} "
|
|
|
|
+ "-option caps:swapescape "
|
|
|
|
+ "-option compose:ralt "
|
|
|
|
+ "-option altwin:swap_alt_win"
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
2020-07-23 17:23:14 +02:00
|
|
|
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
steam
|
|
|
|
xorg.libxcb
|
2020-10-23 17:11:11 +02:00
|
|
|
(writeShellScriptBin "rebuild-mugwump" ''
|
|
|
|
set -eo pipefail
|
|
|
|
cd ~/code/depot
|
2020-11-30 00:54:00 +01:00
|
|
|
nix build -f . users.glittershark.system.system.mugwumpSystem -o /tmp/mugwump
|
2020-10-23 17:11:11 +02:00
|
|
|
nix copy -f . users.glittershark.system.system.mugwumpSystem \
|
|
|
|
--to ssh://mugwump
|
2020-11-30 00:54:00 +01:00
|
|
|
system=$(readlink -ef /tmp/mugwump)
|
2020-10-23 17:11:11 +02:00
|
|
|
ssh mugwump sudo nix-env -p /nix/var/nix/profiles/system --set $system
|
|
|
|
ssh mugwump sudo $system/bin/switch-to-configuration switch
|
|
|
|
'')
|
2020-07-23 17:23:14 +02:00
|
|
|
];
|
2020-03-29 18:51:55 +02:00
|
|
|
}
|