add i3, enable xsession

This commit is contained in:
Fabián Montero 2022-03-21 23:05:56 -06:00
parent 727aed6ae4
commit e8f6eb4a2a
3 changed files with 79 additions and 63 deletions

View file

@ -35,23 +35,17 @@
}; };
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver.enable = true; # quitar luego services.xserver = {
enable = true;
layout = "us";
# Enable the Plasma 5 Desktop Environment. libinput.enable = true;
services.xserver.displayManager.sddm.enable = true; # quitar luego displayManager.startx.enable = true;
services.xserver.desktopManager.plasma5.enable = true; # quitar luego };
# Configure keymap in X11
services.xserver.layout = "us";
# Enable sound. # Enable sound.
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = true; hardware.pulseaudio.enable = true;
services.xserver.libinput.enable = true;
programs.zsh.enable = true; programs.zsh.enable = true;
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];

View file

@ -18,7 +18,15 @@
nix.registry."nixpkgs".flake = nixpkgs; nix.registry."nixpkgs".flake = nixpkgs;
xsession.enable = true;
xsession.windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
extraConfig = import ./i3 pkgs;
};
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.neovim.enable = true; programs.neovim.enable = true;
programs.zsh = { programs.zsh = {
@ -32,7 +40,21 @@
# confiugrar luego # confiugrar luego
}; };
# configurable = [ neovim keyboardlayout pulsaudio i3-gaps dunst rofi ]; # configurable = [ neovim keyboardlayout pulsaudio dunst rofi ];
services.picom = {
enable = true;
};
services.polybar = {
enable = true;
script = import ./i3/polybar/launch.sh.nix;
extraConfig = import ./i3/polybar/config.nix;
};
services.dunst = {
enable = true;
};
programs.vscode = { programs.vscode = {
enable = true; enable = true;

View file

@ -1,9 +1,9 @@
'' ''
[colors] [colors]
;background = ${xrdb:color0:#222} ;background = ''${xrdb:color0:#222}
background = #AA000000 background = #AA000000
background-alt = #00000000 background-alt = #00000000
;foreground = ${xrdb:color7:#222} ;foreground = ''${xrdb:color7:#222}
foreground = #ffffff foreground = #ffffff
foreground-alt = #ffffff foreground-alt = #ffffff
primary = #ffffff primary = #ffffff
@ -11,8 +11,8 @@ secondary = #e60053
alert = #bd2c40 alert = #bd2c40
[bar/main] [bar/main]
monitor = ${env:MONITOR:DisplayPort-0} monitor = ''${env:MONITOR:DisplayPort-0}
;monitor = ${env:MONITOR:HDMI-A-0} ;monitor = ''${env:MONITOR:HDMI-A-0}
width = 100% width = 100%
height = 30 height = 30
offset-x = 0% offset-x = 0%
@ -20,8 +20,8 @@ offset-y = 0%
radius = 0.0 radius = 0.0
fixed-center = false fixed-center = false
background = ${colors.background} background = ''${colors.background}
foreground = ${colors.foreground} foreground = ''${colors.foreground}
line-size = 1 line-size = 1
line-color = #f00 line-color = #f00
@ -61,8 +61,8 @@ cursor-click = pointer
cursor-scroll = ns-resize cursor-scroll = ns-resize
[bar/secondary] [bar/secondary]
;monitor = ${env:MONITOR:DisplayPort-1} ;monitor = ''${env:MONITOR:DisplayPort-1}
monitor = ${env:MONITOR:HDMI-A-0} monitor = ''${env:MONITOR:HDMI-A-0}
width = 100% width = 100%
height = 30 height = 30
offset-x = 0% offset-x = 0%
@ -70,8 +70,8 @@ offset-y = 0%
radius = 0.0 radius = 0.0
fixed-center = false fixed-center = false
background = ${colors.background} background = ''${colors.background}
foreground = ${colors.foreground} foreground = ''${colors.foreground}
line-size = 1 line-size = 1
line-color = #f00 line-color = #f00
@ -115,13 +115,13 @@ type = internal/xkeyboard
blacklist-0 = num lock blacklist-0 = num lock
format-prefix = "" format-prefix = ""
format-prefix-foreground = ${colors.foreground-alt} format-prefix-foreground = ''${colors.foreground-alt}
label-layout = %layout% label-layout = %layout%
label-indicator-padding = 2 label-indicator-padding = 2
label-indicator-margin = 1 label-indicator-margin = 1
label-indicator-background = ${colors.secondary} label-indicator-background = ''${colors.secondary}
[module/filesystem] [module/filesystem]
type = internal/fs type = internal/fs
@ -148,12 +148,12 @@ wrapping-scroll = false
label-mode-padding = 1 label-mode-padding = 1
label-mode-foreground = #000 label-mode-foreground = #000
label-mode-background = ${colors.primary} label-mode-background = ''${colors.primary}
; focused = Active workspace on focused monitor ; focused = Active workspace on focused monitor
label-focused = %index% label-focused = %index%
label-focused-background = ${colors.background} label-focused-background = ''${colors.background}
label-focused-underline= ${colors.primary} label-focused-underline= ''${colors.primary}
label-focused-padding = 1 label-focused-padding = 1
; unfocused = Inactive workspace on any monitor ; unfocused = Inactive workspace on any monitor
@ -162,13 +162,13 @@ label-unfocused-padding = 1
; visible = Active workspace on unfocused monitor ; visible = Active workspace on unfocused monitor
label-visible = %index% label-visible = %index%
label-visible-background = ${self.label-focused-background} label-visible-background = ''${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline} label-visible-underline = ''${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding} label-visible-padding = ''${self.label-focused-padding}
; urgent = Workspace with urgency hint set ; urgent = Workspace with urgency hint set
label-urgent = %index% label-urgent = %index%
label-urgent-background = ${colors.alert} label-urgent-background = ''${colors.alert}
label-urgent-padding = 1 label-urgent-padding = 1
[module/xbacklight] [module/xbacklight]
@ -186,7 +186,7 @@ bar-fill-font = 2
bar-fill-foreground = #9f78e1 bar-fill-foreground = #9f78e1
bar-empty = bar-empty =
bar-empty-font = 2 bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt} bar-empty-foreground = ''${colors.foreground-alt}
[module/backlight-acpi] [module/backlight-acpi]
inherit = module/xbacklight inherit = module/xbacklight
@ -197,14 +197,14 @@ card = intel_backlight
type = internal/cpu type = internal/cpu
interval = 2 interval = 2
format-prefix = "cpu " format-prefix = "cpu "
format-prefix-foreground = ${colors.foreground-alt} format-prefix-foreground = ''${colors.foreground-alt}
label = %percentage:2%% label = %percentage:2%%
[module/memory] [module/memory]
type = internal/memory type = internal/memory
interval = 2 interval = 2
format-prefix = "mem " format-prefix = "mem "
format-prefix-foreground = ${colors.foreground-alt} format-prefix-foreground = ''${colors.foreground-alt}
label = %percentage_used%% label = %percentage_used%%
[module/wlan] [module/wlan]
@ -217,16 +217,16 @@ label-connected = %essid%
format-disconnected = format-disconnected =
;format-disconnected = <label-disconnected> ;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline} ;format-disconnected-underline = ''${self.format-connected-underline}
;label-disconnected = %ifname% disconnected ;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt} ;label-disconnected-foreground = ''${colors.foreground-alt}
ramp-signal-0 = "" ramp-signal-0 = ""
ramp-signal-1 = "" ramp-signal-1 = ""
ramp-signal-2 = "" ramp-signal-2 = ""
ramp-signal-3 = "" ramp-signal-3 = ""
ramp-signal-4 = "" ramp-signal-4 = ""
ramp-signal-foreground = ${colors.foreground-alt} ramp-signal-foreground = ''${colors.foreground-alt}
[module/eth] [module/eth]
type = internal/network type = internal/network
@ -234,14 +234,14 @@ interface = enp8s0
interval = 3.0 interval = 3.0
format-connected-prefix = "" format-connected-prefix = ""
format-connected-prefix-foreground = ${colors.foreground-alt} format-connected-prefix-foreground = ''${colors.foreground-alt}
label-connected = %local_ip% label-connected = %local_ip%
format-disconnected = format-disconnected =
;format-disconnected = <label-disconnected> ;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline} ;format-disconnected-underline = ''${self.format-connected-underline}
;label-disconnected = %ifname% disconnected ;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt} ;label-disconnected-foreground = ''${colors.foreground-alt}
[module/date] [module/date]
type = internal/date type = internal/date
@ -254,7 +254,7 @@ time = %H:%M
time-alt = " [%s]" time-alt = " [%s]"
format-prefix = "" format-prefix = ""
format-prefix-foreground = ${colors.foreground-alt} format-prefix-foreground = ''${colors.foreground-alt}
label = %date% %time% label = %date% %time%
@ -269,10 +269,10 @@ type = internal/pulseaudio
format-volume = <label-volume> format-volume = <label-volume>
label-volume = vol %percentage%% label-volume = vol %percentage%%
label-volume-foreground = ${root.foreground} label-volume-foreground = ''${root.foreground}
label-muted = vol 0% label-muted = vol 0%
label-muted-foreground = ${root.foreground} label-muted-foreground = ''${root.foreground}
bar-volume-width = 10 bar-volume-width = 10
bar-volume-foreground-0 = #55aa55 bar-volume-foreground-0 = #55aa55
@ -289,17 +289,17 @@ bar-volume-fill = ─
bar-volume-fill-font = 2 bar-volume-fill-font = 2
bar-volume-empty = bar-volume-empty =
bar-volume-empty-font = 2 bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt} bar-volume-empty-foreground = ''${colors.foreground-alt}
[module/alsa] [module/alsa]
type = internal/alsa type = internal/alsa
format-volume = <label-volume> <bar-volume> format-volume = <label-volume> <bar-volume>
label-volume = VOL label-volume = VOL
label-volume-foreground = ${root.foreground} label-volume-foreground = ''${root.foreground}
format-muted-prefix = "vol " format-muted-prefix = "vol "
format-muted-foreground = ${colors.foreground-alt} format-muted-foreground = ''${colors.foreground-alt}
label-muted = sound muted label-muted = sound muted
bar-volume-width = 10 bar-volume-width = 10
@ -317,7 +317,7 @@ bar-volume-fill = ─
bar-volume-fill-font = 2 bar-volume-fill-font = 2
bar-volume-empty = bar-volume-empty =
bar-volume-empty-font = 2 bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt} bar-volume-empty-foreground = ''${colors.foreground-alt}
[module/battery] [module/battery]
type = internal/battery type = internal/battery
@ -329,27 +329,27 @@ format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging> format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline} format-discharging-underline = ''${self.format-charging-underline}
format-full-prefix = " " format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt} format-full-prefix-foreground = ''${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline} format-full-underline = ''${self.format-charging-underline}
ramp-capacity-0 = ramp-capacity-0 =
ramp-capacity-1 = ramp-capacity-1 =
ramp-capacity-2 = ramp-capacity-2 =
ramp-capacity-foreground = ${colors.foreground-alt} ramp-capacity-foreground = ''${colors.foreground-alt}
animation-charging-0 = animation-charging-0 =
animation-charging-1 = animation-charging-1 =
animation-charging-2 = animation-charging-2 =
animation-charging-foreground = ${colors.foreground-alt} animation-charging-foreground = ''${colors.foreground-alt}
animation-charging-framerate = 750 animation-charging-framerate = 750
animation-discharging-0 = animation-discharging-0 =
animation-discharging-1 = animation-discharging-1 =
animation-discharging-2 = animation-discharging-2 =
animation-discharging-foreground = ${colors.foreground-alt} animation-discharging-foreground = ''${colors.foreground-alt}
animation-discharging-framerate = 750 animation-discharging-framerate = 750
[module/temperature] [module/temperature]
@ -362,12 +362,12 @@ format-warn = <ramp> <label-warn>
label = cpu %temperature-c% label = cpu %temperature-c%
label-warn = cpu %temperature-c% label-warn = cpu %temperature-c%
label-warn-foreground = ${colors.secondary} label-warn-foreground = ''${colors.secondary}
ramp-0 = "" ramp-0 = ""
ramp-1 = "" ramp-1 = ""
ramp-2 = "" ramp-2 = ""
ramp-foreground = ${colors.foreground-alt} ramp-foreground = ''${colors.foreground-alt}
[module/gputemperature] [module/gputemperature]
type = internal/temperature type = internal/temperature
@ -379,12 +379,12 @@ format-warn = <ramp> <label-warn>
label = gpu %temperature-c% label = gpu %temperature-c%
label-warn = gpu %temperature-c% label-warn = gpu %temperature-c%
label-warn-foreground = ${colors.secondary} label-warn-foreground = ''${colors.secondary}
ramp-0 = "" ramp-0 = ""
ramp-1 = "" ramp-1 = ""
ramp-2 = "" ramp-2 = ""
ramp-foreground = ${colors.foreground-alt} ramp-foreground = ''${colors.foreground-alt}
[module/nvmetemperature] [module/nvmetemperature]
type = internal/temperature type = internal/temperature
@ -396,12 +396,12 @@ format-warn = <ramp> <label-warn>
label = M.2 %temperature-c% label = M.2 %temperature-c%
label-warn = M.2 %temperature-c% label-warn = M.2 %temperature-c%
label-warn-foreground = ${colors.secondary} label-warn-foreground = ''${colors.secondary}
ramp-0 = "" ramp-0 = ""
ramp-1 = "" ramp-1 = ""
ramp-2 = "" ramp-2 = ""
ramp-foreground = ${colors.foreground-alt} ramp-foreground = ''${colors.foreground-alt}
[module/powermenu] [module/powermenu]
type = custom/menu type = custom/menu
@ -411,11 +411,11 @@ expand-right = true
format-spacing = 1 format-spacing = 1
label-open = label-open =
label-open-foreground = ${colors.secondary} label-open-foreground = ''${colors.secondary}
label-close = cancel label-close = cancel
label-close-foreground = ${colors.secondary} label-close-foreground = ''${colors.secondary}
label-separator = | label-separator = |
label-separator-foreground = ${colors.foreground-alt} label-separator-foreground = ''${colors.foreground-alt}
menu-0-0 = reboot menu-0-0 = reboot
menu-0-0-exec = menu-open-1 menu-0-0-exec = menu-open-1