Skip to content

Commit

Permalink
Add a draft sway configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
linyinfeng committed Sep 10, 2021
1 parent 9ba36c4 commit b6c87fd
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@

network = (with networking; [ resolved tailscale ]) ++ (with security; [ fail2ban firewall ]);
networkManager = (with networking; [ network-manager ]);
multimedia = (with graphical; [ gnome fonts ibus-chinese ]) ++ (with services; [ pipewire ]);
multimedia = (with graphical; [ gnome sway fonts ibus-chinese ]) ++ (with services; [ pipewire ]);
development = (with profiles.development; [ shells latex ]) ++ (with services; [ adb gnupg ]);
multimediaDev = multimedia ++ development ++ (with profiles.development; [ ides ]);
virtualization = with profiles.virtualization; [ podman libvirt wine ];
Expand Down Expand Up @@ -232,7 +232,7 @@
suites = with profiles; rec {
# MAIN
base = [ direnv git git-extra shells ];
multimedia = [ gnome desktop-applications chromium firefox rime fonts ];
multimedia = [ gnome sway desktop-applications chromium firefox rime fonts ];
development = [ profiles.development emacs tools asciinema tex ];
virtualization = [ ];
multimediaDev = multimedia ++ [ xdg-dirs ] ++ development ++ [ vscode ];
Expand Down
11 changes: 11 additions & 0 deletions profiles/graphical/sway/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ pkgs, ... }:

{
programs.sway = {
enable = true;
extraPackages = with pkgs; [
swaylock
swayidle
];
};
}
2 changes: 2 additions & 0 deletions profiles/virtualization/podman/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ lib.mkMerge [
ExecStartPost = "${podman} image prune -f";
};
wantedBy = [ "multi-user.target" "default.target" ];
environment = lib.mkIf (config.networking.fw-proxy.enable)
config.networking.fw-proxy.environment;
};
systemd.timers.podman-auto-update = {
description = "Podman auto-update timer";
Expand Down
41 changes: 41 additions & 0 deletions users/profiles/sway/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ ... }:

# TODO: not finished yet
{
wayland.windowManager.sway = {
enable = true;
config = {
modifier = "Mod4";
startup = [
];
terminal = "alacritty";
};
};
services.kanshi = {
enable = true;
};
programs.waybar = {
enable = true;
settings = [
{
layer = "bottom";
position = "top";
modules-left = [
"sway/workspaces"
"sway/mode"
];
modules-center = [
"sway/window"
];
modules-right = [
"battery"
"clock"
];
modules = { };
}
];
};
programs.alacritty = {
enable = true;
};
}

0 comments on commit b6c87fd

Please sign in to comment.