Unified home and system modules!
This commit is contained in:
68
modules/desktop/desktop.nix
Normal file
68
modules/desktop/desktop.nix
Normal file
@@ -0,0 +1,68 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.samfelag.modules.desktop;
|
||||
laptopPkgs = with pkgs; [
|
||||
];
|
||||
in
|
||||
{
|
||||
options.samfelag.modules.desktop = {
|
||||
|
||||
enable = mkEnableOption "desktop environment";
|
||||
|
||||
laptop = mkOption {
|
||||
description = "Enable features for a laptop (trackpad, battery, etc...)";
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
# - Packages ---------------------------------
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pamixer
|
||||
i3lock-blur
|
||||
brightnessctl
|
||||
playerctl
|
||||
feh
|
||||
rofi
|
||||
firefox
|
||||
] ++ optionals cfg.laptop laptopPkgs;
|
||||
|
||||
# - Audio ------------------------------------
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
hardware = {
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
};
|
||||
|
||||
# - Compositor -------------------------------
|
||||
|
||||
services.picom.enable = true;
|
||||
|
||||
# - Modules ----------------------------------
|
||||
|
||||
samfelag.modules = {
|
||||
app.alacritty.enable = true;
|
||||
desktop.polybar.enable = true;
|
||||
desktop.i3 = {
|
||||
enable = true;
|
||||
laptop = cfg.laptop;
|
||||
launcher.command = "${pkgs.rofi}/bin/rofi rofi -show run";
|
||||
terminal.command = "${pkgs.alacritty}/bin/alacritty";
|
||||
browser.command = "${pkgs.firefox}/bin/firefox";
|
||||
locker.command = "${pkgs.i3lock-blur}/bin/i3lock-color -c 808F85 && sleep 1";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user