Added flags to all applications
This commit is contained in:
parent
bb9f0632a9
commit
54cc3eb049
|
@ -1,10 +1,3 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
imports = [
|
imports = [ ./sway ./emacs.nix ./firefox.nix ./nextcloud.nix ];
|
||||||
./firefox.nix
|
|
||||||
./mako.nix
|
|
||||||
./nextcloud.nix
|
|
||||||
./waybar.nix
|
|
||||||
./emacs.nix
|
|
||||||
./sway.nix
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
{ inputs, config, lib, pkgs, ... }:
|
{ inputs, config, lib, pkgs, ... }:
|
||||||
# TODO Still need the following dependecies
|
# TODO Still need the following dependecies
|
||||||
# - Language tools (grammer)
|
# - Language tools (grammer)
|
||||||
let cfg = config.application.emacs;
|
let
|
||||||
|
cfg = config.application.emacs;
|
||||||
|
graphical = config.graphical;
|
||||||
in with lib; {
|
in with lib; {
|
||||||
options = {
|
options = {
|
||||||
application.emacs = {
|
application.emacs = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = true;
|
default = graphical.enable;
|
||||||
type = with types; bool;
|
type = with types; bool;
|
||||||
description = "Insert joke about emacs is an operating system.";
|
description = "Insert joke about emacs is an operating system.";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,61 +1,73 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
home-manager.users.james = {
|
cfg = config.application.firefox;
|
||||||
|
graphical = config.graphical;
|
||||||
# Enable touch controls.
|
sway_cfg = config.applications.sway;
|
||||||
home.sessionVariables = { MOZ_USE_XINPUT2 = 1; };
|
in with lib; {
|
||||||
|
options = {
|
||||||
programs.firefox = {
|
application.firefox = {
|
||||||
enable = true;
|
enable = mkOption {
|
||||||
|
default = graphical.enable;
|
||||||
package = pkgs.firefox.override {
|
type = with types; bool;
|
||||||
cfg = {
|
description = "";
|
||||||
enableTridactylNative = true;
|
|
||||||
# TODO make this general based on the whether sway is being used.
|
|
||||||
forceWayland = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
config = mkIf cfg.enable {
|
||||||
onepassword-password-manager
|
home-manager.users.james = {
|
||||||
https-everywhere
|
# Enable touch controls.
|
||||||
ublock-origin
|
home.sessionVariables = { MOZ_USE_XINPUT2 = 1; };
|
||||||
tridactyl
|
|
||||||
];
|
|
||||||
|
|
||||||
profiles = {
|
programs.firefox = {
|
||||||
default = {
|
enable = true;
|
||||||
name = "primary";
|
package = pkgs.firefox.override {
|
||||||
id = 0;
|
cfg = {
|
||||||
|
enableTridactylNative = true;
|
||||||
|
forceWayland = sway_cfg.enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
settings = {
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
"browser.download.useDownloadDir" =
|
onepassword-password-manager
|
||||||
false; # Ask for download location
|
https-everywhere
|
||||||
"browser.in-content.dark-mode" = true; # Dark mode
|
ublock-origin
|
||||||
"browser.newtabpage.activity-stream.feeds.section.topstories" =
|
tridactyl
|
||||||
false; # Disable top stories
|
];
|
||||||
"browser.newtabpage.activity-stream.feeds.sections" = false;
|
|
||||||
"browser.newtabpage.activity-stream.feeds.system.topstories" =
|
profiles = {
|
||||||
false; # Disable top stories
|
default = {
|
||||||
"browser.newtabpage.activity-stream.section.highlights.includePocket" =
|
name = "primary";
|
||||||
false; # Disable pocket
|
id = 0;
|
||||||
"media.eme.enabled" = true; # Enable DRM
|
settings = {
|
||||||
"media.gmp-widevinecdm.visible" = true; # Enable DRM
|
"browser.download.useDownloadDir" =
|
||||||
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
|
false; # Ask for download location
|
||||||
"signon.autofillForms" = false; # Disable built-in form-filling
|
"browser.in-content.dark-mode" = true; # Dark mode
|
||||||
"signon.rememberSignons" =
|
"browser.newtabpage.activity-stream.feeds.section.topstories" =
|
||||||
false; # Disable built-in password manager
|
false; # Disable top stories
|
||||||
"ui.systemUsesDarkTheme" = true; # Dark mode
|
"browser.newtabpage.activity-stream.feeds.sections" = false;
|
||||||
|
"browser.newtabpage.activity-stream.feeds.system.topstories" =
|
||||||
|
false; # Disable top stories
|
||||||
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" =
|
||||||
|
false; # Disable pocket
|
||||||
|
"media.eme.enabled" = true; # Enable DRM
|
||||||
|
"media.gmp-widevinecdm.visible" = true; # Enable DRM
|
||||||
|
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
|
||||||
|
"signon.autofillForms" = false; # Disable built-in form-filling
|
||||||
|
"signon.rememberSignons" =
|
||||||
|
false; # Disable built-in password manager
|
||||||
|
"ui.systemUsesDarkTheme" = true; # Dark mode
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
# This is a bit silly as this is currently managed by my make dot config.
|
# This is a bit silly as this is currently managed by my make dot config.
|
||||||
xdg.configFile."tridactyl/tridactylrc".source = pkgs.fetchurl {
|
xdg.configFile."tridactyl/tridactylrc".source = pkgs.fetchurl {
|
||||||
url =
|
url =
|
||||||
"https://git.jpatrick.io/james/dotfiles/raw/branch/master/tridactyl/tridactylrc";
|
"https://git.jpatrick.io/james/dotfiles/raw/branch/master/tridactyl/tridactylrc";
|
||||||
sha256 = "sha256-iOBd/yEvQP/Gn3+lS2Ztu9oslllZU4G7VnM4pTck+Tg=";
|
sha256 = "sha256-iOBd/yEvQP/Gn3+lS2Ztu9oslllZU4G7VnM4pTck+Tg=";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,38 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }:
|
||||||
home-manager.users.james = {
|
let
|
||||||
home.packages = with pkgs; [ nextcloud-client ];
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
systemd.user.services = {
|
config = mkIf cfg.enable {
|
||||||
nextcloud = {
|
home-manager.users.james = {
|
||||||
Unit = {
|
home.packages = with pkgs; [ nextcloud-client ];
|
||||||
Description = "Nextcloud - A slighly more GNU friendly dropbox";
|
|
||||||
BindsTo = [ "graphical-session.target" ];
|
systemd.user.services = {
|
||||||
Wants = [ "graphical-session-pre.target" ];
|
nextcloud = {
|
||||||
After = [ "graphical-session-pre.target" ];
|
Unit = {
|
||||||
};
|
Description = "Nextcloud - A slighly more GNU friendly dropbox";
|
||||||
Service = {
|
BindsTo = [ "graphical-session.target" ];
|
||||||
Type = "simple";
|
Wants = [ "graphical-session-pre.target" ];
|
||||||
ExecStart = "${pkgs.nextcloud-client}/bin/nextclient --background";
|
After = [ "graphical-session-pre.target" ];
|
||||||
Restart = "on-failure";
|
};
|
||||||
RestartSec = 1;
|
|
||||||
TimeoutStopSec = 10;
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.nextcloud-client}/bin/nextclient --background";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
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, ... }:
|
{ options, config, lib, pkgs, ... }:
|
||||||
let cfg = config.application.mako;
|
let
|
||||||
|
cfg = config.application.mako;
|
||||||
|
sway = config.application.sway;
|
||||||
in with lib; {
|
in with lib; {
|
||||||
options = {
|
options = {
|
||||||
application.mako = {
|
application.mako = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
# TODO track based on sway default
|
# TODO track based on sway default
|
||||||
default = false;
|
default = sway.enable;
|
||||||
type = with types; bool;
|
type = with types; bool;
|
||||||
description = "testing one two three";
|
description = "testing one two three";
|
||||||
};
|
};
|
|
@ -1,11 +1,13 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let cfg = config.application.sway;
|
let
|
||||||
|
cfg = config.application.sway;
|
||||||
|
graphical = config.graphical;
|
||||||
in with lib; {
|
in with lib; {
|
||||||
options = {
|
options = {
|
||||||
application.sway = {
|
application.sway = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
# TODO base on graphical
|
# TODO base on graphical
|
||||||
default = true;
|
default = graphical.enable;
|
||||||
type = with types; bool;
|
type = with types; bool;
|
||||||
description = "testing one two three";
|
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, ... }: {
|
{ config, lib, ... }: {
|
||||||
# Enable bootloader & clear /tmp on boot.
|
|
||||||
boot = {
|
boot = {
|
||||||
|
# Enable bootloader & clear /tmp on boot.
|
||||||
cleanTmpDir = true;
|
cleanTmpDir = true;
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot.enable = true;
|
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 = [
|
imports = [
|
||||||
./system
|
./system
|
||||||
./applications
|
./applications
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let grpahical = config.graphical;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
../applications/firefox.nix
|
../applications/firefox.nix
|
||||||
../applications/nextcloud.nix
|
../applications/nextcloud.nix
|
||||||
|
@ -9,6 +12,8 @@
|
||||||
./minimal.nix
|
./minimal.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
graphical.enable = true;
|
||||||
|
|
||||||
# Enable sound.
|
# Enable sound.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = true;
|
||||||
|
|
Reference in New Issue
Block a user