setup sway vm
This commit is contained in:
parent
e67707b0f0
commit
35fa5b6bda
10 changed files with 118 additions and 111 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +1,2 @@
|
||||||
result
|
result
|
||||||
nixos.qcow2
|
*.qcow2
|
||||||
|
|
|
||||||
33
flake.nix
33
flake.nix
|
|
@ -36,17 +36,32 @@
|
||||||
./home/programs/personal.nix
|
./home/programs/personal.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
vm = mkConf [
|
FCS-Tristan-Nixbook =
|
||||||
|
mkConf [
|
||||||
|
./hardware/fcs-tristan-nixbook.nix
|
||||||
|
./nixos/programs/hyprland.nix
|
||||||
|
./nixos/modules/work.nix
|
||||||
|
] [
|
||||||
|
./home/programs/work.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
vm-sway =
|
||||||
|
builtins.trace ''
|
||||||
|
I haven't finished configuring sway yet.
|
||||||
|
use alt+enter to start a terminal.
|
||||||
|
use alt+d to launch applications
|
||||||
|
|
||||||
|
start the vm with '-vga qxl'
|
||||||
|
''
|
||||||
|
mkConf
|
||||||
|
[
|
||||||
|
./hardware/vm.nix
|
||||||
|
./nixos/programs/sway.nix
|
||||||
|
] [];
|
||||||
|
|
||||||
|
vm-tty = mkConf [
|
||||||
./hardware/vm.nix
|
./hardware/vm.nix
|
||||||
] [];
|
] [];
|
||||||
|
|
||||||
FCS-Tristan-Nixbook = mkConf [
|
|
||||||
./hardware/fcs-tristan-nixbook.nix
|
|
||||||
./nixos/programs/hyprland.nix
|
|
||||||
./nixos/modules/work.nix
|
|
||||||
] [
|
|
||||||
./home/programs/work.nix
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,33 @@
|
||||||
{config, ...}: let
|
{config, ...}: let
|
||||||
user = config.user;
|
user = config.user;
|
||||||
in {
|
in {
|
||||||
|
hardware.opengl.enable = true;
|
||||||
|
boot.kernelModules = ["qxl" "bochs_drm"];
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
home-manager.users.${user}.imports = [
|
home-manager.users.${user}.imports = [
|
||||||
{
|
{
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.05";
|
||||||
|
|
||||||
|
# so it won't conflict with the host
|
||||||
|
windowManager.modifierKey = "ALT";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
displays.displays = {
|
||||||
|
Virtual-1 = {
|
||||||
|
enable = true;
|
||||||
|
name = "Virtual-1";
|
||||||
|
workspaces = {
|
||||||
|
start = 1;
|
||||||
|
end = 10;
|
||||||
|
};
|
||||||
|
resolution = {
|
||||||
|
x = 1920;
|
||||||
|
y = 1080;
|
||||||
|
freq = 60;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
# https://nix-community.github.io/home-manager/options.xhtml
|
# https://nix-community.github.io/home-manager/options.xhtml
|
||||||
|
|
@ -14,13 +15,15 @@
|
||||||
./modules/menu.nix
|
./modules/menu.nix
|
||||||
./modules/scripts.nix
|
./modules/scripts.nix
|
||||||
|
|
||||||
./programs/hyprland.nix
|
|
||||||
./programs/graphical.nix
|
./programs/graphical.nix
|
||||||
./programs/scripts.nix
|
./programs/scripts.nix
|
||||||
./programs/neovim/.
|
./programs/neovim/.
|
||||||
./programs/git.nix
|
./programs/git.nix
|
||||||
./programs/lf/.
|
./programs/lf/.
|
||||||
./programs/shell.nix
|
./programs/shell.nix
|
||||||
|
{
|
||||||
|
options.windowManager.modifierKey = lib.mkOption {default = "SUPER";};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
roles.mpd.enable = true;
|
roles.mpd.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
cfg = config.programs.menu;
|
cfg = config.programs.menu;
|
||||||
terminal = config.programs.terminal;
|
terminal = config.programs.terminal;
|
||||||
termcmd = "${terminal}/bin/${terminal.pname}";
|
termcmd = "${terminal}/bin/${terminal.pname}";
|
||||||
|
menucmd = "${config.programs.menu.package}${config.programs.menu.drunCommand}";
|
||||||
in {
|
in {
|
||||||
options.programs = with lib; {
|
options.programs = with lib; {
|
||||||
menu = {
|
menu = {
|
||||||
|
|
@ -17,6 +18,9 @@ in {
|
||||||
default = "/bin/wofi --show dmenu";
|
default = "/bin/wofi --show dmenu";
|
||||||
example = "/bin/dmenu";
|
example = "/bin/dmenu";
|
||||||
};
|
};
|
||||||
|
drunCommand = mkOption {
|
||||||
|
default = "/bin/wofi --show drun";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -29,6 +33,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.sway.config.menu = menucmd;
|
||||||
|
|
||||||
home.packages = [cfg.package];
|
home.packages = [cfg.package];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
modifier = config.windowManager.modifierKey;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
(import ./swaylock.nix)
|
(import ./swaylock.nix)
|
||||||
(import ./swayidle.nix)
|
(import ./swayidle.nix)
|
||||||
|
|
@ -51,52 +54,52 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
bind = [
|
bind = [
|
||||||
"SUPER, h, movefocus,l"
|
"${modifier}, h, movefocus,l"
|
||||||
"SUPER, l, movefocus,r"
|
"${modifier}, l, movefocus,r"
|
||||||
"SUPER, j, layoutmsg,cyclenext"
|
"${modifier}, j, layoutmsg,cyclenext"
|
||||||
"SUPER, k, layoutmsg,cycleprev"
|
"${modifier}, k, layoutmsg,cycleprev"
|
||||||
"SUPER, space, layoutmsg,swapwithmaster master"
|
"${modifier}, space, layoutmsg,swapwithmaster master"
|
||||||
"SUPER, F, fullscreen,"
|
"${modifier}, F, fullscreen,"
|
||||||
"SUPER, V, togglefloating,"
|
"${modifier}, V, togglefloating,"
|
||||||
"SUPER, W, layoutmsg, orientationprev"
|
"${modifier}, W, layoutmsg, orientationprev"
|
||||||
"SUPER_SHIFT, W, layoutmsg, orientationnext"
|
"${modifier}_SHIFT, W, layoutmsg, orientationnext"
|
||||||
"SUPER_SHIFT, V, togglegroup,"
|
"${modifier}_SHIFT, V, togglegroup,"
|
||||||
"SUPER_SHIFT, h, changegroupactive,b"
|
"${modifier}_SHIFT, h, changegroupactive,b"
|
||||||
"SUPER_SHIFT, h, moveintogroup,l"
|
"${modifier}_SHIFT, h, moveintogroup,l"
|
||||||
"SUPER_SHIFT, l, moveintogroup,r"
|
"${modifier}_SHIFT, l, moveintogroup,r"
|
||||||
"SUPER_SHIFT, l, changegroupactive,f"
|
"${modifier}_SHIFT, l, changegroupactive,f"
|
||||||
"SUPER, Y, togglespecialworkspace"
|
"${modifier}, Y, togglespecialworkspace"
|
||||||
"SUPER_SHIFT, Y, movetoworkspace, special"
|
"${modifier}_SHIFT, Y, movetoworkspace, special"
|
||||||
"SUPER_SHIFT, X, killactive"
|
"${modifier}_SHIFT, X, killactive"
|
||||||
"SUPER, slash, focuswindow, brave-browser"
|
"${modifier}, slash, focuswindow, brave-browser"
|
||||||
"SUPER, n, focuswindow, Logseq"
|
"${modifier}, n, focuswindow, Logseq"
|
||||||
"SUPER, R, submap, resize"
|
"${modifier}, R, submap, resize"
|
||||||
"SUPER,1,workspace,1"
|
"${modifier},1,workspace,1"
|
||||||
"SUPER,2,workspace,2"
|
"${modifier},2,workspace,2"
|
||||||
"SUPER,3,workspace,3"
|
"${modifier},3,workspace,3"
|
||||||
"SUPER,4,workspace,4"
|
"${modifier},4,workspace,4"
|
||||||
"SUPER,5,workspace,5"
|
"${modifier},5,workspace,5"
|
||||||
"SUPER,6,workspace,6"
|
"${modifier},6,workspace,6"
|
||||||
"SUPER,7,workspace,7"
|
"${modifier},7,workspace,7"
|
||||||
"SUPER,8,workspace,8"
|
"${modifier},8,workspace,8"
|
||||||
"SUPER,9,workspace,9"
|
"${modifier},9,workspace,9"
|
||||||
"SUPER,0,workspace,10"
|
"${modifier},0,workspace,10"
|
||||||
"SUPER,left,workspace,r-1"
|
"${modifier},left,workspace,r-1"
|
||||||
"SUPER,right,workspace,r+1"
|
"${modifier},right,workspace,r+1"
|
||||||
"SUPER_SHIFT,1,movetoworkspace,1"
|
"${modifier}_SHIFT,1,movetoworkspace,1"
|
||||||
"SUPER_SHIFT,2,movetoworkspace,2"
|
"${modifier}_SHIFT,2,movetoworkspace,2"
|
||||||
"SUPER_SHIFT,3,movetoworkspace,3"
|
"${modifier}_SHIFT,3,movetoworkspace,3"
|
||||||
"SUPER_SHIFT,4,movetoworkspace,4"
|
"${modifier}_SHIFT,4,movetoworkspace,4"
|
||||||
"SUPER_SHIFT,5,movetoworkspace,5"
|
"${modifier}_SHIFT,5,movetoworkspace,5"
|
||||||
"SUPER_SHIFT,6,movetoworkspace,6"
|
"${modifier}_SHIFT,6,movetoworkspace,6"
|
||||||
"SUPER_SHIFT,7,movetoworkspace,7"
|
"${modifier}_SHIFT,7,movetoworkspace,7"
|
||||||
"SUPER_SHIFT,8,movetoworkspace,8"
|
"${modifier}_SHIFT,8,movetoworkspace,8"
|
||||||
"SUPER_SHIFT,9,movetoworkspace,9"
|
"${modifier}_SHIFT,9,movetoworkspace,9"
|
||||||
"SUPER_SHIFT,0,movetoworkspace,10"
|
"${modifier}_SHIFT,0,movetoworkspace,10"
|
||||||
];
|
];
|
||||||
bindm = [
|
bindm = [
|
||||||
"SUPER, mouse:272, movewindow"
|
"${modifier}, mouse:272, movewindow"
|
||||||
"SUPER, mouse:273, resizewindow"
|
"${modifier}, mouse:273, resizewindow"
|
||||||
];
|
];
|
||||||
env = [
|
env = [
|
||||||
"GDK_BACKEND,wayland,x11"
|
"GDK_BACKEND,wayland,x11"
|
||||||
|
|
@ -151,7 +154,7 @@
|
||||||
|
|
||||||
bind = , escape, submap,reset
|
bind = , escape, submap,reset
|
||||||
bind = , enter, submap,reset
|
bind = , enter, submap,reset
|
||||||
bind = SUPER, R, submap,reset
|
bind = ${modifier}, R, submap,reset
|
||||||
bind = CONTROL, C, submap,reset
|
bind = CONTROL, C, submap,reset
|
||||||
submap = reset
|
submap = reset
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
modifier = config.windowManager.modifierKey;
|
||||||
terminal = config.programs.terminal;
|
terminal = config.programs.terminal;
|
||||||
termcmd = "${terminal}/bin/${terminal.pname}";
|
termcmd = "${terminal}/bin/${terminal.pname}";
|
||||||
my-deps = {
|
my-deps = {
|
||||||
|
|
@ -64,7 +65,7 @@ in {
|
||||||
'';
|
'';
|
||||||
hotkeys = [
|
hotkeys = [
|
||||||
{
|
{
|
||||||
modifier = "SUPER_SHIFT";
|
modifier = "${modifier}_SHIFT";
|
||||||
key = "P";
|
key = "P";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
@ -84,7 +85,7 @@ in {
|
||||||
'';
|
'';
|
||||||
hotkeys = [
|
hotkeys = [
|
||||||
{
|
{
|
||||||
modifier = "SUPER_SHIFT";
|
modifier = "${modifier}_SHIFT";
|
||||||
key = "S";
|
key = "S";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
@ -159,7 +160,7 @@ in {
|
||||||
'';
|
'';
|
||||||
hotkeys = [
|
hotkeys = [
|
||||||
{
|
{
|
||||||
modifier = "SUPER";
|
modifier = "${modifier}";
|
||||||
key = "EQUAL";
|
key = "EQUAL";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
@ -172,7 +173,7 @@ in {
|
||||||
'';
|
'';
|
||||||
hotkeys = [
|
hotkeys = [
|
||||||
{
|
{
|
||||||
modifier = "SUPER";
|
modifier = "${modifier}";
|
||||||
key = "MINUS";
|
key = "MINUS";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
@ -213,7 +214,7 @@ in {
|
||||||
'';
|
'';
|
||||||
hotkeys = [
|
hotkeys = [
|
||||||
{
|
{
|
||||||
modifier = "SUPER_SHIFT";
|
modifier = "${modifier}_SHIFT";
|
||||||
key = "period";
|
key = "period";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -230,7 +231,7 @@ in {
|
||||||
'';
|
'';
|
||||||
hotkeys = [
|
hotkeys = [
|
||||||
{
|
{
|
||||||
modifier = "SUPER_SHIFT";
|
modifier = "${modifier}_SHIFT";
|
||||||
key = "comma";
|
key = "comma";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -285,7 +286,7 @@ in {
|
||||||
hotkeys = [
|
hotkeys = [
|
||||||
{
|
{
|
||||||
key = "C";
|
key = "C";
|
||||||
modifier = "SUPER_SHIFT";
|
modifier = "${modifier}_SHIFT";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,46 +45,8 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
mainBar = {
|
mainBar = {
|
||||||
layer = "top";
|
|
||||||
position = "top";
|
|
||||||
height = 36;
|
|
||||||
modules-left = ["sway/workspaces" "sway/window"];
|
modules-left = ["sway/workspaces" "sway/window"];
|
||||||
modules-right = ["mpris" "pulseaudio" "clock" "tray" "battery"];
|
|
||||||
clock = {
|
|
||||||
format = "📅 {:%a %b-%d %I:%M %p}";
|
|
||||||
};
|
|
||||||
pulseaudio = {
|
|
||||||
format-muted = "🔇 {volume}";
|
|
||||||
format = "{icon} {volume}";
|
|
||||||
format-icons.default = ["🔈" "🔉" "🔊"];
|
|
||||||
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
|
|
||||||
};
|
|
||||||
mpris = {
|
|
||||||
format = "{player_icon} {artist} - {title}";
|
|
||||||
format-paused = "{status_icon} {player_icon} {artist} - {title}";
|
|
||||||
player-icons = {
|
|
||||||
default = "▶️";
|
|
||||||
mpd = "🎵";
|
|
||||||
kdeconnect = "☎️";
|
|
||||||
};
|
|
||||||
status-icons = {
|
|
||||||
paused = "⏸️";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
battery = {
|
|
||||||
format = "{icon} {capacity}%";
|
|
||||||
format-icons = ["🤏" "🪫" "🔋" "🔋"];
|
|
||||||
format-charging = "🔌 {capacity}%";
|
|
||||||
states = {
|
|
||||||
warning = 30;
|
|
||||||
critical = 15;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd = {
|
|
||||||
enable = true;
|
|
||||||
target = "graphical-session.target";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${user}.imports = [
|
home-manager.users.${user}.imports = [
|
||||||
{
|
../../home/programs/hyprland.nix
|
||||||
wayland.windowManager.hyprland.enable = true;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
{user}: {
|
{config, ...}: let
|
||||||
lib,
|
user = config.user;
|
||||||
pkgs,
|
in {
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = rec {
|
settings = rec {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue