awesome: modularise properly
This commit is contained in:
parent
07d249a6f9
commit
8bc4fa4501
@ -3,7 +3,6 @@
|
||||
{
|
||||
imports = [
|
||||
../../modules/common/default.nix
|
||||
../../modules/desktop/awesome/default.nix
|
||||
../../modules/spotify/default.nix
|
||||
./bluetooth.nix
|
||||
./hardware-configuration.nix
|
||||
@ -19,6 +18,9 @@
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
## Desktop
|
||||
custom.desktop.awesome.enable = true;
|
||||
|
||||
## Resilio
|
||||
custom.resilio.enable = true;
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./desktop/awesome/default.nix
|
||||
./resilio.nix
|
||||
./tailscale.nix
|
||||
./www/global.nix
|
||||
|
@ -1,29 +1,40 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.custom.desktop.awesome;
|
||||
in
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
windowManager.awesome.enable = true;
|
||||
options.custom.desktop.awesome = {
|
||||
enable = lib.mkEnableOption "awesome";
|
||||
};
|
||||
|
||||
home-manager.users.jake.xdg.configFile."awesome/rc.lua" =
|
||||
let
|
||||
awesomeConfig = ''
|
||||
-- Configure paths filled in by Nix
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty"
|
||||
tmux = "${pkgs.tmux}/bin/tmux"
|
||||
'' + builtins.readFile ./rc.lua;
|
||||
in
|
||||
{
|
||||
text = awesomeConfig;
|
||||
onChange = with pkgs; "echo 'awesome.restart()' | ${awesome}/bin/awesome-client";
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
windowManager.awesome.enable = true;
|
||||
};
|
||||
|
||||
home-manager.users.jake.programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font = {
|
||||
size = 8.0;
|
||||
home-manager.users."${config.custom.user}" = {
|
||||
xdg.configFile."awesome/rc.lua" =
|
||||
let
|
||||
awesomeConfig = ''
|
||||
-- Configure paths filled in by Nix
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty"
|
||||
tmux = "${pkgs.tmux}/bin/tmux"
|
||||
'' + builtins.readFile ./rc.lua;
|
||||
in
|
||||
{
|
||||
text = awesomeConfig;
|
||||
onChange = with pkgs; "echo 'awesome.restart()' | ${awesome}/bin/awesome-client";
|
||||
};
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font = {
|
||||
size = 8.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user