home-manager: refactor, split off emacs and lumi
parent
1959d85536
commit
e0ee6c7eb9
|
@ -1,11 +1,6 @@
|
|||
{ pkgs, options, ... }:
|
||||
let
|
||||
bin = pkgs.callPackage /home/yorick/dotfiles/bin { };
|
||||
font = {
|
||||
__toString = self: "${self.name} ${self.size}";
|
||||
name = "DejaVu Sans Mono";
|
||||
size = "11";
|
||||
};
|
||||
fixed_slack = pkgs.slack.override {
|
||||
xdg-utils = pkgs.xdg-utils.overrideAttrs (o: {
|
||||
buildInputs = o.buildInputs ++ [ pkgs.makeWrapper ];
|
||||
|
@ -14,11 +9,16 @@ let
|
|||
'';
|
||||
});
|
||||
};
|
||||
in
|
||||
{
|
||||
bg = {
|
||||
xps9360 = "/home/yorick/wp/thorns__4k__by_kasperja-daqi5g7.jpg fill";
|
||||
desktop = "/home/yorick/wp/beyond-4k-2560×1440.jpg fill";
|
||||
x11carbon = "/home/yorick/wp/lawn_forest_mountains_144578_3840x2400.jpg fill";
|
||||
};
|
||||
in {
|
||||
# TODO: waybar module from home-manager
|
||||
xdg.configFile."waybar/config" = {
|
||||
text = builtins.toJSON (builtins.fromTOML (builtins.readFile ./waybar.toml));
|
||||
text =
|
||||
builtins.toJSON (builtins.fromTOML (builtins.readFile ./waybar.toml));
|
||||
onChange = "systemctl --user restart waybar";
|
||||
};
|
||||
programs.waybar = {
|
||||
|
@ -27,6 +27,7 @@ in
|
|||
systemd.enable = true;
|
||||
};
|
||||
programs.mako.enable = true;
|
||||
programs.mako.defaultTimeout = 60 * 1000; # ms
|
||||
services = {
|
||||
gpg-agent.extraConfig = ''
|
||||
pinentry-program ${pkgs.pinentry_gnome}/bin/pinentry-gnome3
|
||||
|
@ -35,14 +36,15 @@ in
|
|||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config = {
|
||||
bars = [
|
||||
];
|
||||
bars = [ ];
|
||||
gaps.inner = 5;
|
||||
modifier = "Mod4";
|
||||
window.hideEdgeBorders = "smart";
|
||||
fonts = [ (toString font) ];
|
||||
fonts.names = [ "DejaVu Sans Mono" ];
|
||||
fonts.size = 11.0;
|
||||
window.border = 2;
|
||||
floating.modifier = "Mod4";
|
||||
focus.newWindow = "urgent";
|
||||
keybindings = with pkgs;
|
||||
(builtins.head (builtins.head
|
||||
options.wayland.windowManager.sway.config.type.getSubModules).imports).options.keybindings.default
|
||||
|
@ -79,7 +81,7 @@ in
|
|||
"XF86AudioLowerVolume" = exec alsaUtils "amixer set Master 1%-";
|
||||
"XF86AudioRaiseVolume" = exec alsaUtils "amixer set Master 1%+";
|
||||
"XF86AudioMute" = exec alsaUtils "amixer set Master toggle";
|
||||
"${mod}+Shift+s" = exec bin.screenshot_public "screenshot_public";
|
||||
"${mod}+Shift+s" = exec bin.screenshot_public "screenshot_public >> ~/screenshot-public.log";
|
||||
"Print" = exec bin.screenshot_public "screenshot_public";
|
||||
"${mod}+Shift+t" =
|
||||
"exec --no-startup-id /home/yorick/dotfiles/bin/toggle_solarized.sh";
|
||||
|
@ -92,56 +94,53 @@ in
|
|||
"--locked ${mod}+bracketright" =
|
||||
"exec --no-startup-id /home/yorick/dotfiles/bin/sunplate.sh 1";
|
||||
});
|
||||
workspaceAutoBackAndForth = true;
|
||||
|
||||
# xps9360
|
||||
input."1267:8400:ELAN_Touchscreen".map_to_output = "eDP-1";
|
||||
input."1267:12679:ELAN0672:00_04F3:3187_Touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
tap = "enabled";
|
||||
dwt = "enabled";
|
||||
};
|
||||
output."Sharp Corporation 0x144A 0x00000000".bg = bg.xps9360;
|
||||
|
||||
# desk
|
||||
output."Unknown 0x00000000" = {
|
||||
position = "0 0";
|
||||
bg = bg.desktop;
|
||||
};
|
||||
output."BenQ Corporation BenQ GW2765 36H03689019" = {
|
||||
position = "2560 0";
|
||||
bg = bg.desktop;
|
||||
};
|
||||
|
||||
# x11 carbon
|
||||
input."2:10:TPPS/2_Elan_TrackPoint".accel_profile = "flat";
|
||||
output."Unknown 0x1403 0x00000000".bg = bg.x11carbon;
|
||||
input."1739:30383:DLL075B:01_06CB:76AF_Touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
tap = "enabled";
|
||||
dwt = "enabled";
|
||||
};
|
||||
|
||||
# generic
|
||||
input."1:1:AT_Translated_Set_2_keyboard".xkb_options = "caps:escape";
|
||||
input."1133:16498:Logitech_MX_Anywhere_2".left_handed = "enabled";
|
||||
input."1133:45087:MX_Anywhere_2_Mouse".left_handed = "enabled";
|
||||
window.commands = [{
|
||||
criteria.app_id = "ala-fzf";
|
||||
command = "floating enable";
|
||||
}];
|
||||
startup = [
|
||||
{ command = "mako"; }
|
||||
{
|
||||
command = ''
|
||||
swayidle timeout 300 'swaymsg "output * dpms off"; swaylock' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock' '';
|
||||
}
|
||||
];
|
||||
};
|
||||
systemdIntegration = true;
|
||||
extraConfig = ''
|
||||
workspace_auto_back_and_forth yes
|
||||
input "1267:8400:ELAN_Touchscreen" {
|
||||
map_to_output eDP-1
|
||||
}
|
||||
output "Unknown 0x00000000" {
|
||||
position 0 0
|
||||
bg "/home/yorick/wp/beyond-4k-2560×1440.jpg" fill
|
||||
}
|
||||
output "BenQ Corporation BenQ GW2765 36H03689019" {
|
||||
position 2560 0
|
||||
bg "/home/yorick/wp/beyond-4k-2560×1440.jpg" fill
|
||||
}
|
||||
output "Sharp Corporation 0x144A 0x00000000" {
|
||||
bg "/home/yorick/wp/thorns__4k__by_kasperja-daqi5g7.jpg" fill
|
||||
}
|
||||
output "Unknown 0x1403 0x00000000" {
|
||||
bg "/home/yorick/wp/lawn_forest_mountains_144578_3840x2400.jpg" fill
|
||||
}
|
||||
output "eDP-1" {
|
||||
# disable
|
||||
}
|
||||
input "1267:12679:ELAN0672:00_04F3:3187_Touchpad" {
|
||||
natural_scroll enabled
|
||||
tap enabled
|
||||
dwt enabled
|
||||
# middle_emulation enabled
|
||||
}
|
||||
input '2:10:TPPS/2_Elan_TrackPoint' accel_profile flat
|
||||
input "1739:30383:DLL075B:01_06CB:76AF_Touchpad" {
|
||||
natural_scroll enabled
|
||||
tap enabled
|
||||
dwt enabled
|
||||
# middle_emulation enabled
|
||||
}
|
||||
input "1:1:AT_Translated_Set_2_keyboard" {
|
||||
xkb_options caps:escape
|
||||
}
|
||||
input "1133:16498:Logitech_MX_Anywhere_2" {
|
||||
left_handed enabled
|
||||
}
|
||||
input "1133:45087:MX_Anywhere_2_Mouse" {
|
||||
left_handed enabled
|
||||
}
|
||||
for_window [app_id="ala-fzf"] floating enable
|
||||
exec mako
|
||||
exec swayidle timeout 300 'swaymsg "output * dpms off"; swaylock' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock'
|
||||
'';
|
||||
};
|
||||
|
||||
# programs.firefox = {
|
||||
|
@ -190,7 +189,9 @@ in
|
|||
light
|
||||
# dropbox # really?
|
||||
# xorg.xrdb
|
||||
siji fira-mono playerctl
|
||||
siji
|
||||
fira-mono
|
||||
playerctl
|
||||
mosquitto
|
||||
#hs.arbtt
|
||||
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
{ lib, config, options, pkgs, ... }: {
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacsPgtkGcc;
|
||||
extraPackages = _:
|
||||
let epkgs = pkgs.emacsPackagesFor pkgs.emacsPgtkGcc;
|
||||
in (with epkgs.melpaPackages; [
|
||||
reason-mode
|
||||
evil
|
||||
counsel
|
||||
ivy
|
||||
ivy-hydra
|
||||
swiper
|
||||
magit
|
||||
forge
|
||||
avy
|
||||
lsp-mode
|
||||
(lsp-ui.overrideAttrs (o: {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "emacs-lsp";
|
||||
repo = "lsp-ui";
|
||||
rev = "240a7de26400cf8b13312c3f9acf7ce653bdaa8a";
|
||||
sha256 = "1zscdjlnkx43i4kw2qmlvji23xfpw7n5y4v99ld33205dg905fsy";
|
||||
};
|
||||
}))
|
||||
lsp-haskell
|
||||
flycheck
|
||||
lsp-ivy
|
||||
]) ++ (with epkgs.melpaPackages; [
|
||||
epkgs.undo-tree
|
||||
epkgs.notmuch
|
||||
epkgs.rust-mode
|
||||
pkgs.emacsPackagesNg.crdt
|
||||
company
|
||||
projectile
|
||||
counsel-projectile
|
||||
ggtags
|
||||
use-package
|
||||
org-bullets
|
||||
solarized-theme
|
||||
evil-leader
|
||||
evil-surround # evil-magit
|
||||
epkgs.evil-goggles
|
||||
epkgs.ox-mediawiki
|
||||
nix-buffer
|
||||
which-key
|
||||
git-gutter-fringe
|
||||
all-the-icons
|
||||
epkgs.org-cliplink
|
||||
pandoc-mode
|
||||
markdown-mode
|
||||
#interleave
|
||||
org-ref
|
||||
haskell-mode
|
||||
request # intero
|
||||
weechat
|
||||
s
|
||||
elixir-mode
|
||||
htmlize
|
||||
linum-relative
|
||||
terraform-mode
|
||||
direnv
|
||||
vue-mode
|
||||
solarized-theme
|
||||
nix-mode
|
||||
]);
|
||||
};
|
||||
|
||||
# todo: precompile?
|
||||
home.file.".emacs.d/init.el".source = ../emacs/init.el;
|
||||
home.file.".emacs.d/early-init.el".source = ../emacs/early-init.el;
|
||||
}
|
|
@ -10,7 +10,7 @@ let
|
|||
HOME = "/build";
|
||||
} "${pkgs.thefuck}/bin/thefuck -a > $out";
|
||||
in {
|
||||
imports = [ ./desktop.nix ];
|
||||
imports = [ ./desktop.nix ./emacs.nix ./lumi.nix ];
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
inherit (import /home/yorick/dotfiles/config.nix) overlays;
|
||||
|
@ -35,72 +35,6 @@ in {
|
|||
enable = true;
|
||||
path = toString /home/yorick/dotfiles;
|
||||
};
|
||||
emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacsPgtkGcc;
|
||||
extraPackages = _:
|
||||
let epkgs = pkgs.emacsPackagesFor pkgs.emacsPgtkGcc;
|
||||
in (with epkgs.melpaPackages; [
|
||||
reason-mode
|
||||
evil
|
||||
counsel
|
||||
ivy
|
||||
ivy-hydra
|
||||
swiper
|
||||
magit
|
||||
forge
|
||||
avy
|
||||
lsp-mode
|
||||
(lsp-ui.overrideAttrs (o: {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "emacs-lsp";
|
||||
repo = "lsp-ui";
|
||||
rev = "240a7de26400cf8b13312c3f9acf7ce653bdaa8a";
|
||||
sha256 = "1zscdjlnkx43i4kw2qmlvji23xfpw7n5y4v99ld33205dg905fsy";
|
||||
};
|
||||
}))
|
||||
lsp-haskell
|
||||
flycheck
|
||||
lsp-ivy
|
||||
]) ++ (with epkgs.melpaPackages; [
|
||||
epkgs.undo-tree
|
||||
epkgs.notmuch
|
||||
epkgs.rust-mode
|
||||
pkgs.emacsPackagesNg.crdt
|
||||
company
|
||||
projectile
|
||||
counsel-projectile
|
||||
ggtags
|
||||
use-package
|
||||
org-bullets
|
||||
solarized-theme
|
||||
evil-leader
|
||||
evil-surround # evil-magit
|
||||
epkgs.evil-goggles
|
||||
epkgs.ox-mediawiki
|
||||
nix-buffer
|
||||
which-key
|
||||
git-gutter-fringe
|
||||
all-the-icons
|
||||
epkgs.org-cliplink
|
||||
pandoc-mode
|
||||
markdown-mode
|
||||
#interleave
|
||||
org-ref
|
||||
haskell-mode
|
||||
request # intero
|
||||
weechat
|
||||
s
|
||||
elixir-mode
|
||||
htmlize
|
||||
linum-relative
|
||||
terraform-mode
|
||||
direnv
|
||||
vue-mode
|
||||
solarized-theme
|
||||
nix-mode
|
||||
]);
|
||||
};
|
||||
git = {
|
||||
#lfs.enable = true;
|
||||
enable = true;
|
||||
|
@ -113,9 +47,6 @@ in {
|
|||
extraConfig.pull.ff = "only";
|
||||
extraConfig."includeIf \"gitdir:~/serokell/\"".path =
|
||||
"~/serokell/.gitconfig";
|
||||
# ignores = [
|
||||
# "*.~undo-tree~"
|
||||
# ];
|
||||
aliases = {
|
||||
lg =
|
||||
"log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
|
||||
|
@ -138,18 +69,7 @@ in {
|
|||
compression = true;
|
||||
serverAliveInterval = 120;
|
||||
controlMaster = "auto";
|
||||
matchBlocks = let
|
||||
lumigod = hostname: {
|
||||
inherit hostname;
|
||||
port = 2233;
|
||||
user = "yorick.van.pelt";
|
||||
};
|
||||
lumivpn = {
|
||||
user = "yorick.van.pelt";
|
||||
# verified by wireguard key
|
||||
extraOptions.StrictHostKeyChecking = "no";
|
||||
};
|
||||
in rec {
|
||||
matchBlocks = {
|
||||
"pub.yori.cc" = {
|
||||
user = "public";
|
||||
identityFile = "~/.ssh/id_rsa_pub";
|
||||
|
@ -159,31 +79,6 @@ in {
|
|||
hostname = "karpenoktem.nl";
|
||||
port = 33933;
|
||||
};
|
||||
athena = {
|
||||
hostname = "athena.lumi.guide";
|
||||
user = "yorick.van.pelt";
|
||||
};
|
||||
rpibuild3 = {
|
||||
hostname = "10.110.0.3";
|
||||
user = "yorick.van.pelt";
|
||||
port = 4222;
|
||||
};
|
||||
rpibuild4 = {
|
||||
hostname = "rpibuild4.lumi.guide";
|
||||
user = "yorick.van.pelt";
|
||||
port = 4222;
|
||||
};
|
||||
styx = lumigod "10.110.0.1";
|
||||
"*.lumi.guide" = { user = "yorick.van.pelt"; };
|
||||
zeus = lumigod "zeus.lumi.guide";
|
||||
ponos = lumigod "ponos.lumi.guide";
|
||||
medusa = lumigod "lumi.guide";
|
||||
# signs
|
||||
"10.108.0.*" = lumivpn // { port = 4222; };
|
||||
"10.109.0.*" = lumivpn;
|
||||
"10.110.0.*" = lumivpn // { port = 2233; };
|
||||
"10.111.0.*" = lumivpn;
|
||||
"192.168.42.*" = { user = "yorick.van.pelt"; };
|
||||
"karpenoktem.nl" = { user = "root"; };
|
||||
sankhara = {
|
||||
user = "infra";
|
||||
|
@ -202,8 +97,6 @@ in {
|
|||
extraConfig = ''
|
||||
Match host "192.168.*.*" exec "ip route get %h | grep -v -q via"
|
||||
Compression no
|
||||
Match host "192.168.42.*" exec "ip route get %h | grep -q via"
|
||||
ProxyJump athena
|
||||
'';
|
||||
};
|
||||
fish = {
|
||||
|
@ -218,7 +111,6 @@ in {
|
|||
nb = "nix build";
|
||||
nl = "nix log";
|
||||
g = "git";
|
||||
lumi = "pushd ~/engineering/lumi; cached-nix-shell; popd";
|
||||
bc = "bluetoothctl connect 94:DB:56:79:7D:86";
|
||||
bd = "bluetoothctl disconnect 94:DB:56:79:7D:86";
|
||||
};
|
||||
|
@ -245,11 +137,6 @@ in {
|
|||
'';
|
||||
};
|
||||
};
|
||||
# todo: precompile?
|
||||
home.file.".emacs.d/init.el".source =
|
||||
(toString /home/yorick/dotfiles/emacs/init.el);
|
||||
home.file.".emacs.d/early-init.el".source =
|
||||
(toString /home/yorick/dotfiles/emacs/early-init.el);
|
||||
xdg.configFile."nixpkgs/config.nix".text = ''
|
||||
import "${toString ../config.nix}"
|
||||
'';
|
||||
|
@ -262,7 +149,6 @@ in {
|
|||
'';
|
||||
services = {
|
||||
lorri.enable = true;
|
||||
#arbtt.enable = true;
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
{ lib, config, options, pkgs, ... }:
|
||||
let user = "yorick.van.pelt";
|
||||
in {
|
||||
programs.ssh = {
|
||||
matchBlocks = let
|
||||
lumigod = hostname: {
|
||||
inherit hostname user;
|
||||
port = 2233;
|
||||
};
|
||||
lumivpn = {
|
||||
inherit user;
|
||||
# verified by wireguard key
|
||||
extraOptions.StrictHostKeyChecking = "no";
|
||||
};
|
||||
in rec {
|
||||
athena = {
|
||||
hostname = "athena.lumi.guide";
|
||||
inherit user;
|
||||
};
|
||||
rpibuild3 = {
|
||||
hostname = "10.110.0.3";
|
||||
inherit user;
|
||||
port = 4222;
|
||||
};
|
||||
rpibuild4 = {
|
||||
hostname = "rpibuild4.lumi.guide";
|
||||
inherit user;
|
||||
port = 4222;
|
||||
};
|
||||
styx = lumigod "10.110.0.1";
|
||||
"*.lumi.guide" = { inherit user; };
|
||||
zeus = lumigod "zeus.lumi.guide";
|
||||
ponos = lumigod "ponos.lumi.guide";
|
||||
medusa = lumigod "lumi.guide";
|
||||
# signs
|
||||
"10.108.0.*" = lumivpn // { port = 4222; };
|
||||
"10.109.0.*" = lumivpn;
|
||||
"10.110.0.*" = lumivpn // { port = 2233; };
|
||||
"10.111.0.*" = lumivpn;
|
||||
"192.168.42.*" = { inherit user; };
|
||||
};
|
||||
extraConfig = ''
|
||||
Match host "192.168.42.*" exec "ip route get %h | grep -q via"
|
||||
ProxyJump athena
|
||||
'';
|
||||
};
|
||||
programs.fish.shellAliases.lumi =
|
||||
"pushd ~/engineering/lumi; cached-nix-shell; popd";
|
||||
}
|
Loading…
Reference in New Issue