chore(linter/formatter): Apply linter and formatter
This commit is contained in:
parent
aefd89f89d
commit
68d16b8212
24 changed files with 469 additions and 448 deletions
33
.github/workflows/pr.yaml
vendored
Normal file
33
.github/workflows/pr.yaml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml
|
||||
name: Rust-build
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
extra-conf: |
|
||||
extra-experimental-features = nix-command flakes
|
||||
- name: Set up cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: action
|
||||
uses: cachix/install-nix-action@v25
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: cache
|
||||
uses: cachix/cachix-action@v16
|
||||
with:
|
||||
name: dashnix
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
- name: Linter check
|
||||
run: nix -L build github:${{ github.repository }}/${{ github.sha }} --no-write-lock-file
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
pathToAttrs = path:
|
||||
lib.attrsets.mapAttrsToList (
|
||||
name: meta: {
|
||||
name = name;
|
||||
meta = meta;
|
||||
inherit name;
|
||||
inherit meta;
|
||||
}
|
||||
)
|
||||
(builtins.readDir path);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = {...} @ inputs: {
|
||||
outputs = inputs: {
|
||||
nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems {root = ./.;};
|
||||
};
|
||||
|
||||
|
|
|
|||
14
flake.nix
14
flake.nix
|
|
@ -30,9 +30,6 @@
|
|||
|
||||
zen-browser.url = "github:youwen5/zen-browser-flake";
|
||||
|
||||
# TODO move to upstream repository after merged nix flake pr
|
||||
fancontrol.url = "git+https://github.com/DashieTM/fancontrol-gui?ref=nix-flake";
|
||||
|
||||
stylix.url = "github:danth/stylix";
|
||||
base16.url = "github:SenchoPens/base16.nix";
|
||||
disko.url = "github:nix-community/disko/latest";
|
||||
|
|
@ -44,6 +41,7 @@
|
|||
oxidash.url = "github:Xetibo/OxiDash";
|
||||
oxipaste.url = "github:Xetibo/OxiPaste";
|
||||
oxirun.url = "github:Xetibo/OxiRun";
|
||||
dashvim.url = "github:Xetibo/DashVim";
|
||||
# For now until merged into Xetibo
|
||||
hyprdock.url = "github:Xetibo/hyprdock";
|
||||
reset.url = "github:Xetibo/ReSet";
|
||||
|
|
@ -53,10 +51,6 @@
|
|||
|
||||
# absolute insanity
|
||||
chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
|
||||
dashvim = {
|
||||
url = "github:Xetibo/DashVim";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {self, ...} @ inputs: let
|
||||
|
|
@ -109,9 +103,11 @@
|
|||
inherit inputs;
|
||||
pkgs = unstable;
|
||||
system = currentSystem;
|
||||
lib = inputs.unstable.lib;
|
||||
buildSystems = dashNixLib.buildSystems;
|
||||
inherit (inputs.unstable) lib;
|
||||
inherit (dashNixLib) buildSystems;
|
||||
};
|
||||
lint = unstable.statix;
|
||||
format = unstable.alejandra;
|
||||
dashNixInputs = inputs;
|
||||
stablePkgs = stable;
|
||||
unstablePkgs = unstable;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@
|
|||
in
|
||||
lib.mkIf config.mods.nextcloud.enable {
|
||||
systemd.user = {
|
||||
services = (
|
||||
builtins.listToAttrs (
|
||||
services = builtins.listToAttrs (
|
||||
map (opts: {
|
||||
name = "${opts.name}";
|
||||
value = {
|
||||
|
|
@ -35,10 +34,8 @@ in
|
|||
};
|
||||
})
|
||||
synclist
|
||||
)
|
||||
);
|
||||
timers = (
|
||||
builtins.listToAttrs (
|
||||
timers = builtins.listToAttrs (
|
||||
map (opts: {
|
||||
name = "${opts.name}";
|
||||
value = {
|
||||
|
|
@ -52,7 +49,6 @@ in
|
|||
};
|
||||
})
|
||||
synclist
|
||||
)
|
||||
);
|
||||
startServices = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -319,11 +319,9 @@
|
|||
else {}
|
||||
);
|
||||
moduleFn = lib.lists.foldr (attr1: attr2: attr1 // attr2) {};
|
||||
mkFirefoxTheme = (
|
||||
profiles:
|
||||
mkFirefoxTheme = profiles:
|
||||
profiles
|
||||
|> profileNamesFn
|
||||
|> chromesFn
|
||||
|> moduleFn
|
||||
);
|
||||
|> moduleFn;
|
||||
in {home.file = mkFirefoxTheme profiles;}
|
||||
|
|
|
|||
|
|
@ -65,16 +65,16 @@ in {
|
|||
|
||||
# legacy compatibility
|
||||
name = scheme.scheme;
|
||||
base00 = scheme.base00;
|
||||
base01 = scheme.base01;
|
||||
base02 = scheme.base02;
|
||||
base03 = scheme.base03;
|
||||
base04 = scheme.base04;
|
||||
base05 = scheme.base05;
|
||||
base06 = scheme.base06;
|
||||
base07 = scheme.base07;
|
||||
base08 = scheme.base08;
|
||||
base09 = scheme.base09;
|
||||
inherit (scheme) base00;
|
||||
inherit (scheme) base01;
|
||||
inherit (scheme) base02;
|
||||
inherit (scheme) base03;
|
||||
inherit (scheme) base04;
|
||||
inherit (scheme) base05;
|
||||
inherit (scheme) base06;
|
||||
inherit (scheme) base07;
|
||||
inherit (scheme) base08;
|
||||
inherit (scheme) base09;
|
||||
base0a = scheme.base0A;
|
||||
base0b = scheme.base0B;
|
||||
base0c = scheme.base0C;
|
||||
|
|
|
|||
|
|
@ -31,15 +31,6 @@
|
|||
}
|
||||
'';
|
||||
in {
|
||||
xdg.configFile."qt5ct/colors/tokyonight.conf" = {
|
||||
text = "${color}";
|
||||
};
|
||||
xdg.configFile."qt6ct/colors/tokyonight.conf" = {
|
||||
text = "${color}";
|
||||
};
|
||||
xdg.configFile."qt5ct/qss/tab.qss" = {
|
||||
text = "${qss}";
|
||||
};
|
||||
stylix.targets.qt = {
|
||||
enable = false;
|
||||
};
|
||||
|
|
@ -49,7 +40,17 @@ in {
|
|||
style.name = lib.mkForce "breeze-dark";
|
||||
};
|
||||
|
||||
xdg.configFile."qt5ct/qt5ct.conf" = {
|
||||
xdg.configFile = {
|
||||
"qt5ct/colors/tokyonight.conf" = {
|
||||
text = "${color}";
|
||||
};
|
||||
"qt6ct/colors/tokyonight.conf" = {
|
||||
text = "${color}";
|
||||
};
|
||||
"qt5ct/qss/tab.qss" = {
|
||||
text = "${qss}";
|
||||
};
|
||||
"qt5ct/qt5ct.conf" = {
|
||||
text = ''
|
||||
|
||||
[Appearance]
|
||||
|
|
@ -86,7 +87,7 @@ in {
|
|||
ignored_applications=@Invalid()
|
||||
'';
|
||||
};
|
||||
xdg.configFile."qt6ct/qt6ct.conf" = {
|
||||
"qt6ct/qt6ct.conf" = {
|
||||
text = ''
|
||||
|
||||
[Appearance]
|
||||
|
|
@ -119,4 +120,5 @@ in {
|
|||
ignored_applications=@Invalid()
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
in {
|
||||
imports = ["${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"];
|
||||
nixpkgs.hostPlatform = {
|
||||
system = system;
|
||||
inherit system;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@
|
|||
inputs.reset.homeManagerModules.default
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.dashvim.homeManagerModules.dashvim
|
||||
inputs.fancontrol.homeManagerModules.default
|
||||
inputs.chaoticNyx.homeManagerModules.default
|
||||
../modules
|
||||
];
|
||||
|
|
@ -82,7 +81,7 @@
|
|||
builtins.listToAttrs (
|
||||
map
|
||||
(name: {
|
||||
name = name;
|
||||
inherit name;
|
||||
value = let
|
||||
mod = root + /hosts/${name}/configuration.nix;
|
||||
additionalNixosConfig = root + /hosts/${name}/hardware.nix;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ in {
|
|||
// {
|
||||
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.firefox.extensions
|
||||
++ (
|
||||
if (config.mods.browser.firefox.darkreader)
|
||||
if config.mods.browser.firefox.darkreader
|
||||
then [
|
||||
{
|
||||
"addon@darkreader.org" = {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ in {
|
|||
// {
|
||||
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.librewolf.extensions
|
||||
++ (
|
||||
if (config.mods.browser.firefox.darkreader)
|
||||
if config.mods.browser.firefox.darkreader
|
||||
then [
|
||||
{
|
||||
"addon@darkreader.org" = {
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ in {
|
|||
// {
|
||||
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.zen.extensions
|
||||
++ (
|
||||
if (config.mods.browser.firefox.darkreader)
|
||||
if config.mods.browser.firefox.darkreader
|
||||
then [
|
||||
{
|
||||
"addon@darkreader.org" = {
|
||||
|
|
|
|||
|
|
@ -517,29 +517,31 @@ in {
|
|||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.dashvim = lib.mkIf config.mods.coding.dashvim {
|
||||
enable = true;
|
||||
colorscheme = config.mods.stylix.colorscheme;
|
||||
inherit (config.mods.stylix) colorscheme;
|
||||
};
|
||||
programs.vscode = lib.mkIf config.mods.coding.vscodium.enable {
|
||||
enable = true;
|
||||
package = mkDashDefault pkgs.vscodium;
|
||||
profiles.default.extensions = config.mods.coding.vscodium.extensions;
|
||||
};
|
||||
xdg.configFile."neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) {
|
||||
xdg.configFile = {
|
||||
"neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) {
|
||||
source =
|
||||
(pkgs.formats.toml {}).generate "neovide"
|
||||
config.mods.coding.neovide.config;
|
||||
};
|
||||
|
||||
xdg.configFile."gh/config.yml" = lib.mkIf config.mods.coding.gh.enable {
|
||||
"gh/config.yml" = lib.mkIf config.mods.coding.gh.enable {
|
||||
source =
|
||||
(pkgs.formats.yaml {}).generate "config"
|
||||
config.mods.coding.gh.config;
|
||||
};
|
||||
xdg.configFile."gh/hosts.yml" = lib.mkIf config.mods.coding.gh.enable {
|
||||
"gh/hosts.yml" = lib.mkIf config.mods.coding.gh.enable {
|
||||
source =
|
||||
(pkgs.formats.yaml {}).generate "hosts"
|
||||
config.mods.coding.gh.hosts;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@
|
|||
description = "Container packages";
|
||||
};
|
||||
};
|
||||
config = (
|
||||
lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
config = lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
environment.systemPackages =
|
||||
(lib.lists.optionals (
|
||||
config.mods.containers.variant == "podman"
|
||||
|
|
@ -76,6 +75,5 @@
|
|||
};
|
||||
}
|
||||
else {};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,8 +159,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
config = (
|
||||
lib.optionalAttrs (options ? fileSystems) {
|
||||
config = lib.optionalAttrs (options ? fileSystems) {
|
||||
boot.initrd.luks.devices = lib.mkIf (config.mods.drives.variant == "manual" && config.mods.drives.useEncryption) (
|
||||
builtins.listToAttrs (
|
||||
map (
|
||||
|
|
@ -309,6 +308,5 @@
|
|||
config.mods.drives.extraDrives
|
||||
);
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
|
|
@ -20,7 +21,7 @@
|
|||
};
|
||||
config = lib.mkIf config.mods.fancontrol.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.fancontrol-gui.enable = true;
|
||||
home.packages = [pkgs.fancontrol-gui];
|
||||
}
|
||||
// (lib.optionalAttrs (options ? boot.kernelModules) {
|
||||
boot = {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
};
|
||||
|
||||
config = lib.optionalAttrs (options ? home.packages) {
|
||||
xdg.configFile."fastfetch/config.jsonc" = lib.mkIf (config.mods.dashfetch.enable) {
|
||||
xdg.configFile."fastfetch/config.jsonc" = lib.mkIf config.mods.dashfetch.enable {
|
||||
source =
|
||||
(pkgs.formats.json {}).generate "config.jsonc"
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@
|
|||
description = "ssh configuration (keys for git)";
|
||||
};
|
||||
};
|
||||
config = (
|
||||
lib.optionalAttrs (options ? programs.git && options ? home.file) {
|
||||
config = lib.optionalAttrs (options ? programs.git && options ? home.file) {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = config.mods.git.username;
|
||||
|
|
@ -56,6 +55,5 @@
|
|||
extraConfig = config.mods.git.additionalConfig;
|
||||
};
|
||||
home.file.".ssh/config".text = config.mods.git.sshConfig;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,9 +130,13 @@
|
|||
'';
|
||||
|
||||
# unlock GPG keyring on login
|
||||
security.pam.services.greetd.enableGnomeKeyring = mkDashDefault true;
|
||||
security.pam.services.greetd.sshAgentAuth = mkDashDefault true;
|
||||
security.pam.sshAgentAuth.enable = mkDashDefault true;
|
||||
security.pam = {
|
||||
services.greetd = {
|
||||
enableGnomeKeyring = mkDashDefault true;
|
||||
sshAgentAuth = mkDashDefault true;
|
||||
};
|
||||
sshAgentAuth.enable = mkDashDefault true;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (options ? home) {
|
||||
xdg.configFile."regreet/regreet.toml".source =
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@
|
|||
description = "More scripts to be passed. (check existing ones for types and examples)";
|
||||
};
|
||||
};
|
||||
config = (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
config = lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages =
|
||||
[
|
||||
(lib.mkIf config.mods.scripts.changeBrightness (
|
||||
|
|
@ -120,6 +119,5 @@
|
|||
))
|
||||
]
|
||||
++ config.mods.scripts.scripts;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ in {
|
|||
};
|
||||
config = lib.mkIf config.mods.teams.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = [(callPackage ../../override/teams.nix {chromium = pkgs.chromium;})];
|
||||
home.packages = [(callPackage ../../override/teams.nix {inherit (pkgs) chromium;})];
|
||||
}
|
||||
// (lib.optionalAttrs (options ? boot.kernelModules) {
|
||||
boot = {
|
||||
|
|
|
|||
|
|
@ -18,13 +18,11 @@
|
|||
description = "Your variant";
|
||||
};
|
||||
};
|
||||
config = (
|
||||
lib.optionalAttrs (options ? services.xserver) {
|
||||
config = lib.optionalAttrs (options ? services.xserver) {
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "${config.mods.xkb.layout}";
|
||||
xkb.variant = "${config.mods.xkb.variant}";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
lib.mkIf config.mods.yazi.enable {
|
||||
home.packages = [pkgs.glow];
|
||||
programs.yazi = {
|
||||
enable = conf.enable;
|
||||
inherit (conf) enable;
|
||||
settings = conf.settings // config.mods.yazi.additionalKeymap;
|
||||
keymap = conf.keymap // config.mods.yazi.additionalConfig;
|
||||
plugins = config.mods.yazi.plugins;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue