add i3 and sway
This commit is contained in:
parent
64139791fd
commit
467b2cef13
32 changed files with 777 additions and 56 deletions
24
flake.lock
24
flake.lock
|
|
@ -280,6 +280,29 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"plasma-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": [
|
||||||
|
"home-manager"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730481339,
|
||||||
|
"narHash": "sha256-Y1yWhjt/38N5IMgWoGnUTzJ6F4kGnpti/l2AOJWPUOY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "plasma-manager",
|
||||||
|
"rev": "6cb0aedf6160725eee50425b4e8d908c09dcb7a3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "plasma-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
|
|
@ -289,6 +312,7 @@
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
|
"plasma-manager": "plasma-manager",
|
||||||
"stylix": "stylix"
|
"stylix": "stylix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:danth/stylix";
|
||||||
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
plasma-manager.url = "github:nix-community/plasma-manager";
|
||||||
|
plasma-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
plasma-manager.inputs.home-manager.follows = "home-manager";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,11 @@
|
||||||
./impermanence.nix
|
./impermanence.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./gui
|
./gui
|
||||||
|
./latex.nix
|
||||||
./shell
|
./shell
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./vim.nix
|
./vim.nix
|
||||||
|
./wm
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,18 @@
|
||||||
./chromium.nix
|
./chromium.nix
|
||||||
./discord.nix
|
./discord.nix
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
|
./foot.nix
|
||||||
|
./kde.nix
|
||||||
./keyd.nix
|
./keyd.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./gnome.nix
|
./gnome.nix
|
||||||
|
./i3status-rust.nix
|
||||||
./slack.nix
|
./slack.nix
|
||||||
./skype.nix
|
./skype.nix
|
||||||
./spotify.nix
|
./spotify.nix
|
||||||
./teams.nix
|
./teams.nix
|
||||||
./vscode.nix
|
./vscode.nix
|
||||||
./wezterm.nix
|
./wezterm.nix
|
||||||
./xdg-portal.nix
|
|
||||||
./zathura.nix
|
./zathura.nix
|
||||||
./zoom.nix
|
./zoom.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
11
src/home/gui/foot.nix
Normal file
11
src/home/gui/foot.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.foot = {
|
||||||
|
enable = true;
|
||||||
|
server.enable = true;
|
||||||
|
};
|
||||||
|
stylix.targets.foot = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
81
src/home/gui/i3status-rust.nix
Normal file
81
src/home/gui/i3status-rust.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
bar = {
|
||||||
|
position = "bottom";
|
||||||
|
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-${config.custom.i3status-rust.position}.toml";
|
||||||
|
} // config.lib.stylix.i3.bar;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.custom = with lib; {
|
||||||
|
i3status-rust = {
|
||||||
|
enable = mkEnableOption "i3 status rust";
|
||||||
|
position = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "bottom";
|
||||||
|
};
|
||||||
|
theme = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "native";
|
||||||
|
};
|
||||||
|
icons = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "material-nf";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.custom.i3status-rust.enable {
|
||||||
|
programs.i3status-rust = {
|
||||||
|
enable = true;
|
||||||
|
bars = {
|
||||||
|
"${config.custom.i3status-rust.position}" = {
|
||||||
|
theme = config.custom.i3status-rust.theme;
|
||||||
|
icons = config.custom.i3status-rust.icons;
|
||||||
|
blocks = [
|
||||||
|
{
|
||||||
|
block = "sound";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "net";
|
||||||
|
format = " $icon {$signal_strength|Wired connection} ";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "weather";
|
||||||
|
autolocate = true;
|
||||||
|
# format = " WTR $weather $temp ";
|
||||||
|
format = " $icon $weather $temp ";
|
||||||
|
service = {
|
||||||
|
name = "metno";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "battery";
|
||||||
|
format = " $icon $percentage ";
|
||||||
|
full_format = " $icon $percentage ";
|
||||||
|
empty_format = " $icon $percentage ";
|
||||||
|
not_charging_format = " $icon $percentage ";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "temperature";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "uptime";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "time";
|
||||||
|
interval = 60;
|
||||||
|
format = " $timestamp.datetime(f:'%a %d/%m %l:%M %p')";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xsession.windowManager.i3.config = {
|
||||||
|
bars = [ bar ];
|
||||||
|
};
|
||||||
|
wayland.windowManager.sway.config = {
|
||||||
|
bars = [ bar ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
86
src/home/gui/kde.nix
Normal file
86
src/home/gui/kde.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
{ inputs, lib, pkgs, config, stdenv, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
kdePackages.krohnkite
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.plasma = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
hotkeys = {
|
||||||
|
commands = {
|
||||||
|
# "launch-konsole" = {
|
||||||
|
# name = "Launch Konsole";
|
||||||
|
# key = "Meta+Alt+K";
|
||||||
|
# command = "konsole";
|
||||||
|
# };
|
||||||
|
"launch-terminal" = {
|
||||||
|
name = "Launch Terminal";
|
||||||
|
key = "Meta+Return";
|
||||||
|
command = "kitty";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
shortcuts = {
|
||||||
|
ksmserver = {
|
||||||
|
"Lock Session" = [
|
||||||
|
"Screensaver"
|
||||||
|
"Meta+Ctrl+Alt+L"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
kwin = {
|
||||||
|
"Window Close" = [
|
||||||
|
"Alt+F4"
|
||||||
|
"Meta+Shift+Q"
|
||||||
|
];
|
||||||
|
"Switch to Desktop 1" = [
|
||||||
|
"Meta+1"
|
||||||
|
];
|
||||||
|
"Switch to Desktop 2" = [
|
||||||
|
"Meta+2"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
plasmashell = {
|
||||||
|
"activate task manager entry 1" = [];
|
||||||
|
"activate task manager entry 2" = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
input.touchpads = [
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
name = "PIXA3854:00 093A:0274 Touchpad";
|
||||||
|
vendorId = "093A";
|
||||||
|
productId = "0274";
|
||||||
|
tapToClick = true;
|
||||||
|
disableWhileTyping = true;
|
||||||
|
naturalScroll = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
kwin = {
|
||||||
|
edgeBarrier = 0;
|
||||||
|
cornerBarrier = false;
|
||||||
|
scripts.polonium.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
configFile ={
|
||||||
|
kwinrc = {
|
||||||
|
Desktops.Number = {
|
||||||
|
value = 1;
|
||||||
|
immutable = false;
|
||||||
|
};
|
||||||
|
Windows = {
|
||||||
|
ActiveMouseScreen = false;
|
||||||
|
SeparateScreenFocus = true;
|
||||||
|
};
|
||||||
|
Plugins = {
|
||||||
|
krohnkiteEnabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
enableFishIntegration = config.programs.fish.enable;
|
enableFishIntegration = config.programs.fish.enable;
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
hide_window_decorations = "yes";
|
hide_window_decorations = "titlebar-only";
|
||||||
enable_audio_bell = "no";
|
enable_audio_bell = "no";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
xdgOpenUsePortal = true;
|
|
||||||
extraPortals = with pkgs; [
|
|
||||||
xdg-desktop-portal-kde
|
|
||||||
xdg-desktop-portal-gnome
|
|
||||||
xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
config = {
|
|
||||||
common = { default = [ "gtk" ]; };
|
|
||||||
gnome = { default = [ "gnome" "gtk" ]; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,19 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
zoom = pkgs.zoom-us.overrideAttrs (attrs: {
|
||||||
|
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ [ pkgs.bbe ];
|
||||||
|
postFixup = ''
|
||||||
|
cp $out/opt/zoom/zoom .
|
||||||
|
bbe -e 's/\0manjaro\0/\0nixos\0\0\0/' < zoom > $out/opt/zoom/zoom
|
||||||
|
'' + (attrs.postFixup or "") + ''
|
||||||
|
sed -i 's|Exec=|Exec=env XDG_CURRENT_DESKTOP="gnome" |' $out/share/applications/Zoom.desktop
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
zoom-us
|
zoom
|
||||||
];
|
];
|
||||||
|
|
||||||
custom.persist = {
|
custom.persist = {
|
||||||
|
|
|
||||||
7
src/home/latex.nix
Normal file
7
src/home/latex.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
texlive.combined.scheme-full
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -3,5 +3,9 @@
|
||||||
{
|
{
|
||||||
programs.lazygit = {
|
programs.lazygit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
reporting = "off";
|
||||||
|
startupPopupVersion = 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
20
src/home/wm/awesome.nix
Normal file
20
src/home/wm/awesome.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.custom = with lib; {
|
||||||
|
wm = {
|
||||||
|
awesome = {
|
||||||
|
enable = mkEnableOption "Awesome WM";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.custom.wm.awesome.enable {
|
||||||
|
xsession.windowManager.awesome = {
|
||||||
|
enable = true;
|
||||||
|
luaModules = with pkgs.luaPackages; [
|
||||||
|
luarocks # is the package manager for Lua modules
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
201
src/home/wm/common_i3.nix
Normal file
201
src/home/wm/common_i3.nix
Normal file
|
|
@ -0,0 +1,201 @@
|
||||||
|
{ config
|
||||||
|
, pkgs
|
||||||
|
, lib
|
||||||
|
, light
|
||||||
|
, menu
|
||||||
|
, terminal
|
||||||
|
, sound ? "pactl"
|
||||||
|
, alt ? "Mod1"
|
||||||
|
, modifier ? "Mod4"
|
||||||
|
, extraWindowOptions ? { }
|
||||||
|
, extraFocusOptions ? { }
|
||||||
|
, extraModes ? { }
|
||||||
|
, extraConfig ? ""
|
||||||
|
, workspaces ? [
|
||||||
|
{
|
||||||
|
ws = 1;
|
||||||
|
name = "1";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ws = 2;
|
||||||
|
name = "2";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ws = 3;
|
||||||
|
name = "3";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ws = 4;
|
||||||
|
name = "4";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ws = 5;
|
||||||
|
name = "5";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ws = 6;
|
||||||
|
name = "6";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ws = 7;
|
||||||
|
name = "7";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ws = 8;
|
||||||
|
name = "8";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ws = 9;
|
||||||
|
name = "9";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ws = 0;
|
||||||
|
name = "10";
|
||||||
|
}
|
||||||
|
]
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
powerManagementMode = " : Screen [l]ock, [e]xit, [s]uspend, [h]ibernate, [R]eboot, [S]hutdown";
|
||||||
|
resizeMode = " : [h] , [j] , [k] , [l] ";
|
||||||
|
|
||||||
|
# Helpers
|
||||||
|
mapDirection = { prefixKey ? null, leftCmd, downCmd, upCmd, rightCmd }:
|
||||||
|
with lib.strings; {
|
||||||
|
# Arrow keys
|
||||||
|
"${optionalString (prefixKey != null) "${prefixKey}+"}Left" = leftCmd;
|
||||||
|
"${optionalString (prefixKey != null) "${prefixKey}+"}Down" = downCmd;
|
||||||
|
"${optionalString (prefixKey != null) "${prefixKey}+"}Up" = upCmd;
|
||||||
|
"${optionalString (prefixKey != null) "${prefixKey}+"}Right" = rightCmd;
|
||||||
|
# Vi-like keys
|
||||||
|
"${optionalString (prefixKey != null) "${prefixKey}+"}h" = leftCmd;
|
||||||
|
"${optionalString (prefixKey != null) "${prefixKey}+"}j" = downCmd;
|
||||||
|
"${optionalString (prefixKey != null) "${prefixKey}+"}k" = upCmd;
|
||||||
|
"${optionalString (prefixKey != null) "${prefixKey}+"}l" = rightCmd;
|
||||||
|
};
|
||||||
|
|
||||||
|
mapDirectionDefault = { prefixKey ? null, prefixCmd }:
|
||||||
|
(mapDirection {
|
||||||
|
inherit prefixKey;
|
||||||
|
leftCmd = "${prefixCmd} left";
|
||||||
|
downCmd = "${prefixCmd} down";
|
||||||
|
upCmd = "${prefixCmd} up";
|
||||||
|
rightCmd = "${prefixCmd} right";
|
||||||
|
});
|
||||||
|
|
||||||
|
mapWorkspacesStr = with builtins;
|
||||||
|
with lib.strings;
|
||||||
|
{ workspaces, prefixKey ? null, prefixCmd }:
|
||||||
|
(concatStringsSep "\n" (map
|
||||||
|
({ ws, name }:
|
||||||
|
''
|
||||||
|
bindsym ${optionalString (prefixKey != null) "${prefixKey}+"}${
|
||||||
|
toString ws
|
||||||
|
} ${prefixCmd} "${name}"'')
|
||||||
|
workspaces));
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit modifier terminal;
|
||||||
|
|
||||||
|
helpers = { inherit mapDirection mapDirectionDefault mapWorkspacesStr; };
|
||||||
|
|
||||||
|
config = {
|
||||||
|
inherit modifier terminal;
|
||||||
|
|
||||||
|
keybindings = {
|
||||||
|
"${modifier}+space" = "exec ${menu}";
|
||||||
|
|
||||||
|
"${modifier}+Return" = "exec ${terminal}";
|
||||||
|
"${modifier}+Shift+Return" = "exec ${terminal} bash -c \"tmux attach || tmux new-session\"";
|
||||||
|
|
||||||
|
"${modifier}+r" = ''mode "${resizeMode}"'';
|
||||||
|
"${modifier}+Escape" = ''mode "${powerManagementMode}"'';
|
||||||
|
|
||||||
|
"${modifier}+Shift+c" = "reload";
|
||||||
|
"${modifier}+Shift+r" = "restart";
|
||||||
|
"${modifier}+Shift+q" = "kill";
|
||||||
|
"${modifier}+Shift+e" = "exit";
|
||||||
|
"${alt}+F4" = "kill";
|
||||||
|
|
||||||
|
"${modifier}+h" = "focus left";
|
||||||
|
"${modifier}+j" = "focus down";
|
||||||
|
"${modifier}+k" = "focus up";
|
||||||
|
"${modifier}+l" = "focus right";
|
||||||
|
|
||||||
|
"${modifier}+s" = "layout stacking";
|
||||||
|
"${modifier}+t" = "layout tabbed";
|
||||||
|
"${modifier}+e" = "layout toggle split";
|
||||||
|
"${modifier}+Shift+p" = "floating toggle";
|
||||||
|
"${modifier}+p" = "focus mode_toggle";
|
||||||
|
"${modifier}+f" = "fullscreen toggle";
|
||||||
|
"${modifier}+Shift+v" = "split h";
|
||||||
|
"${modifier}+v" = "split v";
|
||||||
|
|
||||||
|
"${modifier}+Shift+h" = "move left";
|
||||||
|
"${modifier}+Shift+j" = "move down";
|
||||||
|
"${modifier}+Shift+k" = "move up";
|
||||||
|
"${modifier}+Shift+l" = "move right";
|
||||||
|
|
||||||
|
"XF86MonBrightnessUp" = "exec --no-startup-id ${light} -A 10%";
|
||||||
|
"XF86MonBrightnessDown" = "exec --no-startup-id ${light} -U 10%";
|
||||||
|
};
|
||||||
|
|
||||||
|
modes =
|
||||||
|
let
|
||||||
|
exitMode = {
|
||||||
|
"Escape" = "mode default";
|
||||||
|
"Return" = "mode default";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
${resizeMode} = (mapDirection {
|
||||||
|
leftCmd = "resize shrink width 10px or 10ppt";
|
||||||
|
downCmd = "resize grow height 10px or 10ppt";
|
||||||
|
upCmd = "resize shrink height 10px or 10ppt";
|
||||||
|
rightCmd = "resize grow width 10px or 10ppt";
|
||||||
|
}) // exitMode;
|
||||||
|
${powerManagementMode} = {
|
||||||
|
l = "mode default, exec loginctl lock-session";
|
||||||
|
e = "mode default, exec loginctl terminate-session $XDG_SESSION_ID";
|
||||||
|
s = "mode default, exec systemctl suspend";
|
||||||
|
h = "mode default, exec systemctl hibernate";
|
||||||
|
"Shift+r" = "mode default, exec systemctl reboot";
|
||||||
|
"Shift+s" = "mode default, exec systemctl poweroff";
|
||||||
|
} // exitMode;
|
||||||
|
} // extraModes;
|
||||||
|
|
||||||
|
workspaceAutoBackAndForth = true;
|
||||||
|
workspaceLayout = "tabbed";
|
||||||
|
|
||||||
|
window = {
|
||||||
|
border = 1;
|
||||||
|
hideEdgeBorders = "smart";
|
||||||
|
titlebar = false;
|
||||||
|
} // extraWindowOptions;
|
||||||
|
|
||||||
|
focus = { followMouse = false; } // extraFocusOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Until this issue is fixed we need to map workspaces directly to config file
|
||||||
|
# https://github.com/nix-community/home-manager/issues/695
|
||||||
|
extraConfig =
|
||||||
|
let
|
||||||
|
workspaceStr = (builtins.concatStringsSep "\n" [
|
||||||
|
(mapWorkspacesStr {
|
||||||
|
inherit workspaces;
|
||||||
|
prefixKey = modifier;
|
||||||
|
prefixCmd = "workspace number";
|
||||||
|
})
|
||||||
|
(mapWorkspacesStr {
|
||||||
|
inherit workspaces;
|
||||||
|
prefixKey = "${modifier}+Shift";
|
||||||
|
prefixCmd = "move container to workspace number";
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
in
|
||||||
|
''
|
||||||
|
${workspaceStr}
|
||||||
|
${extraConfig}
|
||||||
|
'';
|
||||||
|
}
|
||||||
11
src/home/wm/default.nix
Normal file
11
src/home/wm/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
_: {
|
||||||
|
imports = [
|
||||||
|
./awesome.nix
|
||||||
|
./i3.nix
|
||||||
|
./sway.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
xsession.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
51
src/home/wm/i3.nix
Normal file
51
src/home/wm/i3.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
|
|
||||||
|
let
|
||||||
|
pactl = lib.getExe' pkgs.pulseaudio "pactl";
|
||||||
|
maim = lib.getExe' pkgs.maim "maim";
|
||||||
|
clipboard-copy = lib.getExe' pkgs.xclip "xclip";
|
||||||
|
commonOptions = import ./common_i3.nix rec {
|
||||||
|
inherit config lib pkgs;
|
||||||
|
light = lib.getExe' pkgs.light "light";
|
||||||
|
menu = lib.getExe' pkgs.dmenu "dmenu_run";
|
||||||
|
terminal =
|
||||||
|
if config.programs.kitty.enable then
|
||||||
|
lib.getExe' config.programs.kitty.package "kitty"
|
||||||
|
else
|
||||||
|
lib.getExe' pkgs.xterm "xterm";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.custom = with lib; {
|
||||||
|
wm = {
|
||||||
|
i3 = {
|
||||||
|
enable = mkEnableOption "i3 WM";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.custom.wm.i3.enable {
|
||||||
|
xsession.windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = commonOptions.extraConfig;
|
||||||
|
config = lib.mkMerge ([
|
||||||
|
commonOptions.config
|
||||||
|
{
|
||||||
|
# modifier = "Mod4";
|
||||||
|
# terminal = "kitty";
|
||||||
|
keybindings = {
|
||||||
|
"XF86AudioRaiseVolume" = "exec --no-startup-id '${pactl} set-sink-volume @DEFAULT_SINK@ 1%'";
|
||||||
|
"XF86AudioLowerVolume" = "exec --no-startup-id '${pactl} set-sink-volume @DEFAULT_SINK@ -1%'";
|
||||||
|
"XF86AudioMute" = "exec --no-startup-id '${pactl} set-sink-volume @DEFAULT_SINK@ toggle'";
|
||||||
|
"XF86AudioMicMute" = "exec --no-startup-id '${pactl} set-source-mute @DEFAULT_SOURCE@ toggle'";
|
||||||
|
"${commonOptions.modifier}+o" = "exec --no-startup-id ${maim} -s ~/pictures/screenshots/$(date +%Y-%m-%d-%H-%M-%S).png";
|
||||||
|
"${commonOptions.modifier}+Shift+o" = "exec --no-startup-id ${maim} -s | ${clipboard-copy} -selection clipboard -t image/png";
|
||||||
|
"PRINT" = "exec --no-startup-id ${maim} -s | ${clipboard-copy} -selection clipboard -t image/png";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
stylix.targets.i3.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
53
src/home/wm/sway.nix
Normal file
53
src/home/wm/sway.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
swayosd = lib.getExe' config.services.swayosd.package "swayosd-client";
|
||||||
|
pactl = lib.getExe' pkgs.pulseaudio "pactl";
|
||||||
|
grim = lib.getExe' pkgs.grim "grim";
|
||||||
|
slurp = lib.getExe' pkgs.slurp "slurp";
|
||||||
|
clipboard-copy = lib.getExe' pkgs.wl-clipboard "wl-copy";
|
||||||
|
commonOptions = import ./common_i3.nix rec {
|
||||||
|
inherit config lib pkgs;
|
||||||
|
light = lib.getExe' pkgs.light "light";
|
||||||
|
menu = lib.getExe' pkgs.bemenu "bemenu-run";
|
||||||
|
terminal =
|
||||||
|
if config.programs.kitty.enable then
|
||||||
|
lib.getExe' config.programs.kitty.package "kitty"
|
||||||
|
else
|
||||||
|
lib.getExe' pkgs.foot "foot";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.custom = with lib; {
|
||||||
|
wm = {
|
||||||
|
sway = {
|
||||||
|
enable = mkEnableOption "Sway WM";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.custom.wm.sway.enable {
|
||||||
|
services.swayosd = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = commonOptions.extraConfig;
|
||||||
|
config = lib.mkMerge ([
|
||||||
|
commonOptions.config
|
||||||
|
{
|
||||||
|
keybindings = {
|
||||||
|
"XF86AudioRaiseVolume" = "exec --no-startup-id '${swayosd} --output-volume=raise'";
|
||||||
|
"XF86AudioLowerVolume" = "exec --no-startup-id '${swayosd} --output-volume=lower'";
|
||||||
|
"XF86AudioMute" = "exec --no-startup-id '${swayosd} --output-volume=mute-toggle";
|
||||||
|
"XF86AudioMicMute" = "exec --no-startup-id '${pactl} set-source-mute @DEFAULT_SOURCE@ toggle'";
|
||||||
|
"${commonOptions.modifier}+o" = "exec --no-startup-id ${grim} -g \"\$(${slurp})\" ~/pictures/screenshots/$(date +%Y-%m-%d-%H-%M-%S).png";
|
||||||
|
"${commonOptions.modifier}+Shift+o" = "exec --no-startup-id ${grim} -g \"\$(${slurp})\" -t png - | ${clipboard-copy}";
|
||||||
|
"PRINT" = "exec --no-startup-id ${grim} -g \"\$(${slurp})\" -t png - | ${clipboard-copy}";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
stylix.targets.sway.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -43,6 +43,7 @@ let
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nix-index-database.hmModules.nix-index
|
inputs.nix-index-database.hmModules.nix-index
|
||||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
inputs.impermanence.nixosModules.home-manager.impermanence
|
||||||
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||||
./${host}/home.nix
|
./${host}/home.nix
|
||||||
../home
|
../home
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,9 @@
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.xkb.layout = "us";
|
services.xserver.xkb.layout = "us";
|
||||||
|
|
||||||
security.pam.services.login.fprintAuth = false;
|
|
||||||
security.pam.services.sudo.fprintAuth = false;
|
|
||||||
|
|
||||||
# framework setting
|
# framework setting
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
hardware.framework.amd-7040.preventWakeOnAC = true;
|
hardware.framework.amd-7040.preventWakeOnAC = true;
|
||||||
services.fprintd.enable = true;
|
|
||||||
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
services.printing.drivers = with pkgs; [
|
services.printing.drivers = with pkgs; [
|
||||||
|
|
@ -38,11 +34,22 @@
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
custom.touchpad.enable = true;
|
custom = {
|
||||||
custom.gnome = {
|
touchpad.enable = true;
|
||||||
|
fingerprint.enable = true;
|
||||||
|
wm = {
|
||||||
|
i3.enable = true;
|
||||||
|
sway.enable = true;
|
||||||
|
};
|
||||||
|
gnome = {
|
||||||
enable = true;
|
enable = true;
|
||||||
stylix = true;
|
stylix = true;
|
||||||
};
|
};
|
||||||
|
kde = {
|
||||||
|
enable = false;
|
||||||
|
stylix = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,21 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./audio.nix
|
|
||||||
./1password.nix
|
./1password.nix
|
||||||
|
./displaymanager.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
|
./fingerprint.nix
|
||||||
./gnome.nix
|
./gnome.nix
|
||||||
./impermanence.nix
|
./impermanence.nix
|
||||||
|
./kde.nix
|
||||||
./keyd.nix
|
./keyd.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
./pipewire.nix
|
||||||
./stylix.nix
|
./stylix.nix
|
||||||
./touchpad.nix
|
./touchpad.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
|
./xdg-portal.nix
|
||||||
|
./wm
|
||||||
./zfs.nix
|
./zfs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
29
src/nixos/displaymanager.nix
Normal file
29
src/nixos/displaymanager.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ config, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager = {
|
||||||
|
gdm.enable = true;
|
||||||
|
# lightdm.enable = true;
|
||||||
|
session = [
|
||||||
|
{
|
||||||
|
manage = "desktop";
|
||||||
|
name = "xsession";
|
||||||
|
start = ''
|
||||||
|
exec $HOME/.xsession
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
displayManager = {
|
||||||
|
# sddm.enable = true;
|
||||||
|
# defaultSession = "xsession";
|
||||||
|
};
|
||||||
|
gnome.gnome-keyring.enable = !config.custom.kde.enable;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.polkit.enable = true;
|
||||||
|
}
|
||||||
20
src/nixos/fingerprint.nix
Normal file
20
src/nixos/fingerprint.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.custom = with lib; {
|
||||||
|
fingerprint = {
|
||||||
|
enable = mkEnableOption "Fingerprint";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.custom.fingerprint.enable {
|
||||||
|
services.fprintd.enable = true;
|
||||||
|
security.pam.services.login.fprintAuth = false;
|
||||||
|
security.pam.services.sudo.fprintAuth = false;
|
||||||
|
custom.persist = {
|
||||||
|
root.directories = [
|
||||||
|
"/var/lib/fprint"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -29,8 +29,11 @@
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
fonts.fontDir.enable = true;
|
fonts.fontDir.enable = true;
|
||||||
fonts.packages = [
|
fonts.packages = with pkgs; [
|
||||||
config.custom.nerdfonts.package
|
config.custom.nerdfonts.package
|
||||||
|
font-awesome
|
||||||
|
powerline-fonts
|
||||||
|
powerline-symbols
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.custom.gnome.enable {
|
config = lib.mkMerge [
|
||||||
|
(lib.mkIf config.custom.gnome.enable {
|
||||||
services = {
|
services = {
|
||||||
xserver.enable = true;
|
# xserver.displayManager.gdm.enable = true;
|
||||||
xserver.displayManager.gdm.enable = true;
|
|
||||||
xserver.desktopManager.gnome.enable = true;
|
xserver.desktopManager.gnome.enable = true;
|
||||||
};
|
};
|
||||||
environment.gnome.excludePackages = with pkgs; [
|
environment.gnome.excludePackages = with pkgs; [
|
||||||
|
|
@ -28,7 +28,10 @@
|
||||||
gnome-maps
|
gnome-maps
|
||||||
gnome-disk-utility
|
gnome-disk-utility
|
||||||
];
|
];
|
||||||
|
})
|
||||||
|
{
|
||||||
stylix.targets.gnome.enable = config.custom.gnome.stylix;
|
stylix.targets.gnome.enable = config.custom.gnome.stylix;
|
||||||
hm.stylix.targets.gnome.enable = config.custom.gnome.stylix;
|
hm.stylix.targets.gnome.enable = config.custom.gnome.stylix;
|
||||||
};
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
src/nixos/kde.nix
Normal file
22
src/nixos/kde.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.custom = with lib; {
|
||||||
|
kde = {
|
||||||
|
enable = mkEnableOption "KDE Desktop";
|
||||||
|
stylix = mkEnableOption "KDE Stylix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkMerge [
|
||||||
|
(lib.mkIf config.custom.kde.enable {
|
||||||
|
services = {
|
||||||
|
# displayManager.sddm.enable = true;
|
||||||
|
desktopManager.plasma6.enable = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
{
|
||||||
|
hm.stylix.targets.kde.enable = config.custom.kde.stylix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
autoEnable = false;
|
autoEnable = false;
|
||||||
image = pkgs.nixos-artwork.wallpapers.nineish-dark-gray.src;
|
image = pkgs.nixos-artwork.wallpapers.nineish-dark-gray.src;
|
||||||
# base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-hard.yaml";
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruber.yaml";
|
# base16Scheme = "${pkgs.base16-schemes}/share/themes/gruber.yaml";
|
||||||
polarity = "dark";
|
polarity = "dark";
|
||||||
fonts = {
|
fonts = {
|
||||||
serif = config.stylix.fonts.sansSerif;
|
serif = config.stylix.fonts.sansSerif;
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@
|
||||||
# initialPassword = "password";
|
# initialPassword = "password";
|
||||||
hashedPasswordFile = "/persist/etc/shadow/${user}";
|
hashedPasswordFile = "/persist/etc/shadow/${user}";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
|
"video"
|
||||||
|
"audio"
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel"
|
"wheel"
|
||||||
"keyd"
|
"keyd"
|
||||||
|
|
|
||||||
6
src/nixos/wm/default.nix
Normal file
6
src/nixos/wm/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
_: {
|
||||||
|
imports = [
|
||||||
|
./i3.nix
|
||||||
|
./sway.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
30
src/nixos/wm/i3.nix
Normal file
30
src/nixos/wm/i3.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.custom = with lib; {
|
||||||
|
wm = {
|
||||||
|
i3 = {
|
||||||
|
enable = mkEnableOption "i3 WM";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.custom.wm.i3.enable {
|
||||||
|
services.xserver = {
|
||||||
|
desktopManager = {
|
||||||
|
xterm.enable = false;
|
||||||
|
};
|
||||||
|
windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
dmenu
|
||||||
|
i3status
|
||||||
|
i3lock
|
||||||
|
i3blocks
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
hm.custom.wm.i3.enable = true;
|
||||||
|
hm.custom.i3status-rust.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
20
src/nixos/wm/sway.nix
Normal file
20
src/nixos/wm/sway.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.custom = with lib; {
|
||||||
|
wm = {
|
||||||
|
sway = {
|
||||||
|
enable = mkEnableOption "Sway WM";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.custom.wm.sway.enable {
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
};
|
||||||
|
hm.custom.wm.sway.enable = true;
|
||||||
|
hm.custom.i3status-rust.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
23
src/nixos/xdg-portal.nix
Normal file
23
src/nixos/xdg-portal.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
# xdgOpenUsePortal = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
# xdg-desktop-portal-kde
|
||||||
|
# xdg-desktop-portal-gnome
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
# config = {
|
||||||
|
# common = { default = [ "gtk" ]; };
|
||||||
|
# gnome = { default = [ "gnome" "gtk" ]; };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"L+ /usr/libexec/xdg-desktop-portal - - - - ${pkgs.xdg-desktop-portal}/libexec/xdg-desktop-portal"
|
||||||
|
# "L+ /usr/libexec/xdg-desktop-portal-hyprland - - - - ${pkgs.xdg-desktop-portal-hyprland}/libexec/xdg-desktop-portal-hyprland"
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue