diff --git a/nixos/home/base.nix b/nixos/home/base.nix index 5daf78b..92a4fbd 100644 --- a/nixos/home/base.nix +++ b/nixos/home/base.nix @@ -38,126 +38,6 @@ }; }; - services = { - polybar = { - enable = true; - script = "polybar &"; - settings = - let - background = "#0000"; - foreground = "#030910"; - color0 = "#d9eafd"; - color1 = "#bcccdc"; - color2 = "#9aa6b2"; - in { - "global/wm" = { - margin-top = 2; - margin-bottom = 2; - }; - "bar/top" = { - background = background; - foreground = foreground; - width = "100%"; - height = 32; - font-0 = "GohuFont:style=Regular:size=14;3"; - modules-left = "cpu memory"; - modules-center = "xworkspaces"; - modules-right = "battery audio date"; - module-margin = 1; - offset-y = 14; - padding = 2; - }; - - "module/cpu" = { - type = "internal/cpu"; - label = "CPU: %percentage%%"; - label-background = color0; - label-padding = 2; - interval = 2; - }; - "module/memory" = { - type = "internal/memory"; - label = "RAM: %percentage_used%%"; - label-background = color1; - label-padding = 2; - interval = 2; - }; - "module/xwindow" = { - type = "internal/xwindow"; - label-active-font = 0; - }; - "module/xworkspaces" = { - type = "internal/xworkspaces"; - enable-scroll = false; - label-active = "%name%"; - label-active-background = color2; - label-active-padding = 1; - label-occupied = "%name%"; - label-occupied-foreground = "#fff"; - label-occupied-padding = 1; - label-empty = "%name%"; - label-empty-foreground = "#fff"; - label-empty-padding = 1; - label-urgent = "%name%"; - label-urgent-background = color0; - label-urgent-padding = 1; - }; - "module/audio" = { - type = "internal/pulseaudio"; - }; - "module/battery" = { - type = "internal/battery"; - battery = "BAT0"; - adapter = "ADP1"; - label-charging = "BAT: %percentage%%++"; - label-discharging = "BAT: %percentage%%"; - label-background = color1; - label-padding = 2; - }; - "module/date" = { - type = "internal/date"; - date = "%b %d %y"; - time = "%I:%M %p"; - label-background = color0; - label-padding = 2; - interval = 5; - }; - }; - }; - }; - - dconf.settings = { - "io/elementary/code/settings" = { - font = "Fira Code Light 10"; - use-system-font = false; - }; - "net/launchpad/plank/docks/dock1" = { - dock-items = [ - "gala-multitaskingview.dockitem" - "firefox.dockitem" - "io.elementary.terminal.dockitem" - "codium.dockitem" - "io.elementary.settings.dockitem" - ]; - }; - "org/gnome/desktop/background" = { - picture-uri = "file://" + builtins.toString /home/rae/.dotfiles/assets/wallpapers/current; - }; - "org/gnome/desktop/interface" = { - accent-color = "blue"; - color-scheme = "prefer-dark"; - }; - "org/gnome/desktop/wm/preferences" = { - button-layout = ":minimize,maximize,close"; - }; - "org/pantheon/desktop/gala/appearance" = { - button-layout = ":minimize,maximize,close"; - }; - "org/pantheon/desktop/gala/behavior" = { - hotcorner-bottomright = "show-workspace-view"; - }; - }; - gtk = { enable = true; cursorTheme.name = "Posy's Cursor"; diff --git a/nixos/home/dconf.nix b/nixos/home/dconf.nix new file mode 100644 index 0000000..8563dea --- /dev/null +++ b/nixos/home/dconf.nix @@ -0,0 +1,34 @@ +{ ... }: +{ + dconf.settings = { + "io/elementary/code/settings" = { + font = "Fira Code Light 10"; + use-system-font = false; + }; + "net/launchpad/plank/docks/dock1" = { + dock-items = [ + "gala-multitaskingview.dockitem" + "firefox.dockitem" + "io.elementary.terminal.dockitem" + "codium.dockitem" + "io.elementary.settings.dockitem" + ]; + }; + "org/gnome/desktop/background" = { + picture-uri = "file://" + builtins.toString /home/rae/.dotfiles/assets/wallpapers/current; + }; + "org/gnome/desktop/interface" = { + accent-color = "blue"; + color-scheme = "prefer-dark"; + }; + "org/gnome/desktop/wm/preferences" = { + button-layout = ":minimize,maximize,close"; + }; + "org/pantheon/desktop/gala/appearance" = { + button-layout = ":minimize,maximize,close"; + }; + "org/pantheon/desktop/gala/behavior" = { + hotcorner-bottomright = "show-workspace-view"; + }; + }; +} diff --git a/nixos/home/default.nix b/nixos/home/default.nix index b01ee96..edbb46a 100644 --- a/nixos/home/default.nix +++ b/nixos/home/default.nix @@ -2,7 +2,10 @@ { imports = [ ./base.nix + + ./dconf.nix ./firefox.nix ./neovim.nix + ./polybar.nix ]; } diff --git a/nixos/home/polybar.nix b/nixos/home/polybar.nix new file mode 100644 index 0000000..d77e09b --- /dev/null +++ b/nixos/home/polybar.nix @@ -0,0 +1,88 @@ +{ ... }: +{ + services.polybar = { + enable = true; + script = "polybar &"; + settings = + let + background = "#0000"; + foreground = "#030910"; + color0 = "#d9eafd"; + color1 = "#bcccdc"; + color2 = "#9aa6b2"; + in { + "global/wm" = { + margin-top = 2; + margin-bottom = 2; + }; + "bar/top" = { + background = background; + foreground = foreground; + width = "100%"; + height = 32; + font-0 = "GohuFont:style=Regular:size=14;3"; + modules-left = "cpu memory"; + modules-center = "xworkspaces"; + modules-right = "battery audio date"; + module-margin = 1; + offset-y = 14; + padding = 2; + }; + + "module/cpu" = { + type = "internal/cpu"; + label = "CPU: %percentage%%"; + label-background = color0; + label-padding = 2; + interval = 2; + }; + "module/memory" = { + type = "internal/memory"; + label = "RAM: %percentage_used%%"; + label-background = color1; + label-padding = 2; + interval = 2; + }; + "module/xwindow" = { + type = "internal/xwindow"; + label-active-font = 0; + }; + "module/xworkspaces" = { + type = "internal/xworkspaces"; + enable-scroll = false; + label-active = "%name%"; + label-active-background = color2; + label-active-padding = 1; + label-occupied = "%name%"; + label-occupied-foreground = "#fff"; + label-occupied-padding = 1; + label-empty = "%name%"; + label-empty-foreground = "#fff"; + label-empty-padding = 1; + label-urgent = "%name%"; + label-urgent-background = color0; + label-urgent-padding = 1; + }; + "module/audio" = { + type = "internal/pulseaudio"; + }; + "module/battery" = { + type = "internal/battery"; + battery = "BAT0"; + adapter = "ADP1"; + label-charging = "BAT: %percentage%%++"; + label-discharging = "BAT: %percentage%%"; + label-background = color1; + label-padding = 2; + }; + "module/date" = { + type = "internal/date"; + date = "%b %d %y"; + time = "%I:%M %p"; + label-background = color0; + label-padding = 2; + interval = 5; + }; + }; + }; +}