remove wsl, sway, vivaldi

This commit is contained in:
chaos 2024-07-21 21:00:14 +01:00
parent 603293ef9a
commit d2be71c83c
No known key found for this signature in database
16 changed files with 1 additions and 385 deletions

View file

@ -16,11 +16,6 @@
home-manager-unstable.url = "github:nix-community/home-manager";
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
nixos-wsl.url = "github:nix-community/NixOS-WSL";
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs-unstable";
nixos-wsl.inputs.flake-utils.follows = "flake-utils";
nixos-wsl.inputs.flake-compat.follows = "flake-compat";
tree-input.url = "github:kittywitch/tree";
tree-input.inputs.nixpkgs.follows = "nixpkgs-unstable";

View file

@ -1,7 +1,4 @@
{...}: {
wayland.windowManager.sway.extraSessionCommands = ''
export KITTY_CACHE_DIRECTORY="/tmp/kitty";
'';
programs.kitty = {
enable = true;
font.name = "Comic Code";

View file

@ -1,7 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
vivaldi
vivaldi-ffmpeg-codecs
#vivaldi-widevine
];
}

View file

@ -1,8 +0,0 @@
{...}: {
services.gammastep = {
enable = true;
tray = true;
latitude = "51.927031";
longitude = "-0.654746";
};
}

View file

@ -1,6 +0,0 @@
{...}: {
services.mako = {
enable = true;
defaultTimeout = 3000;
};
}

View file

@ -1,163 +0,0 @@
{
config,
pkgs,
lib,
tree,
...
}: let
inherit (lib.modules) mkMerge;
inherit (lib.strings) escapeShellArgs;
in {
# import default terminal
imports = with tree; [home.apps.kitty home.apps.rofi];
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
#WLR_DRM_DEVICES = "/dev/dri/card0";
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = 1;
# For Ghidra to make windows work properly
_JAVA_AWT_WM_NONREPARENTING = 1;
XCURSOR_SIZE = 64;
QT_AUTO_SCREEN_SCALE_FACTOR = 1;
SAL_USE_VCLPLUGIN = "gtk3"; # GTK3 on LibreOffice
};
home.pointerCursor = {
package = gnome.adwaita-icon-theme;
name = "Adwaita";
size = 24;
gtk.enable = true;
x11 = {
enable = true;
defaultCursor = "Adwaita";
};
};
home.packages = with pkgs; [
grim
slurp
wl-clipboard
jq
wofi
wmctrl
libnotify
light
gobar
libdbusmenu-gtk3
];
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.base = true;
wrapperFeatures.gtk = true;
config = let
modifier = "Mod1";
terminal = "${pkgs.kitty}/bin/kitty";
menu = "${pkgs.rofi}/bin/rofi -show run";
pactl = "${pkgs.pulseaudio}/bin/pactsl";
in {
bars = [
{
position = "top";
fonts = {
names = ["Comic Code"];
size = 14.0;
};
statusCommand = escapeShellArgs [
#"/home/chaos/Projects/rustbar/target/debug/rustbar"
"${pkgs.gobar}/bin/gobar"
"-config"
"cpu\\|mem\\|weather\\(Leighton\\ Buzzard\\)\\|bat\\(BAT0\\)\\|time"
];
}
{command = "${pkgs.waybar}/bin/waybar";}
];
output = {"*" = {bg = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath} fill";};};
input = {"*" = {xkb_layout = "gb";};};
fonts = {
names = ["Comic Code"];
size = 18.0;
};
inherit modifier;
inherit terminal;
startup = [
# gets blueman applet working for some reason
{
command = "dbus-update-activation-environment DISPLAY";
always = true;
}
{
command = "nm-applet";
always = true;
}
];
seat = {"*" = {"xcursor_theme" = "Adwaita 24";};};
gaps = {
top = 10;
bottom = 10;
left = 10;
right = 10;
inner = 20;
outer = 20;
smartGaps = true;
};
window = {
border = 0;
titlebar = false;
};
keybindings = mkMerge [
{
"${modifier}+Return" = "exec ${terminal}";
"${modifier}+Left" = "focus left";
"${modifier}+Down" = "focus down";
"${modifier}+Up" = "focus up";
"${modifier}+Right" = "focus right";
"${modifier}+Shift+Left" = "move left";
"${modifier}+Shift+Down" = "move down";
"${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+Right" = "move right";
"${modifier}+Shift+space" = "floating toggle";
"${modifier}+space" = "focus mode_toggle";
"XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessDown" = "exec sudo xbacklight -time 1 -dec +5";
"XF86MonBrightnessUp" = "exec sudo xbacklight -time 1 -inc +5";
"Print" = ''
exec ${pkgs.grim}/bin/grim -t png -g "$(${pkgs.slurp}/bin/slurp -d)" - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png'';
"Shift+Print" = "exec ${pkgs.grim}/bin/grim -t png - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png";
"${modifier}+d" = "exec ${menu}";
"${modifier}+f" = "fullscreen";
"${modifier}+Shift+q" = "kill";
"${modifier}+Shift+c" = "reload";
"${modifier}+r" = "mode resize";
}
(mkMerge (map (workspace: {
"${modifier}+${workspace}" = "workspace ${workspace}";
"${modifier}+Shift+${workspace}" = "move container to workspace ${workspace}";
}) ["1" "2" "3" "4" "5" "6" "7" "8" "9"]))
];
};
};
}

View file

@ -1,13 +0,0 @@
{...}: {
programs.waybar = {
enable = true;
settings = [
{
position = "bottom";
modules-left = [];
modules-center = [];
modules-right = ["tray"];
}
];
};
}

View file

@ -1,18 +0,0 @@
{...}: {
programs.zsh.profileExtra = ''
# If running from tty1 start sway
if [ "$(tty)" = "/dev/tty1" ]; then
systemctl --user unset-environment \
SWAYSOCK \
I3SOCK \q
WAYLAND_DISPLAY \
DISPLAY \
IN_NIX_SHELL \
__HM_SESS_VARS_SOURCED \
GPG_TTY \
NIX_PATH \
SHLVL
exec env --unset=SHLVL systemd-cat -t sway -- sway
fi
'';
}

View file

@ -29,15 +29,12 @@
inputs.home-manager-unstable.nixosModules.home-manager
inputs.nixos-wsl.nixosModules.default
inputs.vaultui.nixosModules.default
tree.modules.nixos.rcloneServe
tree.modules.nixos.rcloneSync
tree.modules.nixos.secrets
tree.modules.nixos.postgreSQLRemoteBackup
tree.modules.nixos.wslBuildTarballExt
tree.modules.nixos.encryptedDrive
];
@ -83,16 +80,6 @@ in rec {
modules = defaultModules ++ [./lappy-surface/lappy-surface.nix ./lappy-surface/hardware.nix];
};
wsl = nixosUnstableSystem {
specialArgs =
defaultSpecialArgs
// {
hostPath = ./wsl;
};
system = "x86_64-linux";
modules = defaultModules ++ [./wsl/wsl.nix];
};
hetzner-arm = nixosUnstableSystem {
specialArgs =
defaultSpecialArgs

View file

@ -1,25 +0,0 @@
{tree, ...}: {
imports = with tree; [
users.root
users.chaos
profiles.sshd
presets.nixos.wslBase
profiles.cross.arm64
profiles.remoteBuilders
];
home-manager.users.root = {
home.stateVersion = "24.05";
};
home-manager.users.chaos = {
home.stateVersion = "24.05";
};
networking.hostName = "wsl";
time.timeZone = "Europe/London";
system.stateVersion = "24.05";
}

View file

@ -1,56 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.wsl;
in {
config = mkIf cfg.enable {
system.build.tarballBuilderExt = pkgs.writeShellApplication {
name = "nixos-wsl-tarball-builder-ext";
runtimeInputs = with pkgs; [
coreutils
gnutar
zstd
nixos-install-tools
config.nix.package
];
text = ''
if ! [ $EUID -eq 0 ]; then
echo "This script must be run as root!"
exit 1
fi
out=''${1:-nixos-wsl.tar.zst}
root=$(mktemp -p "''${TMPDIR:-/tmp}" -d nixos-wsl-tarball.XXXXXXXXXX)
# FIXME: fails in CI for some reason, but we don't really care because it's CI
trap 'rm -rf "$root" || true' INT TERM EXIT
chmod o+rx "$root"
echo "[NixOS-WSL] Installing..."
nixos-install \
--root "$root" \
--no-root-passwd \
--system ${config.system.build.toplevel} \
--substituters ""
echo "[NixOS-WSL] Compressing..."
tar -C "$root" \
-cz \
--sort=name \
--mtime='@1' \
--owner=0 \
--group=0 \
--numeric-owner \
. \
> "$out"
'';
};
};
}

View file

@ -9,10 +9,6 @@
in
{
inherit (hosts) nixosConfigurations;
extras = {
wsl-tarball-builder = hosts.nixosConfigurations.wsl.config.system.build.tarballBuilderExt;
};
}
// (inputs.flake-utils.lib.eachDefaultSystem (
system: let

View file

@ -1,11 +0,0 @@
{tree, ...}: {
imports = with tree; [
presets.nixos.desktopBase
profiles.gui.environments.sway
];
home-manager.users.chaos = {
imports = with tree; [
home.gui.environments.sway
];
};
}

View file

@ -1,43 +0,0 @@
{tree, ...}: {
imports = with tree; [
profiles.sound.base
profiles.sound.pipewire
profiles.gui.base
profiles.firewallAllow.aria2c
profiles.firewallAllow.soulseek
profiles.mullvad
];
home-manager.users.chaos = {
imports = with tree; [
home.base
home.dev.all
home.homeFolders
home.sshWSL
home.programming.editors.vscode
home.programming.languages.rust
home.programming.languages.nix
home.gui.base
home.apps.fileRoller
home.apps.mpv
home.apps.quassel
home.apps.toot-cli
home.apps.mullvad
home.apps.aria2
home.apps.rclone
home.apps.restic
];
};
wsl = {
enable = true;
defaultUser = "chaos";
interop.register = true;
};
}

View file

@ -1,9 +0,0 @@
{...}: {
programs.sway.enable = true;
programs.xwayland.enable = true;
services.xserver = {
enable = true;
displayManager.sddm.enable = true;
};
}

View file

@ -17,7 +17,7 @@
"lappy-surface"
]
then usbSSHKeyFile
else if builtins.elem currentHostname ["wsl"]
else if builtins.elem currentHostname []
then normalSSHKeyFile
else throw "host isn't configured for remote-builders";