This commit is contained in:
Andrea Ciceri 2023-05-11 10:41:03 +02:00
parent fcfd36c63b
commit 202611d0b8
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
18 changed files with 174 additions and 63 deletions

2
flake.lock generated
View file

@ -54,7 +54,7 @@
}, },
"locked": { "locked": {
"lastModified": 1680949081, "lastModified": 1680949081,
"narHash": "sha256-Z2OM36Ue6DsNNPnzg7znorZoXNVRwCVvjbbmhQosSxA=", "narHash": "sha256-9dwAlNJ+owWvgcbhFeoJGX6/0jr+FY6m/wiziVVIu2c=",
"type": "git", "type": "git",
"url": "file:///home/ccr/.config/emacs" "url": "file:///home/ccr/.config/emacs"
}, },

View file

@ -14,7 +14,8 @@
}; };
services = { services = {
mbsync = { mbsync = {
enable = true; enable = false;
# FIXME this requires `pass` every 5 minutes that run `pinentry`
frequency = "*:0/15"; frequency = "*:0/15";
preExec = "${pkgs.isync}/bin/mbsync -Ha"; preExec = "${pkgs.isync}/bin/mbsync -Ha";
# First time run: mu init --maildir ~/.mail --my-address andrea.ciceri@autistici.org # First time run: mu init --maildir ~/.mail --my-address andrea.ciceri@autistici.org

View file

@ -3,10 +3,20 @@
enable = true; enable = true;
enableSshSupport = true; enableSshSupport = true;
sshKeys = ["CE2FD0D9BECBD8876811714925066CC257413416"]; sshKeys = ["CE2FD0D9BECBD8876811714925066CC257413416"];
extraConfig = '' extraConfig = let
pinentryRofi = pkgs.writeShellApplication {
name = "pinentry-rofi-with-env";
runtimeInputs = with pkgs; [coreutils rofi];
text = ''
"${pkgs.pinentry-rofi}/bin/pinentry-rofi" "$@"
'';
};
in ''
allow-emacs-pinentry allow-emacs-pinentry
allow-loopback-pinentry allow-loopback-pinentry
pinentry-program ${pinentryRofi}/bin/pinentry-rofi-with-env
''; '';
pinentryFlavor = null;
}; };
programs.gpg = { programs.gpg = {

View file

@ -2,25 +2,73 @@
config, config,
pkgs, pkgs,
... ...
}: { }: let
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
filename="$HOME/shots/$(date --iso-8601=seconds).png"
coords="$(${pkgs.slurp}/bin/slurp)"
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
wl-copy -t image/png < $filename
'';
in {
imports = [
./hyprpaper.nix
../waybar
../swayidle
../mako
../gammastep
../kitty
];
home.packages = with pkgs; [wl-clipboard];
systemd.user.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
services.network-manager-applet.enable = true;
services.blueman-applet.enable = true;
services.pasystray.enable = true;
xsession.enable = true;
services.udiskie.enable = true;
gtk = {
enable = true;
font.name = "Sans,Symbols Nerd Font";
iconTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
};
};
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
input {
touchpad {
disable_while_typing = true # set to true while playing
}
}
monitor = DP-2, 1920x1200, 0x0, 1, transform, 3 monitor = DP-2, 1920x1200, 0x0, 1, transform, 3
monitor = DP-1, 2560x1440, 1200x320, 1 monitor = DP-1, 2560x1440, 1200x320, 1
monitor = eDP-1, 1920x1080, 3760x230, 1 monitor = eDP-1, 1920x1080, 3760x230, 1
exec-once = ${config.programs.waybar.package}/bin/waybar exec-once = ${config.programs.waybar.package}/bin/waybar
exec-once = ${config.services.mako.package}/bin/mako exec-once = ${config.services.mako.package}/bin/mako
exec-once = ${pkgs.swaybg}/bin/swaybg ../sway/wallpaper.svg exec-once = ${pkgs.hyprpaper}/bin/hyprpaper
windowrulev2 = tile, class:^(Spotify)$ windowrulev2 = tile, class:^(Spotify)$
windowrulev2 = workspace 9, class:^(Spotify)$ windowrulev2 = workspace 9, class:^(Spotify)$
bind = SUPER , F, exec, firefox bind = SUPER , F, exec, firefox
bind = SUPER , RETURN, exec, ${config.programs.kitty.package}/bin/kitty ${config.programs.kitty.package}/bin/kitty +kitten ssh mothership.fleet bind = SUPER , RETURN, exec, ${config.programs.kitty.package}/bin/kitty ${config.programs.kitty.package}/bin/kitty +kitten ssh mothership.fleet
bind = SUPER, x, exec, emacsclient -c
bind = SUPER, y, exec, ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c bind = SUPER, y, exec, ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c
bind = SUPER, d, exec, ${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0 bind = SUPER, d, exec, ${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0
bind = SUPER, s, exec, ${screenshotScript}
bind = , XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5%
bind = , XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%-
bind = SUPER SHIFT, q, killactive bind = SUPER SHIFT, q, killactive
bind = SUPER SHIFT, f, fullscreen, 0 bind = SUPER SHIFT, f, fullscreen, 0
@ -39,6 +87,8 @@
bind = SUPER, p, movecurrentworkspacetomonitor, r bind = SUPER, p, movecurrentworkspacetomonitor, r
bind = SUPER, o, movecurrentworkspacetomonitor, l bind = SUPER, o, movecurrentworkspacetomonitor, l
bindm=ALT,mouse:272,movewindow
bind = SUPER, 1, workspace, 1 bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2 bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3 bind = SUPER, 3, workspace, 3

View file

@ -0,0 +1,10 @@
let
wallpaper = ./wallpaper.png;
in {
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${wallpaper}
wallpaper = eDP-1,${wallpaper}
wallpaper = DP-1,${wallpaper}
wallpaper = DP-2,${wallpaper}
'';
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 303 KiB

View file

@ -11,5 +11,5 @@
}; };
package = pkgs.pass.withExtensions (e: with e; [pass-otp]); package = pkgs.pass.withExtensions (e: with e; [pass-otp]);
}; };
services.password-store-sync.enable = true; services.password-store-sync.enable = false; # FIXME this requires `pass` every 5 minutes that run `pinentry`
} }

View file

@ -5,12 +5,10 @@
... ...
}: { }: {
imports = [ imports = [
./waybar.nix ../waybar
./idle.nix ../swayidle
./mako.nix ../mako
./gammastep.nix ../gammastep
# ../foot
# ../alacritty
../kitty ../kitty
]; ];
config = { config = {
@ -36,8 +34,6 @@
}; };
}; };
services.swayidle.enable = true;
wayland = { wayland = {
windowManager.sway = let windowManager.sway = let
modifier = "Mod4"; modifier = "Mod4";

View file

@ -1,4 +1,8 @@
{pkgs, ...}: { {
pkgs,
lib,
...
}: {
services.swayidle = let services.swayidle = let
# Downgraded due to # Downgraded due to
# https://github.com/mortie/swaylock-effects/issues/95 # https://github.com/mortie/swaylock-effects/issues/95
@ -49,4 +53,7 @@
} }
]; ];
}; };
# Otherwise it will start only after Sway and will not work with Hyprland
systemd.user.services.swayidle.Unit.PartOf = lib.mkForce [];
} }

View file

@ -34,17 +34,16 @@
"wlr/workspaces" = { "wlr/workspaces" = {
all-outputs = true; all-outputs = true;
disable-scroll-wraparound = true; disable-scroll-wraparound = true;
active-only = true; # format = "{icon}";
format = "{icon}";
on-click = "activate"; on-click = "activate";
format-icons = { # format-icons = {
"1" = ""; # "1" = "";
"2" = ""; # "2" = "";
"3" = ""; # "3" = "";
"9" = ""; # "9" = "ﬧ";
urgent = ""; # urgent = "";
}; # };
sort-by-number = true; # sort-by-number = true;
}; };
"wlr/mode" = {tooltip = false;}; "wlr/mode" = {tooltip = false;};

View file

@ -16,6 +16,7 @@
"xfce" "xfce"
"battery" "battery"
"printing" "printing"
"wireguard-client"
]; ];
ccr.enable = true; ccr.enable = true;
@ -29,6 +30,11 @@
"chrome" "chrome"
"udiskie" "udiskie"
]; ];
packages = with pkgs; [
remmina
rdesktop
freerdp
];
}; };
home-manager.users.mara = { home-manager.users.mara = {

View file

@ -56,7 +56,6 @@
"qutebrowser" "qutebrowser"
"shell" "shell"
"slack" "slack"
"sway"
"hyprland" "hyprland"
"udiskie" "udiskie"
"vscode" "vscode"
@ -71,6 +70,8 @@
]; ];
packages = with pkgs; [ packages = with pkgs; [
comma comma
dolphin-emu-beta
sc-controller
]; ];
extraGroups = [ extraGroups = [
"wheel" "wheel"
@ -114,6 +115,9 @@
useXkbConfig = true; # use xkbOptions in tty. useXkbConfig = true; # use xkbOptions in tty.
}; };
services.joycond.enable = true; #FIXME not here
services.udev.packages = [pkgs.joycond];
# Enable the X11 windowing system. # Enable the X11 windowing system.
# services.xserver.enable = true; # services.xserver.enable = true;

View file

@ -2,6 +2,7 @@
config, config,
lib, lib,
pkgs, pkgs,
fleetFlake,
... ...
}: { }: {
nix = { nix = {
@ -39,18 +40,29 @@
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
}; };
buildMachines = [ # buildMachines = [
{ # {
hostName = "rock5b.fleet"; # hostName = "rock5b.fleet";
system = "aarch64-linux"; # system = "aarch64-linux";
maxJobs = 6; # maxJobs = 6;
speedFactor = 1; # speedFactor = 1;
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"]; # supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
mandatoryFeatures = []; # mandatoryFeatures = [];
# sshKey = "/var/lib/hydra/queue-runner/.ssh/id_rsa"; # # sshKey = "/var/lib/hydra/queue-runner/.ssh/id_rsa";
sshUser = "root"; # sshUser = "root";
} # }
]; # ];
distributedBuilds = true; distributedBuilds = true;
registry = lib.mkForce {
nixpkgs.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
};
n.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
};
};
}; };
} }

View file

@ -10,6 +10,20 @@
networking.nat.internalInterfaces = ["wg0"]; networking.nat.internalInterfaces = ["wg0"];
networking.firewall = { networking.firewall = {
allowedUDPPorts = [51820]; allowedUDPPorts = [51820];
interfaces.wg0 = {
allowedUDPPortRanges = [
{
from = 0;
to = 65535;
}
];
allowedTCPPortRanges = [
{
from = 0;
to = 65535;
}
];
};
}; };
networking.wireguard.interfaces = { networking.wireguard.interfaces = {