[fix] fmt: change formatter to nixfmt-rfc-style
Alejandra has ads and splits files into too many new lines.
This commit is contained in:
parent
711c1aa81d
commit
91284a73ca
28 changed files with 800 additions and 742 deletions
|
@ -1,28 +1,29 @@
|
|||
{stylix}: {
|
||||
{ stylix }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.jconfig;
|
||||
keysFromGithub =
|
||||
lib.attrsets.mapAttrs' (username: sha256: {
|
||||
name = "pubkeys/${username}";
|
||||
value = {
|
||||
mode = "0755";
|
||||
source = builtins.fetchurl {
|
||||
inherit sha256;
|
||||
url = "https://github.com/${username}.keys";
|
||||
};
|
||||
keysFromGithub = lib.attrsets.mapAttrs' (username: sha256: {
|
||||
name = "pubkeys/${username}";
|
||||
value = {
|
||||
mode = "0755";
|
||||
source = builtins.fetchurl {
|
||||
inherit sha256;
|
||||
url = "https://github.com/${username}.keys";
|
||||
};
|
||||
})
|
||||
cfg.importSSHKeysFromGithub;
|
||||
in {
|
||||
};
|
||||
}) cfg.importSSHKeysFromGithub;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
./gui
|
||||
stylix.nixosModules.stylix
|
||||
{stylix = import ./stylix-config.nix {inherit config pkgs;};}
|
||||
{ stylix = import ./stylix-config.nix { inherit config pkgs; }; }
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -86,8 +87,8 @@ in {
|
|||
users.defaultUserShell = pkgs.zsh;
|
||||
# Open ports for spotifyd
|
||||
networking.firewall = {
|
||||
allowedUDPPorts = [5353];
|
||||
allowedTCPPorts = [2020];
|
||||
allowedUDPPorts = [ 5353 ];
|
||||
allowedTCPPorts = [ 2020 ];
|
||||
};
|
||||
# Nix Settings
|
||||
nix = {
|
||||
|
|
|
@ -3,24 +3,24 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.jconfig.gui;
|
||||
enable = config.jconfig.enable && cfg.enable;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf enable {
|
||||
environment.systemPackages =
|
||||
[
|
||||
pkgs.gnome.adwaita-icon-theme
|
||||
pkgs.adwaita-qt
|
||||
pkgs.nordzy-cursor-theme
|
||||
pkgs.pinentry-qt
|
||||
]
|
||||
++ lib.optional cfg.ydotool.enable pkgs.ydotool;
|
||||
environment.systemPackages = [
|
||||
pkgs.gnome.adwaita-icon-theme
|
||||
pkgs.adwaita-qt
|
||||
pkgs.nordzy-cursor-theme
|
||||
pkgs.pinentry-qt
|
||||
] ++ lib.optional cfg.ydotool.enable pkgs.ydotool;
|
||||
systemd = {
|
||||
user.services.ydotool = lib.mkIf cfg.ydotool.enable {
|
||||
enable = cfg.ydotool.autoStart;
|
||||
wantedBy = ["default.target"];
|
||||
wantedBy = [ "default.target" ];
|
||||
description = "Generic command-line automation tool";
|
||||
documentation = [
|
||||
"man:ydotool(1)"
|
||||
|
@ -47,7 +47,7 @@ in {
|
|||
sway = {
|
||||
enable = cfg.sway;
|
||||
# No extra packages (by default it adds foot, dmenu, and other stuff)
|
||||
extraPackages = [];
|
||||
extraPackages = [ ];
|
||||
wrapperFeatures = {
|
||||
base = true;
|
||||
gtk = true;
|
||||
|
@ -77,7 +77,7 @@ in {
|
|||
# XDG portals
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
config.preferred = {
|
||||
# Default to the gtk portal
|
||||
default = "gtk";
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
{lib, ...}: let
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) types;
|
||||
# Like mkEnableOption but defaults to true
|
||||
mkDisableOption = option:
|
||||
mkDisableOption =
|
||||
option:
|
||||
(lib.mkEnableOption option)
|
||||
// {
|
||||
default = true;
|
||||
example = false;
|
||||
};
|
||||
mkImageOption = {
|
||||
description,
|
||||
url,
|
||||
sha256 ? "",
|
||||
}:
|
||||
mkImageOption =
|
||||
{
|
||||
description,
|
||||
url,
|
||||
sha256 ? "",
|
||||
}:
|
||||
lib.mkOption {
|
||||
inherit description;
|
||||
type = types.path;
|
||||
default = builtins.fetchurl {inherit url sha256;};
|
||||
default = builtins.fetchurl { inherit url sha256; };
|
||||
defaultText = lib.literalMD "";
|
||||
};
|
||||
|
||||
|
@ -28,7 +31,7 @@
|
|||
steamHardwareSupport = mkDisableOption "steam hardware support";
|
||||
ydotool = lib.mkOption {
|
||||
description = "Jalil's default ydotool configuration.";
|
||||
default = {};
|
||||
default = { };
|
||||
type = types.submodule {
|
||||
options.enable = mkDisableOption "ydotool";
|
||||
options.autoStart = mkDisableOption "autostarting ydotool at login";
|
||||
|
@ -56,17 +59,17 @@
|
|||
enable = lib.mkEnableOption "jalil's default configuration.";
|
||||
dev = lib.mkOption {
|
||||
description = "Options for setting up a dev environment";
|
||||
default = {};
|
||||
type = types.submodule {options.enable = lib.mkEnableOption "dev configuration";};
|
||||
default = { };
|
||||
type = types.submodule { options.enable = lib.mkEnableOption "dev configuration"; };
|
||||
};
|
||||
gui = lib.mkOption {
|
||||
description = "Jalil's default configuration for a NixOS gui.";
|
||||
default = {};
|
||||
default = { };
|
||||
type = types.submodule gui;
|
||||
};
|
||||
styling = lib.mkOption {
|
||||
description = "Jalil's styling options";
|
||||
default = {};
|
||||
default = { };
|
||||
type = types.submodule styling;
|
||||
};
|
||||
importSSHKeysFromGithub = lib.mkOption {
|
||||
|
@ -83,17 +86,18 @@
|
|||
`users.users.<name>.openssh.authorizedKeys.keyFiles` on the users you
|
||||
want to allow ssh logins.
|
||||
'';
|
||||
default = {};
|
||||
default = { };
|
||||
example = {
|
||||
"jalil-salame" = "sha256:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
||||
};
|
||||
type = types.attrsOf types.str;
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.jconfig = lib.mkOption {
|
||||
description = "Jalil's default NixOS configuration.";
|
||||
default = {};
|
||||
default = { };
|
||||
type = types.submodule config;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
}: let
|
||||
{ config, pkgs }:
|
||||
let
|
||||
cfg = config.jconfig.styling;
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit (cfg) enable;
|
||||
image = cfg.wallpaper;
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue