mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
add i3 module
This commit is contained in:
parent
94923e03e6
commit
18a1134dd6
4 changed files with 101 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
desktop = import ./modules/desktop.nix;
|
||||
gnome = import ./modules/gnome.nix;
|
||||
gnome-monitor-settings-tweak = import ./modules/gnome-monitor-settings-tweak;
|
||||
i3 = import ./modules/i3;
|
||||
mouse-dpi = import ./modules/mouse-dpi.nix;
|
||||
phpipam = import ./modules/phpipam.nix;
|
||||
pipewire = import ./modules/pipewire.nix;
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
gnome = true;
|
||||
profile = "desktop";
|
||||
security-tools = true;
|
||||
i3.extraConfig = ''
|
||||
exec xrandr --output DisplayPort-0 --mode 2560x1440 --rate 165
|
||||
exec xrandr --output DisplayPort-1 --mode 2560x1440 --rate 165
|
||||
'';
|
||||
};
|
||||
|
||||
environment.etc."sway/config.d/sconfig.conf".source = pkgs.writeText "sway.conf" ''
|
||||
|
|
69
modules/i3/default.nix
Normal file
69
modules/i3/default.nix
Normal file
|
@ -0,0 +1,69 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.sconfig.i3;
|
||||
in
|
||||
{
|
||||
options.sconfig.i3 = {
|
||||
enable = lib.mkEnableOption "Enable the i3 Window Manager";
|
||||
extraConfig = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.xserver.windowManager.i3 = {
|
||||
enable = true;
|
||||
extraSessionCommands = ''
|
||||
mkdir -p ~/.local/share/icons/default
|
||||
ln -sf /run/current-system/sw/share/icons/Yaru/cursor.theme ~/.local/share/icons/default/index.theme
|
||||
echo 'Xft.dpi: 96' > ~/.Xresources
|
||||
echo 'Xcursor.size: 24' >> ~/.Xresources
|
||||
'';
|
||||
};
|
||||
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
environment.etc."xdg/gtk-3.0/settings.ini".text = ''
|
||||
[Settings]
|
||||
gtk-theme-name=Yaru-dark
|
||||
gtk-icon-theme-name=Numix
|
||||
'';
|
||||
|
||||
environment.etc."i3/config".source = pkgs.runCommand "i3config" { } ''
|
||||
(
|
||||
cat '${pkgs.i3}/etc/i3/config' |
|
||||
sed 's/Mod1/Mod4/' |
|
||||
sed 's/exec i3-config-wizard//' |
|
||||
sed 's/^font/#font/' |
|
||||
sed 's,status_command i3status,status_command i3status -c ${./i3status.conf},' |
|
||||
sed 's/i3-sensible-terminal/alacritty/' |
|
||||
sed 's/10%/2%/'
|
||||
cat '${pkgs.writeText "i3extra" cfg.extraConfig}'
|
||||
)|
|
||||
tee "$out"
|
||||
'';
|
||||
|
||||
services.gvfs.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
libinput.enable = true;
|
||||
displayManager.sddm.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
alacritty
|
||||
numix-icon-theme
|
||||
yaru-theme
|
||||
gnome3.networkmanagerapplet
|
||||
gnome3.file-roller
|
||||
gnome3.adwaita-icon-theme
|
||||
mate.mate-terminal
|
||||
xfce.thunar
|
||||
xfce.thunar-archive-plugin
|
||||
caffeine-ng
|
||||
];
|
||||
};
|
||||
}
|
27
modules/i3/i3status.conf
Normal file
27
modules/i3/i3status.conf
Normal file
|
@ -0,0 +1,27 @@
|
|||
general {
|
||||
colors = true
|
||||
interval = 5
|
||||
}
|
||||
|
||||
order += "battery all"
|
||||
order += "volume master"
|
||||
order += "tztime local"
|
||||
|
||||
volume master {
|
||||
format = "[♪ %volume]"
|
||||
}
|
||||
|
||||
battery all {
|
||||
format = "%status %percentage %remaining"
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
memory {
|
||||
format = "%used | %available"
|
||||
threshold_degraded = "1G"
|
||||
format_degraded = "MEMORY < %available"
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "%m/%d %H:%M:%S"
|
||||
}
|
Loading…
Reference in a new issue