Hyprland
This commit is contained in:
parent
0ed7d09824
commit
1cd3d7a903
31 changed files with 543 additions and 132 deletions
modules/home-manager
|
@ -6,4 +6,5 @@
|
|||
firefox = import ./firefox;
|
||||
satellite-dev = import ./satellite-dev.nix;
|
||||
satellite-persistence = import ./persistence.nix;
|
||||
wofi = import ./wofi.nix;
|
||||
}
|
||||
|
|
|
@ -1,30 +1,27 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.programs.discord;
|
||||
let cfg = config.programs.discord;
|
||||
in
|
||||
{
|
||||
options.programs.discord = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
enable = lib.mkEnableOption "Discord";
|
||||
enableOpenASAR = lib.mkEnableOption "openASAR";
|
||||
disableUpdateCheck = lib.mkEnableOption "update skipping";
|
||||
enableDevtools = lib.mkEnableOption "devtools";
|
||||
|
||||
disableUpdateCheck = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
enableDevtools = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.discord;
|
||||
description = "The discord package to install";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
pkgs.discord
|
||||
];
|
||||
|
||||
home.packages =
|
||||
[
|
||||
(if cfg.enableOpenASAR
|
||||
then cfg.package.override { withOpenASAR = true; }
|
||||
else cfg.package)
|
||||
];
|
||||
|
||||
xdg.configFile."discord/settings.json".text =
|
||||
builtins.toJSON
|
||||
|
|
|
@ -4,7 +4,7 @@ let cfg = config.satellite.persistence;
|
|||
in
|
||||
{
|
||||
options.satellite.persistence = {
|
||||
enable = lib.mkEnableOption (lib.mkDoc "satellite persitence");
|
||||
enable = lib.mkEnableOption "satellite persitence";
|
||||
|
||||
at = lib.mkOption {
|
||||
default = { };
|
||||
|
|
78
modules/home-manager/wofi.nix
Normal file
78
modules/home-manager/wofi.nix
Normal file
|
@ -0,0 +1,78 @@
|
|||
# Temporary copy of [this](https://github.com/nix-community/home-manager/blob/master/modules/programs/wofi.nix)
|
||||
# until the next home manager relase.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.wofi;
|
||||
|
||||
toConfig = attrs:
|
||||
''
|
||||
# Generated by Home Manager.
|
||||
'' + generators.toKeyValue { }
|
||||
(filterAttrs (name: value: value != null) attrs);
|
||||
in {
|
||||
meta.maintainers = [ maintainers.christoph-heiss ];
|
||||
|
||||
options.programs.wofi = {
|
||||
enable = mkEnableOption
|
||||
"wofi: a launcher/menu program for wlroots based wayland compositors such as sway";
|
||||
|
||||
package = mkPackageOption pkgs "wofi" { };
|
||||
|
||||
settings = mkOption {
|
||||
default = { };
|
||||
type = types.attrs;
|
||||
description = ''
|
||||
Configuration options for wofi. See
|
||||
<citerefentry>
|
||||
<refentrytitle>wofi</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
</citerefentry>.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
{
|
||||
location = "bottom-right";
|
||||
allow_markup = true;
|
||||
width = 250;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
style = mkOption {
|
||||
default = null;
|
||||
type = types.nullOr types.str;
|
||||
description = ''
|
||||
CSS style for wofi to use as a stylesheet. See
|
||||
<citerefentry>
|
||||
<refentrytitle>wofi</refentrytitle>
|
||||
<manvolnum>7</manvolnum>
|
||||
</citerefentry>.
|
||||
'';
|
||||
example = ''
|
||||
* {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: #7c818c;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions =
|
||||
[ (hm.assertions.assertPlatform "programs.wofi" pkgs platforms.linux) ];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile = mkMerge [
|
||||
(mkIf (cfg.settings != { }) {
|
||||
"wofi/config".text = toConfig cfg.settings;
|
||||
})
|
||||
(mkIf (cfg.style != null) { "wofi/style.css".text = cfg.style; })
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue