working on i3
This commit is contained in:
parent
e77dec2d94
commit
e3689e5b26
9 changed files with 148 additions and 559 deletions
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ccfg = import ../../config.nix;
|
||||
cfg_path = [
|
||||
|
|
@ -10,19 +15,21 @@ let
|
|||
in
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkEnableOption "i3 (X11) desktop environment";
|
||||
terminalCommand = mkOption {
|
||||
type = lib.types.str;
|
||||
default = "foot";
|
||||
description = "The terminal command to use.";
|
||||
options =
|
||||
{ }
|
||||
// lib.attrsets.setAttrByPath cfg_path {
|
||||
enable = lib.mkEnableOption "i3 (X11) desktop environment";
|
||||
terminalCommand = mkOption {
|
||||
type = lib.types.str;
|
||||
default = "foot";
|
||||
description = "The terminal command to use.";
|
||||
};
|
||||
extraOptions = mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
description = "Extra options for i3 configuration.";
|
||||
};
|
||||
};
|
||||
extraOptions = mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
description = "Extra options for i3 configuration.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager = {
|
||||
|
|
@ -53,12 +60,29 @@ with lib;
|
|||
XDG_SESSION_DESKTOP = "i3";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ i3 i3status i3lock i3-gaps polybar maim xclip xterm ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
i3
|
||||
i3status
|
||||
i3lock
|
||||
i3-gaps
|
||||
polybar
|
||||
maim
|
||||
xclip
|
||||
xterm
|
||||
|
||||
# Enable backlight/brightness control, audio, etc., similar to sway defaults
|
||||
environment.systemPackages = lib.mkForce (with pkgs; [ polybar maim xclip i3 i3status i3lock i3-gaps pavucontrol btop nemo feh rofi ]);
|
||||
|
||||
# Allow users to add extra options into the generated i3 config
|
||||
# extraOptions can be appended by home-manager fragment
|
||||
# Enable backlight/brightness control, audio, etc., similar to sway defaults
|
||||
polybar
|
||||
maim
|
||||
xclip
|
||||
i3
|
||||
i3status
|
||||
i3lock
|
||||
i3-gaps
|
||||
pavucontrol
|
||||
btop
|
||||
nemo
|
||||
feh
|
||||
rofi
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
7
common/desktop_environment/i3/home_manager/default.nix
Normal file
7
common/desktop_environment/i3/home_manager/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./i3.nix
|
||||
./polybar.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -13,10 +13,10 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
home.file = {
|
||||
".config/polybar/config" = {
|
||||
text = builtins.readFile ../polybar/config;
|
||||
text = builtins.readFile ./polybar/config;
|
||||
};
|
||||
".config/polybar/launch.sh" = {
|
||||
text = builtins.readFile ../polybar/launch.sh;
|
||||
text = builtins.readFile ./polybar/launch.sh;
|
||||
executable = true;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue