Added flags to all applications
This commit is contained in:
parent
bb9f0632a9
commit
54cc3eb049
|
@ -1,10 +1,3 @@
|
|||
{ config, pkgs, ... }: {
|
||||
imports = [
|
||||
./firefox.nix
|
||||
./mako.nix
|
||||
./nextcloud.nix
|
||||
./waybar.nix
|
||||
./emacs.nix
|
||||
./sway.nix
|
||||
];
|
||||
imports = [ ./sway ./emacs.nix ./firefox.nix ./nextcloud.nix ];
|
||||
}
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{ inputs, config, lib, pkgs, ... }:
|
||||
# TODO Still need the following dependecies
|
||||
# - Language tools (grammer)
|
||||
let cfg = config.application.emacs;
|
||||
let
|
||||
cfg = config.application.emacs;
|
||||
graphical = config.graphical;
|
||||
in with lib; {
|
||||
options = {
|
||||
application.emacs = {
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
default = graphical.enable;
|
||||
type = with types; bool;
|
||||
description = "Insert joke about emacs is an operating system.";
|
||||
};
|
||||
|
|
|
@ -1,18 +1,30 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.application.firefox;
|
||||
graphical = config.graphical;
|
||||
sway_cfg = config.applications.sway;
|
||||
in with lib; {
|
||||
options = {
|
||||
application.firefox = {
|
||||
enable = mkOption {
|
||||
default = graphical.enable;
|
||||
type = with types; bool;
|
||||
description = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.james = {
|
||||
|
||||
# Enable touch controls.
|
||||
home.sessionVariables = { MOZ_USE_XINPUT2 = 1; };
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.firefox.override {
|
||||
cfg = {
|
||||
enableTridactylNative = true;
|
||||
# TODO make this general based on the whether sway is being used.
|
||||
forceWayland = true;
|
||||
forceWayland = sway_cfg.enable;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -27,7 +39,6 @@
|
|||
default = {
|
||||
name = "primary";
|
||||
id = 0;
|
||||
|
||||
settings = {
|
||||
"browser.download.useDownloadDir" =
|
||||
false; # Ask for download location
|
||||
|
@ -58,4 +69,5 @@
|
|||
sha256 = "sha256-iOBd/yEvQP/Gn3+lS2Ztu9oslllZU4G7VnM4pTck+Tg=";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,19 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.application.nextcloud;
|
||||
graphical = config.graphical;
|
||||
in with lib; {
|
||||
options = {
|
||||
application.nextcloud = {
|
||||
enable = mkOption {
|
||||
default = graphical.enable;
|
||||
type = with types; bool;
|
||||
description = "Dropbox for people who don't like dropbox";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.james = {
|
||||
home.packages = with pkgs; [ nextcloud-client ];
|
||||
|
||||
|
@ -10,6 +25,7 @@
|
|||
Wants = [ "graphical-session-pre.target" ];
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.nextcloud-client}/bin/nextclient --background";
|
||||
|
@ -20,4 +36,5 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
1
modules/applications/sway/default.nix
Normal file
1
modules/applications/sway/default.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ config, pkgs, ... }: { imports = [ ./sway.nix ./mako.nix ./waybar.nix ]; }
|
|
@ -1,11 +1,13 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
let cfg = config.application.mako;
|
||||
let
|
||||
cfg = config.application.mako;
|
||||
sway = config.application.sway;
|
||||
in with lib; {
|
||||
options = {
|
||||
application.mako = {
|
||||
enable = mkOption {
|
||||
# TODO track based on sway default
|
||||
default = false;
|
||||
default = sway.enable;
|
||||
type = with types; bool;
|
||||
description = "testing one two three";
|
||||
};
|
|
@ -1,11 +1,13 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let cfg = config.application.sway;
|
||||
let
|
||||
cfg = config.application.sway;
|
||||
graphical = config.graphical;
|
||||
in with lib; {
|
||||
options = {
|
||||
application.sway = {
|
||||
enable = mkOption {
|
||||
# TODO base on graphical
|
||||
default = true;
|
||||
default = graphical.enable;
|
||||
type = with types; bool;
|
||||
description = "testing one two three";
|
||||
};
|
20
modules/applications/sway/waybar.nix
Normal file
20
modules/applications/sway/waybar.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.application.waybar;
|
||||
sway_cfg = config.application.sway;
|
||||
in with lib; {
|
||||
options = {
|
||||
application.waybar = {
|
||||
enable = mkOption {
|
||||
# TODO track based on sway default
|
||||
default = sway_cfg.enable;
|
||||
type = with types; bool;
|
||||
description = "testing one two three";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.james = { home.packages = with pkgs; [ waybar ]; };
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
home-manager.users.james = { home.packages = with pkgs; [ waybar ]; };
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, ... }: {
|
||||
# Enable bootloader & clear /tmp on boot.
|
||||
boot = {
|
||||
# Enable bootloader & clear /tmp on boot.
|
||||
cleanTmpDir = true;
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, lib, ... }: {
|
||||
options = {
|
||||
graphical = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
type = with lib.types; bool;
|
||||
description = "Does this actually need X/Wayland";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./system
|
||||
./applications
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let grpahical = config.graphical;
|
||||
in {
|
||||
imports = [
|
||||
../applications/firefox.nix
|
||||
../applications/nextcloud.nix
|
||||
|
@ -9,6 +12,8 @@
|
|||
./minimal.nix
|
||||
];
|
||||
|
||||
graphical.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
|
Reference in New Issue
Block a user