mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
style: nix fmt
This commit is contained in:
parent
7913481b66
commit
6e0cc170eb
112 changed files with 1977 additions and 1739 deletions
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
inputs.flake-utils.lib.eachDefaultSystem (system: let
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (config.catppuccin) sources;
|
||||
inherit (lib) mkBefore;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@ ${pkgs.glib}/bin/gsettings set "$gnome_schema" font-name "$font_name"
|
|||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
settings = {
|
||||
# TODO: break it up
|
||||
windowrule = let
|
||||
in [
|
||||
windowrule = [
|
||||
"suppressevent fullscreen, class:steam_app_default"
|
||||
"workspace 2, class:steam_app_default"
|
||||
"suppressevent maximize, class:.*"
|
||||
|
|
@ -87,10 +86,12 @@ ${pkgs.glib}/bin/gsettings set "$gnome_schema" font-name "$font_name"
|
|||
++ (list.map (
|
||||
workspace: "${toString workspace},monitor:DP-1${commonOptions}"
|
||||
) (list.range 2 10))
|
||||
++ [ "11,monitor:DP-2,default:true"] ++ (list.map (
|
||||
++ ["11,monitor:DP-2,default:true"]
|
||||
++ (list.map (
|
||||
workspace: "${toString workspace},monitor:DP-2${commonOptions}"
|
||||
) (list.range 12 20));
|
||||
/*list.concat (list.generate (
|
||||
/*
|
||||
list.concat (list.generate (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
|
|
@ -155,7 +156,8 @@ ${pkgs.glib}/bin/gsettings set "$gnome_schema" font-name "$font_name"
|
|||
uwsmCmd = lib.optionalString parent.programs.uwsm.enable "uwsm app -- ";
|
||||
uwsmApp = cmd: uwsmCmd + cmd;
|
||||
uwsmSingleApp = cmd: "pgrep ${cmd} || ${uwsmCmd + cmd}";
|
||||
in [
|
||||
in
|
||||
[
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
|
||||
", XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next"
|
||||
|
|
@ -226,8 +228,16 @@ ${pkgs.glib}/bin/gsettings set "$gnome_schema" font-name "$font_name"
|
|||
in [
|
||||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
|
||||
"$mod, F${if ws == "0" then "10" else ws}, workspace, ${toString (x + 11)}"
|
||||
"$mod SHIFT, F${if ws == "0" then "10" else ws}, movetoworkspacesilent, ${toString (x + 11)}"
|
||||
"$mod, F${
|
||||
if ws == "0"
|
||||
then "10"
|
||||
else ws
|
||||
}, workspace, ${toString (x + 11)}"
|
||||
"$mod SHIFT, F${
|
||||
if ws == "0"
|
||||
then "10"
|
||||
else ws
|
||||
}, movetoworkspacesilent, ${toString (x + 11)}"
|
||||
|
||||
"$mod ALT, ${ws}, split-workspace, ${toString (x + 1)}"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{ inputs, pkgs, ... }: {
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
package = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,6 @@ window#waybar.empty #window {
|
|||
"mpris"
|
||||
];
|
||||
|
||||
|
||||
modules-right = [
|
||||
"privacy"
|
||||
"bluetooth"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{ config, lib, ... }: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.catppuccin) sources;
|
||||
inherit (lib) mkBefore;
|
||||
cfg = config.catppuccin.sway;
|
||||
theme = "${sources.sway}/catppuccin-${cfg.flavor}";
|
||||
in {
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ lib,
|
|||
std,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
inherit (std) list;
|
||||
inherit (lib.modules) mkMerge;
|
||||
inherit (lib) mkOptionDefault mkDefault mapAttrs;
|
||||
inherit (lib) mkDefault mapAttrs;
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
maim
|
||||
|
|
@ -35,7 +34,10 @@ in {
|
|||
};
|
||||
workspaceNamer = num: let
|
||||
numStr = builtins.toString num;
|
||||
in if workspaceNames ? ${numStr} then "${numStr}:${workspaceNames.${numStr}}" else "${numStr}:${numStr}";
|
||||
in
|
||||
if workspaceNames ? ${numStr}
|
||||
then "${numStr}:${workspaceNames.${numStr}}"
|
||||
else "${numStr}:${numStr}";
|
||||
|
||||
lockCommand = "sh -c '${pkgs.i3lock-fancy-rapid}/bin/i3lock 5 3 & sleep 5 && xset dpms force off'";
|
||||
|
||||
|
|
@ -49,7 +51,8 @@ in {
|
|||
displayWorkspace = display: workspace: ''
|
||||
workspace "${workspaceNamer (builtins.toString workspace)}" output ${display}
|
||||
'';
|
||||
displayBindings = list.map (v: displayWorkspace "DP-2" v) (list.range 1 9)
|
||||
displayBindings =
|
||||
list.map (v: displayWorkspace "DP-2" v) (list.range 1 9)
|
||||
++ [(displayWorkspace "DP-2" 10)]
|
||||
++ list.map (v: displayWorkspace "HDMI-0" (11 + v)) (list.range 1 12);
|
||||
displayBindingsStr = lib.concatLines displayBindings;
|
||||
|
|
@ -70,8 +73,14 @@ in {
|
|||
};
|
||||
|
||||
startup = [
|
||||
{ command = "~/.screenlayout/main.sh"; notification = false; }
|
||||
{ command = "blueman-applet"; notification = false; }
|
||||
{
|
||||
command = "~/.screenlayout/main.sh";
|
||||
notification = false;
|
||||
}
|
||||
{
|
||||
command = "blueman-applet";
|
||||
notification = false;
|
||||
}
|
||||
];
|
||||
|
||||
keybindings = let
|
||||
|
|
@ -107,7 +116,8 @@ in {
|
|||
"${mod}+Shift+g" = ''mode "${gapsMode}"'';
|
||||
"${mod}+Delete" = ''mode "${actionMode}"'';
|
||||
};
|
||||
in mkMerge (map mapDefaultAttrs ([ normalBindings ] ++ workspaceBindings));
|
||||
in
|
||||
mkMerge (map mapDefaultAttrs ([normalBindings] ++ workspaceBindings));
|
||||
|
||||
assigns = {
|
||||
${workspaceNamer 2} = [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{ pkgs, config, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home.packages = [
|
||||
config.programs.rofi.finalPackage
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
{pkgs, ...}: {
|
||||
_: {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{ pkgs, config, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.niri.settings.spawn-at-startup = let
|
||||
import-gsettings = pkgs.writeShellScriptBin "import-gsettings" ''
|
||||
# usage: import-gsettings
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
{ config, pkgs, lib, std, ... }: let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
std,
|
||||
...
|
||||
}: let
|
||||
inherit (std) list;
|
||||
inherit (lib.modules) mkMerge;
|
||||
in {
|
||||
|
|
@ -14,7 +20,10 @@ in {
|
|||
bindWorkspace "0" 10
|
||||
)
|
||||
];
|
||||
in mkMerge (workspaceBindings ++ [{
|
||||
in
|
||||
mkMerge (workspaceBindings
|
||||
++ [
|
||||
{
|
||||
# Transcribed: https://github.com/sodiboo/niri-flake/issues/483
|
||||
# thank you Pacman99 you chad :3
|
||||
"Mod+Q".action.close-window = {};
|
||||
|
|
@ -141,5 +150,6 @@ in {
|
|||
"Mod+Escape".action.spawn = ["${config.programs.wlogout.package}/bin/wlogout" "-p" "layer-shell"];
|
||||
"Mod+Shift+Escape".action.spawn = ["${config.programs.swaylock.package}/bin/swaylock" "-f"];
|
||||
#"Print".action.spawn = ["${pkgs.grimblast}/bin/grimblast" "copy" "area"];
|
||||
}]);
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
catppuccin.cursors.enable = true;
|
||||
home.pointerCursor = {
|
||||
dotIcons.enable = true;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
...
|
||||
}: let
|
||||
inherit (config.base16) palette;
|
||||
inherit (lib.modules) mkForce;
|
||||
in {
|
||||
systemd.user.services = {
|
||||
mako = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
{ config, pkgs, lib, ... }: let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.meta) getExe;
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{ pkgs, config, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
|
|
|
|||
|
|
@ -149,7 +149,6 @@ window#waybar.empty #window {
|
|||
"mpris"
|
||||
];
|
||||
|
||||
|
||||
modules-right = [
|
||||
"privacy"
|
||||
"bluetooth"
|
||||
|
|
|
|||
|
|
@ -3,11 +3,9 @@ _: {
|
|||
{
|
||||
draw-border-with-background = false;
|
||||
clip-to-geometry = true;
|
||||
geometry-corner-radius =
|
||||
let
|
||||
geometry-corner-radius = let
|
||||
r = 5.0;
|
||||
in
|
||||
{
|
||||
in {
|
||||
bottom-left = r;
|
||||
bottom-right = r;
|
||||
top-left = r;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
{ lib, pkgs, inputs, ... }: let
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkForce;
|
||||
qtct = ''
|
||||
[Appearance]
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.generators) toJSON;
|
||||
in {
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
(discord-krisp.override {
|
||||
withOpenASAR = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (lib.attrsets) listToAttrs nameValuePair;
|
||||
inherit (lib.modules) mkMerge;
|
||||
in {
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.firefox.profiles.main = {
|
||||
containersForce = true;
|
||||
containers = {
|
||||
|
|
@ -31,4 +31,3 @@ in {
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{pkgs, nur, ...}: let
|
||||
{
|
||||
pkgs,
|
||||
nur,
|
||||
...
|
||||
}: let
|
||||
defaultFont = "Monaspace Krypton";
|
||||
in {
|
||||
home.sessionVariables = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{pkgs, inputs, ... }: let
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system};
|
||||
in {
|
||||
programs.spicetify = {
|
||||
|
|
@ -11,7 +15,9 @@ in {
|
|||
experimentalFeatures = true;
|
||||
windowManagerPatch = true;
|
||||
colorScheme = "CatppuccinMocha";
|
||||
theme = spicePkgs.themes.text // {
|
||||
theme =
|
||||
spicePkgs.themes.text
|
||||
// {
|
||||
additionalCss = ''
|
||||
:root {
|
||||
--font-family: 'Monaspace Krypton', monospace;
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@
|
|||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (std) string set;
|
||||
initLua = (pkgs.replaceVars ./init.lua ({
|
||||
initLua = pkgs.replaceVars ./init.lua ({
|
||||
base16ShellPath = config.base16.shell.package;
|
||||
catppuccin_flavour = config.catppuccin.flavor;
|
||||
inherit (config.base16) defaultSchemeName;
|
||||
defaultSchemeSlug = config.base16.defaultScheme.slug;
|
||||
}
|
||||
// set.map (_: col: string.justifyRight 2 "0" (builtins.toString col.ansiIndex))
|
||||
(set.filter (var: _: string.hasInfix "base" var) config.base16.defaultScheme)));
|
||||
(set.filter (var: _: string.hasInfix "base" var) config.base16.defaultScheme));
|
||||
in {
|
||||
home.sessionVariables = mkIf config.programs.neovim.enable {EDITOR = "nvim";};
|
||||
programs.neovim = {
|
||||
|
|
|
|||
|
|
@ -98,10 +98,10 @@ in {
|
|||
"sidequest"
|
||||
"ungoogled-chromium"
|
||||
];
|
||||
flake = self;
|
||||
makeAliasForBin = package: nameValuePair package "nix run kat#${package}";
|
||||
packages' = builtins.listToAttrs (map makeAliasForBin packages);
|
||||
in mkMerge [
|
||||
in
|
||||
mkMerge [
|
||||
packages'
|
||||
{
|
||||
nixdirfmt = "nixpkgs-fmt $(fd -e nix)";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.xsession.windowManager.i3;
|
||||
|
||||
commonOptions = import ./i3/options.nix {
|
||||
|
|
@ -14,10 +14,26 @@ let
|
|||
|
||||
configModule = types.submodule {
|
||||
options = {
|
||||
inherit (commonOptions)
|
||||
fonts window floating focus assigns modifier workspaceLayout
|
||||
workspaceAutoBackAndForth keycodebindings colors bars startup gaps menu
|
||||
terminal defaultWorkspace workspaceOutputAssign;
|
||||
inherit
|
||||
(commonOptions)
|
||||
fonts
|
||||
window
|
||||
floating
|
||||
focus
|
||||
assigns
|
||||
modifier
|
||||
workspaceLayout
|
||||
workspaceAutoBackAndForth
|
||||
keycodebindings
|
||||
colors
|
||||
bars
|
||||
startup
|
||||
gaps
|
||||
menu
|
||||
terminal
|
||||
defaultWorkspace
|
||||
workspaceOutputAssign
|
||||
;
|
||||
|
||||
keybindings = mkOption {
|
||||
type = types.attrsOf (types.nullOr types.str);
|
||||
|
|
@ -68,25 +84,55 @@ let
|
|||
moduleName = "i3";
|
||||
};
|
||||
|
||||
inherit (commonFunctions)
|
||||
keybindingsStr keycodebindingsStr modeStr assignStr barStr gapsStr
|
||||
floatingCriteriaStr windowCommandsStr colorSetStr windowBorderString
|
||||
fontConfigStr keybindingDefaultWorkspace keybindingsRest workspaceOutputStr;
|
||||
inherit
|
||||
(commonFunctions)
|
||||
keybindingsStr
|
||||
keycodebindingsStr
|
||||
modeStr
|
||||
assignStr
|
||||
barStr
|
||||
gapsStr
|
||||
floatingCriteriaStr
|
||||
windowCommandsStr
|
||||
colorSetStr
|
||||
windowBorderString
|
||||
fontConfigStr
|
||||
keybindingDefaultWorkspace
|
||||
keybindingsRest
|
||||
workspaceOutputStr
|
||||
;
|
||||
|
||||
startupEntryStr = { command, always, notification, workspace, ... }:
|
||||
startupEntryStr = {
|
||||
command,
|
||||
always,
|
||||
notification,
|
||||
workspace,
|
||||
...
|
||||
}:
|
||||
concatStringsSep " " [
|
||||
(if always then "exec_always" else "exec")
|
||||
(if (notification && workspace == null) then "" else "--no-startup-id")
|
||||
(if (workspace == null) then
|
||||
command
|
||||
else
|
||||
"i3-msg 'workspace ${workspace}; exec ${command}'")
|
||||
(
|
||||
if always
|
||||
then "exec_always"
|
||||
else "exec"
|
||||
)
|
||||
(
|
||||
if (notification && workspace == null)
|
||||
then ""
|
||||
else "--no-startup-id"
|
||||
)
|
||||
(
|
||||
if (workspace == null)
|
||||
then command
|
||||
else "i3-msg 'workspace ${workspace}; exec ${command}'"
|
||||
)
|
||||
];
|
||||
|
||||
configFile = pkgs.writeText "i3.conf" (concatStringsSep "\n"
|
||||
((if cfg.config != null then
|
||||
with cfg.config;
|
||||
([ cfg.extraConfigEarly] ++ [
|
||||
((
|
||||
if cfg.config != null
|
||||
then
|
||||
with cfg.config; ([cfg.extraConfigEarly]
|
||||
++ [
|
||||
(fontConfigStr fonts)
|
||||
"floating_modifier ${floating.modifier}"
|
||||
(windowBorderString window floating)
|
||||
|
|
@ -94,7 +140,11 @@ let
|
|||
"focus_wrapping ${focus.wrapping}"
|
||||
"focus_follows_mouse ${lib.hm.booleans.yesNo focus.followMouse}"
|
||||
"focus_on_window_activation ${focus.newWindow}"
|
||||
"mouse_warping ${if focus.mouseWarping then "output" else "none"}"
|
||||
"mouse_warping ${
|
||||
if focus.mouseWarping
|
||||
then "output"
|
||||
else "none"
|
||||
}"
|
||||
"workspace_layout ${workspaceLayout}"
|
||||
"workspace_auto_back_and_forth ${
|
||||
lib.hm.booleans.yesNo workspaceAutoBackAndForth
|
||||
|
|
@ -108,18 +158,21 @@ let
|
|||
(keybindingsStr {keybindings = keybindingDefaultWorkspace;})
|
||||
(keybindingsStr {keybindings = keybindingsRest;})
|
||||
(keycodebindingsStr keycodebindings)
|
||||
] ++ mapAttrsToList (modeStr false) modes
|
||||
++ mapAttrsToList assignStr assigns ++ map barStr bars
|
||||
]
|
||||
++ mapAttrsToList (modeStr false) modes
|
||||
++ mapAttrsToList assignStr assigns
|
||||
++ map barStr bars
|
||||
++ optional (gaps != null) gapsStr
|
||||
++ map floatingCriteriaStr floating.criteria
|
||||
++ map windowCommandsStr window.commands ++ map startupEntryStr startup
|
||||
++ map windowCommandsStr window.commands
|
||||
++ map startupEntryStr startup
|
||||
++ map workspaceOutputStr workspaceOutputAssign)
|
||||
else
|
||||
[ ]) ++ [ cfg.extraConfig ]));
|
||||
else []
|
||||
)
|
||||
++ [cfg.extraConfig]));
|
||||
|
||||
# Validates the i3 configuration
|
||||
checkI3Config =
|
||||
pkgs.runCommandLocal "i3-config" { buildInputs = [ cfg.package ]; } ''
|
||||
checkI3Config = pkgs.runCommandLocal "i3-config" {buildInputs = [cfg.package];} ''
|
||||
# We have to make sure the wrapper does not start a dbus session
|
||||
export DBUS_SESSION_BUS_ADDRESS=1
|
||||
|
||||
|
|
@ -131,7 +184,6 @@ let
|
|||
};
|
||||
cp ${configFile} $out
|
||||
'';
|
||||
|
||||
in {
|
||||
meta.maintainers = with maintainers; [sumnerevans];
|
||||
|
||||
|
|
@ -155,13 +207,13 @@ in {
|
|||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description =
|
||||
"Extra configuration lines to add to ~/.config/i3/config.";
|
||||
description = "Extra configuration lines to add to ~/.config/i3/config.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [ (mkIf cfg.enable (mkMerge [
|
||||
config = mkMerge [
|
||||
(mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
assertions = [
|
||||
(hm.assertions.assertPlatform "xsession.windowManager.i3" pkgs
|
||||
|
|
@ -186,12 +238,14 @@ in {
|
|||
};
|
||||
}
|
||||
(mkIf (cfg.config != null) {
|
||||
warnings = (optional (isList cfg.config.fonts)
|
||||
warnings =
|
||||
(optional (isList cfg.config.fonts)
|
||||
"Specifying i3.config.fonts as a list is deprecated. Use the attrset version instead.")
|
||||
++ flatten (map (b:
|
||||
optional (isList b.fonts)
|
||||
"Specifying i3.config.bars[].fonts as a list is deprecated. Use the attrset version instead.")
|
||||
cfg.config.bars) ++ [
|
||||
cfg.config.bars)
|
||||
++ [
|
||||
(mkIf (any (s: s.workspace != null) cfg.config.startup)
|
||||
("'xsession.windowManager.i3.config.startup.*.workspace' is deprecated, "
|
||||
+ "use 'xsession.windowManager.i3.config.assigns' instead."
|
||||
|
|
@ -202,7 +256,8 @@ in {
|
|||
];
|
||||
})
|
||||
]))
|
||||
{xsession.windowManager.i3.config.keybindings = mapAttrs (n: mkOptionDefault) {
|
||||
{
|
||||
xsession.windowManager.i3.config.keybindings = mapAttrs (_n: mkOptionDefault) {
|
||||
"${cfg.config.modifier}+Return" = "exec ${cfg.config.terminal}";
|
||||
"${cfg.config.modifier}+Shift+q" = "kill";
|
||||
"${cfg.config.modifier}+d" = "exec ${cfg.config.menu}";
|
||||
|
|
@ -235,8 +290,7 @@ in {
|
|||
|
||||
"${cfg.config.modifier}+Shift+c" = "reload";
|
||||
"${cfg.config.modifier}+Shift+r" = "restart";
|
||||
"${cfg.config.modifier}+Shift+e" =
|
||||
"exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'";
|
||||
"${cfg.config.modifier}+Shift+e" = "exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'";
|
||||
|
||||
"${cfg.config.modifier}+r" = "mode resize";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,31 +1,40 @@
|
|||
|
||||
{ cfg, config, lib, moduleName }:
|
||||
|
||||
with lib;
|
||||
|
||||
rec {
|
||||
criteriaStr = criteria:
|
||||
let
|
||||
{
|
||||
cfg,
|
||||
config,
|
||||
lib,
|
||||
moduleName,
|
||||
}:
|
||||
with lib; rec {
|
||||
criteriaStr = criteria: let
|
||||
toCriteria = k: v:
|
||||
if builtins.isBool v then
|
||||
(if v then "${k}" else "")
|
||||
else
|
||||
''${k}="${v}"'';
|
||||
if builtins.isBool v
|
||||
then
|
||||
(
|
||||
if v
|
||||
then "${k}"
|
||||
else ""
|
||||
)
|
||||
else ''${k}="${v}"'';
|
||||
in "[${concatStringsSep " " (mapAttrsToList toCriteria criteria)}]";
|
||||
|
||||
keybindingDefaultWorkspace = filterAttrs (n: v:
|
||||
keybindingDefaultWorkspace = filterAttrs (_n: v:
|
||||
cfg.config.defaultWorkspace != null && v == cfg.config.defaultWorkspace)
|
||||
cfg.config.keybindings;
|
||||
|
||||
keybindingsRest = filterAttrs (n: v:
|
||||
keybindingsRest = filterAttrs (_n: v:
|
||||
cfg.config.defaultWorkspace == null || v != cfg.config.defaultWorkspace)
|
||||
cfg.config.keybindings;
|
||||
|
||||
keybindingsStr = { keybindings, bindsymArgs ? "", indent ? "" }:
|
||||
keybindingsStr = {
|
||||
keybindings,
|
||||
bindsymArgs ? "",
|
||||
indent ? "",
|
||||
}:
|
||||
concatStringsSep "\n" (mapAttrsToList (keycomb: action:
|
||||
optionalString (action != null) "${indent}bindsym ${
|
||||
lib.optionalString (bindsymArgs != "") "${bindsymArgs} "
|
||||
}${keycomb} ${action}") keybindings);
|
||||
}${keycomb} ${action}")
|
||||
keybindings);
|
||||
|
||||
keycodebindingsStr = keycodebindings:
|
||||
concatStringsSep "\n" (mapAttrsToList (keycomb: action:
|
||||
|
|
@ -57,23 +66,42 @@ rec {
|
|||
(map (c: "assign ${criteriaStr c} ${workspace}") criteria);
|
||||
|
||||
fontConfigStr = let
|
||||
toFontStr = { names, style ? "", size ? "" }:
|
||||
toFontStr = {
|
||||
names,
|
||||
style ? "",
|
||||
size ? "",
|
||||
}:
|
||||
optionalString (names != []) concatStringsSep " "
|
||||
(remove "" ["font" "pango:${concatStringsSep ", " names}" style size]);
|
||||
in fontCfg:
|
||||
if isList fontCfg then
|
||||
toFontStr { names = fontCfg; }
|
||||
in
|
||||
fontCfg:
|
||||
if isList fontCfg
|
||||
then toFontStr {names = fontCfg;}
|
||||
else
|
||||
toFontStr {
|
||||
inherit (fontCfg) names style;
|
||||
size = toString fontCfg.size;
|
||||
};
|
||||
|
||||
barStr = { id, fonts, mode, hiddenState, position, workspaceButtons
|
||||
, workspaceNumbers, command, statusCommand, colors, trayOutput, trayPadding
|
||||
, extraConfig, ... }:
|
||||
let colorsNotNull = lib.filterAttrs (n: v: v != null) colors != { };
|
||||
in concatMapStrings (x: x + "\n") (indent (lists.subtractLists [ "" null ]
|
||||
barStr = {
|
||||
id,
|
||||
fonts,
|
||||
mode,
|
||||
hiddenState,
|
||||
position,
|
||||
workspaceButtons,
|
||||
workspaceNumbers,
|
||||
command,
|
||||
statusCommand,
|
||||
colors,
|
||||
trayOutput,
|
||||
trayPadding,
|
||||
extraConfig,
|
||||
...
|
||||
}: let
|
||||
colorsNotNull = lib.filterAttrs (_n: v: v != null) colors != {};
|
||||
in
|
||||
concatMapStrings (x: x + "\n") (indent (lists.subtractLists ["" null]
|
||||
(flatten [
|
||||
"bar {"
|
||||
(optionalString (id != null) "id ${id}")
|
||||
|
|
@ -137,30 +165,41 @@ rec {
|
|||
(optionalString (smartBorders != "off") "smart_borders ${smartBorders}")
|
||||
]);
|
||||
|
||||
windowBorderString = window: floating:
|
||||
let
|
||||
titlebarString = { titlebar, border, ... }:
|
||||
"${if titlebar then "normal" else "pixel"} ${toString border}";
|
||||
in concatStringsSep "\n" [
|
||||
windowBorderString = window: floating: let
|
||||
titlebarString = {
|
||||
titlebar,
|
||||
border,
|
||||
...
|
||||
}: "${
|
||||
if titlebar
|
||||
then "normal"
|
||||
else "pixel"
|
||||
} ${toString border}";
|
||||
in
|
||||
concatStringsSep "\n" [
|
||||
"default_border ${titlebarString window}"
|
||||
"default_floating_border ${titlebarString floating}"
|
||||
];
|
||||
|
||||
floatingCriteriaStr = criteria:
|
||||
"for_window ${criteriaStr criteria} floating enable";
|
||||
windowCommandsStr = { command, criteria, ... }:
|
||||
"for_window ${criteriaStr criteria} ${command}";
|
||||
workspaceOutputStr = item:
|
||||
let outputs = concatMapStringsSep " " strings.escapeNixString item.output;
|
||||
floatingCriteriaStr = criteria: "for_window ${criteriaStr criteria} floating enable";
|
||||
windowCommandsStr = {
|
||||
command,
|
||||
criteria,
|
||||
...
|
||||
}: "for_window ${criteriaStr criteria} ${command}";
|
||||
workspaceOutputStr = item: let
|
||||
outputs = concatMapStringsSep " " strings.escapeNixString item.output;
|
||||
in ''workspace "${item.workspace}" output ${outputs}'';
|
||||
|
||||
indent = list:
|
||||
{ includesWrapper ? true, level ? 1 }:
|
||||
let prefix = concatStringsSep "" (lib.genList (x: " ") (level * 2));
|
||||
|
||||
in (lib.imap1 (i: v:
|
||||
"${if includesWrapper && (i == 1 || i == (lib.length list)) then
|
||||
v
|
||||
else
|
||||
"${prefix}${v}"}") list);
|
||||
indent = list: {
|
||||
includesWrapper ? true,
|
||||
level ? 1,
|
||||
}: let
|
||||
prefix = concatStringsSep "" (lib.genList (_x: " ") (level * 2));
|
||||
in lib.imap1 (i: v: "${
|
||||
if includesWrapper && (i == 1 || i == (lib.length list))
|
||||
then v
|
||||
else "${prefix}${v}"
|
||||
}")
|
||||
list;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
{ config, lib, moduleName, cfg, pkgs, capitalModuleName ? moduleName }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
moduleName,
|
||||
cfg,
|
||||
pkgs,
|
||||
capitalModuleName ? moduleName,
|
||||
}:
|
||||
with lib; let
|
||||
isI3 = moduleName == "i3";
|
||||
isSway = !isI3;
|
||||
|
||||
|
|
@ -42,7 +46,8 @@ let
|
|||
};
|
||||
|
||||
startupModule = types.submodule {
|
||||
options = {
|
||||
options =
|
||||
{
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
description = "Command that will be executed on startup.";
|
||||
|
|
@ -53,7 +58,8 @@ let
|
|||
default = false;
|
||||
description = "Whether to run command on each ${moduleName} restart.";
|
||||
};
|
||||
} // optionalAttrs isI3 {
|
||||
}
|
||||
// optionalAttrs isI3 {
|
||||
notification = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
|
|
@ -73,16 +79,23 @@ let
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
barModule = types.submodule {
|
||||
options = let
|
||||
versionAtLeast2009 = versionAtLeast stateVersion "20.09";
|
||||
mkNullableOption = { type, default, ... }@args:
|
||||
mkOption (args // {
|
||||
mkNullableOption = {
|
||||
type,
|
||||
default,
|
||||
...
|
||||
} @ args:
|
||||
mkOption (args
|
||||
// {
|
||||
type = types.nullOr type;
|
||||
default = if versionAtLeast2009 then null else default;
|
||||
default =
|
||||
if versionAtLeast2009
|
||||
then null
|
||||
else default;
|
||||
defaultText = literalExpression ''
|
||||
null for state version ≥ 20.09, as example otherwise
|
||||
'';
|
||||
|
|
@ -145,8 +158,7 @@ let
|
|||
workspaceNumbers = mkNullableOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description =
|
||||
"Whether workspace numbers should be displayed within the workspace buttons.";
|
||||
description = "Whether workspace numbers should be displayed within the workspace buttons.";
|
||||
};
|
||||
|
||||
command = mkOption {
|
||||
|
|
@ -154,14 +166,17 @@ let
|
|||
default = let
|
||||
# If the user uses the "system" Sway (i.e. cfg.package == null) then the bar has
|
||||
# to come from a different package
|
||||
pkg = if isSway && isNull cfg.package then pkgs.sway else cfg.package;
|
||||
pkg =
|
||||
if isSway && (cfg.package == null)
|
||||
then pkgs.sway
|
||||
else cfg.package;
|
||||
in "${pkg}/bin/${moduleName}bar";
|
||||
defaultText = "i3bar";
|
||||
description = "Command that will be used to start a bar.";
|
||||
example = if isI3 then
|
||||
"\${pkgs.i3}/bin/i3bar -t"
|
||||
else
|
||||
"\${pkgs.waybar}/bin/waybar";
|
||||
example =
|
||||
if isI3
|
||||
then "\${pkgs.i3}/bin/i3bar -t"
|
||||
else "\${pkgs.waybar}/bin/waybar";
|
||||
};
|
||||
|
||||
statusCommand = mkNullableOption {
|
||||
|
|
@ -194,24 +209,21 @@ let
|
|||
focusedBackground = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description =
|
||||
"Background color of the bar on the currently focused monitor output.";
|
||||
description = "Background color of the bar on the currently focused monitor output.";
|
||||
example = "#000000";
|
||||
};
|
||||
|
||||
focusedStatusline = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description =
|
||||
"Text color to be used for the statusline on the currently focused monitor output.";
|
||||
description = "Text color to be used for the statusline on the currently focused monitor output.";
|
||||
example = "#ffffff";
|
||||
};
|
||||
|
||||
focusedSeparator = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description =
|
||||
"Text color to be used for the separator on the currently focused monitor output.";
|
||||
description = "Text color to be used for the separator on the currently focused monitor output.";
|
||||
example = "#666666";
|
||||
};
|
||||
|
||||
|
|
@ -272,8 +284,7 @@ let
|
|||
background = "#900000";
|
||||
text = "#ffffff";
|
||||
};
|
||||
description =
|
||||
"Border, background and text color for the binding mode indicator";
|
||||
description = "Border, background and text color for the binding mode indicator";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -291,7 +302,10 @@ let
|
|||
trayOutput = mkNullableOption {
|
||||
type = types.str;
|
||||
# Sway/Wayland doesn't have the concept of a primary output. The default for sway is to show it on all outputs
|
||||
default = if isI3 then "primary" else "*";
|
||||
default =
|
||||
if isI3
|
||||
then "primary"
|
||||
else "*";
|
||||
description = "Where to output tray.";
|
||||
};
|
||||
|
||||
|
|
@ -400,14 +414,17 @@ in {
|
|||
options = {
|
||||
titlebar = mkOption {
|
||||
type = types.bool;
|
||||
default = if versionOlder stateVersion "23.05" then
|
||||
(isI3 && (cfg.config.gaps == null))
|
||||
else
|
||||
true;
|
||||
defaultText = if isI3 then ''
|
||||
default =
|
||||
if versionOlder stateVersion "23.05"
|
||||
then (isI3 && (cfg.config.gaps == null))
|
||||
else true;
|
||||
defaultText =
|
||||
if isI3
|
||||
then ''
|
||||
true for state version ≥ 23.05
|
||||
config.gaps == null for state version < 23.05
|
||||
'' else ''
|
||||
''
|
||||
else ''
|
||||
true for state version ≥ 23.05
|
||||
false for state version < 23.05
|
||||
'';
|
||||
|
|
@ -424,10 +441,10 @@ in {
|
|||
type = let
|
||||
i3Options = ["none" "vertical" "horizontal" "both" "smart"];
|
||||
swayOptions = i3Options ++ ["smart_no_gaps"];
|
||||
in if isI3 then
|
||||
types.enum i3Options
|
||||
else
|
||||
types.enum (swayOptions ++ (map (e: "--i3 ${e}") swayOptions));
|
||||
in
|
||||
if isI3
|
||||
then types.enum i3Options
|
||||
else types.enum (swayOptions ++ (map (e: "--i3 ${e}") swayOptions));
|
||||
default = "none";
|
||||
description = "Hide window borders adjacent to the screen edges.";
|
||||
};
|
||||
|
|
@ -439,10 +456,12 @@ in {
|
|||
List of commands that should be executed on specific windows.
|
||||
See {option}`for_window` ${moduleName}wm option documentation.
|
||||
'';
|
||||
example = [{
|
||||
example = [
|
||||
{
|
||||
command = "border pixel 1";
|
||||
criteria = {class = "XTerm";};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -455,14 +474,17 @@ in {
|
|||
options = {
|
||||
titlebar = mkOption {
|
||||
type = types.bool;
|
||||
default = if versionOlder stateVersion "23.05" then
|
||||
(isI3 && (cfg.config.gaps == null))
|
||||
else
|
||||
true;
|
||||
defaultText = if isI3 then ''
|
||||
default =
|
||||
if versionOlder stateVersion "23.05"
|
||||
then (isI3 && (cfg.config.gaps == null))
|
||||
else true;
|
||||
defaultText =
|
||||
if isI3
|
||||
then ''
|
||||
true for state version ≥ 23.05
|
||||
config.gaps == null for state version < 23.05
|
||||
'' else ''
|
||||
''
|
||||
else ''
|
||||
true for state version ≥ 23.05
|
||||
false for state version < 23.05
|
||||
'';
|
||||
|
|
@ -479,16 +501,14 @@ in {
|
|||
type = types.str;
|
||||
default = cfg.config.modifier;
|
||||
defaultText = "${moduleName}.config.modifier";
|
||||
description =
|
||||
"Modifier key or keys that can be used to drag floating windows.";
|
||||
description = "Modifier key or keys that can be used to drag floating windows.";
|
||||
example = "Mod4";
|
||||
};
|
||||
|
||||
criteria = mkOption {
|
||||
type = types.listOf criteriaModule;
|
||||
default = [];
|
||||
description =
|
||||
"List of criteria for windows that should be opened in a floating mode.";
|
||||
description = "List of criteria for windows that should be opened in a floating mode.";
|
||||
example = [
|
||||
{"title" = "Steam - Update News";}
|
||||
{"class" = "Pavucontrol";}
|
||||
|
|
@ -515,24 +535,38 @@ in {
|
|||
};
|
||||
|
||||
followMouse = mkOption {
|
||||
type = if isSway then
|
||||
types.either (types.enum [ "yes" "no" "always" ]) types.bool
|
||||
else
|
||||
types.bool;
|
||||
default = if isSway then "yes" else true;
|
||||
type =
|
||||
if isSway
|
||||
then types.either (types.enum ["yes" "no" "always"]) types.bool
|
||||
else types.bool;
|
||||
default =
|
||||
if isSway
|
||||
then "yes"
|
||||
else true;
|
||||
description = "Whether focus should follow the mouse.";
|
||||
apply = val:
|
||||
if (isSway && isBool val) then (lib.hm.booleans.yesNo val) else val;
|
||||
if (isSway && isBool val)
|
||||
then (lib.hm.booleans.yesNo val)
|
||||
else val;
|
||||
};
|
||||
|
||||
wrapping = mkOption {
|
||||
type = types.enum ["yes" "no" "force" "workspace"];
|
||||
default = {
|
||||
i3 = if cfg.config.focus.forceWrapping then "force" else "yes";
|
||||
default =
|
||||
{
|
||||
i3 =
|
||||
if cfg.config.focus.forceWrapping
|
||||
then "force"
|
||||
else "yes";
|
||||
# the sway module's logic was inverted and incorrect,
|
||||
# so preserve it for backwards compatibility purposes
|
||||
sway = if cfg.config.focus.forceWrapping then "yes" else "no";
|
||||
}.${moduleName};
|
||||
sway =
|
||||
if cfg.config.focus.forceWrapping
|
||||
then "yes"
|
||||
else "no";
|
||||
}.${
|
||||
moduleName
|
||||
};
|
||||
description = ''
|
||||
Whether the window focus commands automatically wrap around the edge of containers.
|
||||
|
||||
|
|
@ -551,10 +585,10 @@ in {
|
|||
};
|
||||
|
||||
mouseWarping = mkOption {
|
||||
type = if isSway then
|
||||
types.oneOf [ types.bool (types.enum [ "container" "output" ]) ]
|
||||
else
|
||||
types.bool;
|
||||
type =
|
||||
if isSway
|
||||
then types.oneOf [types.bool (types.enum ["container" "output"])]
|
||||
else types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether mouse cursor should be warped to the center of the window when switching focus
|
||||
|
|
@ -713,7 +747,10 @@ in {
|
|||
|
||||
bars = mkOption {
|
||||
type = types.listOf barModule;
|
||||
default = if versionAtLeast stateVersion "20.09" then [{
|
||||
default =
|
||||
if versionAtLeast stateVersion "20.09"
|
||||
then [
|
||||
{
|
||||
mode = "dock";
|
||||
hiddenState = "hide";
|
||||
position = "bottom";
|
||||
|
|
@ -755,8 +792,9 @@ in {
|
|||
text = "#ffffff";
|
||||
};
|
||||
};
|
||||
}] else
|
||||
[ { } ];
|
||||
}
|
||||
]
|
||||
else [{}];
|
||||
defaultText = literalExpression "see code";
|
||||
description = ''
|
||||
${capitalModuleName} bars settings blocks. Set to empty list to remove bars completely.
|
||||
|
|
@ -771,7 +809,9 @@ in {
|
|||
|
||||
See <https://i3wm.org/docs/userguide.html#_automatically_starting_applications_on_i3_startup>.
|
||||
'';
|
||||
example = if isI3 then
|
||||
example =
|
||||
if isI3
|
||||
then
|
||||
literalExpression ''
|
||||
[
|
||||
{ command = "systemctl --user restart polybar"; always = true; notification = false; }
|
||||
|
|
@ -876,17 +916,20 @@ in {
|
|||
|
||||
terminal = mkOption {
|
||||
type = types.str;
|
||||
default = if isI3 then "i3-sensible-terminal" else "${pkgs.foot}/bin/foot";
|
||||
default =
|
||||
if isI3
|
||||
then "i3-sensible-terminal"
|
||||
else "${pkgs.foot}/bin/foot";
|
||||
description = "Default terminal to run.";
|
||||
example = "alacritty";
|
||||
};
|
||||
|
||||
menu = mkOption {
|
||||
type = types.str;
|
||||
default = if isSway then
|
||||
"${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --"
|
||||
else
|
||||
"${pkgs.dmenu}/bin/dmenu_run";
|
||||
default =
|
||||
if isSway
|
||||
then "${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --"
|
||||
else "${pkgs.dmenu}/bin/dmenu_run";
|
||||
description = "Default launcher to use.";
|
||||
example = "bemenu-run";
|
||||
};
|
||||
|
|
@ -896,7 +939,9 @@ in {
|
|||
default = null;
|
||||
description = ''
|
||||
The default workspace to show when ${
|
||||
if isSway then "sway" else "i3"
|
||||
if isSway
|
||||
then "sway"
|
||||
else "i3"
|
||||
} is launched.
|
||||
This must to correspond to the value of the keybinding of the default workspace.
|
||||
'';
|
||||
|
|
@ -904,8 +949,7 @@ in {
|
|||
};
|
||||
|
||||
workspaceOutputAssign = mkOption {
|
||||
type = with types;
|
||||
let
|
||||
type = with types; let
|
||||
workspaceOutputOpts = submodule {
|
||||
options = {
|
||||
workspace = mkOption {
|
||||
|
|
@ -924,15 +968,19 @@ in {
|
|||
example = "eDP";
|
||||
description = ''
|
||||
Name(s) of the output(s) from {command}`
|
||||
${if isSway then "swaymsg" else "i3-msg"} -t get_outputs
|
||||
${
|
||||
if isSway
|
||||
then "swaymsg"
|
||||
else "i3-msg"
|
||||
} -t get_outputs
|
||||
`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
in listOf workspaceOutputOpts;
|
||||
in
|
||||
listOf workspaceOutputOpts;
|
||||
default = [];
|
||||
description = "Assign workspaces to outputs.";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,18 +4,14 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
inherit (lib) mkOption types;
|
||||
palette =
|
||||
(pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json"))
|
||||
.${config.catppuccin.flavor}.colors;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.palette = mkOption {type = types.attrsOf types.raw;};
|
||||
config = {
|
||||
inherit palette;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,9 @@ in {
|
|||
linux = "linux";
|
||||
home = "linux";
|
||||
}
|
||||
.${string.toLower config.type};
|
||||
.${
|
||||
string.toLower config.type
|
||||
};
|
||||
in "${config.arch}-${kernel}";
|
||||
folder =
|
||||
{
|
||||
|
|
@ -77,7 +79,9 @@ in {
|
|||
windows = "windows";
|
||||
home = "home";
|
||||
}
|
||||
.${string.toLower config.type};
|
||||
.${
|
||||
string.toLower config.type
|
||||
};
|
||||
modules = mkMerge [
|
||||
(mkIf (config.folder != "linux") [
|
||||
# per-OS modules
|
||||
|
|
@ -107,7 +111,7 @@ in {
|
|||
}
|
||||
// args);
|
||||
in
|
||||
args: sys args;
|
||||
sys;
|
||||
home = args: let
|
||||
renamedArgs = set.rename "specialArgs" "extraSpecialArgs" args;
|
||||
renamedArgsWithPkgs =
|
||||
|
|
@ -123,7 +127,9 @@ in {
|
|||
darwin = inputs.darwin.lib.darwinSystem;
|
||||
macos = inputs.darwin.lib.darwinSystem;
|
||||
}
|
||||
.${string.toLower config.type}
|
||||
.${
|
||||
string.toLower config.type
|
||||
}
|
||||
or null;
|
||||
built = mkOptionDefault (mapNullable (builder:
|
||||
builder {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{ pkgs, inputs, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
package = inputs.nh.packages.${pkgs.system}.nh;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
|
|
@ -30,7 +29,8 @@ in {
|
|||
sops.secrets.tailscale-key = mkIf cfg.enable {
|
||||
sopsFile = ./secrets.yaml;
|
||||
};
|
||||
/* systemd.services.tailscale-autoconnect = mkIf cfg.enable rec {
|
||||
/*
|
||||
systemd.services.tailscale-autoconnect = mkIf cfg.enable rec {
|
||||
description = "Automatic connection to Tailscale";
|
||||
|
||||
# make sure tailscale is running before trying to connect to tailscale
|
||||
|
|
@ -72,6 +72,7 @@ in {
|
|||
# otherwise authenticate with tailscale
|
||||
${getExe tailscale} up ${advertiseExitNode} -authkey $(cat ${config.sops.secrets.tailscale-key.path})
|
||||
'';
|
||||
};*/
|
||||
};
|
||||
*/
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{ pkgs, inputs, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
|
|
@ -14,9 +18,11 @@
|
|||
'';
|
||||
|
||||
services.clipboard-sync.enable = true;
|
||||
/*services.displayManager.sddm = {
|
||||
/*
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
package = pkgs.kdePackages.sddm;
|
||||
wayland.enable = true;
|
||||
};*/
|
||||
};
|
||||
*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,3 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.types) submodule loaOf;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
hardware.graphics = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, inputs, ... }: {
|
||||
_: {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
openFirewall = true; # This is set true by default
|
||||
};
|
||||
|
||||
/*services.wivrn = {
|
||||
/*
|
||||
services.wivrn = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
package = pkgs.wivrn.override { cudaSupport = true; };
|
||||
|
|
@ -30,7 +31,8 @@
|
|||
#];
|
||||
};
|
||||
};
|
||||
};*/
|
||||
};
|
||||
*/
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wlx-overlay-s
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{ config, lib, ... }: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
in {
|
||||
gensokyo-zone = {
|
||||
|
|
@ -16,7 +20,8 @@ in {
|
|||
shared.enable = mkDefault true;
|
||||
#domain = mkIf config.gensokyo-zone.access.local.enable "local.${domain}";
|
||||
};
|
||||
/*krb5 = {
|
||||
/*
|
||||
krb5 = {
|
||||
enable = mkDefault true;
|
||||
sssd = {
|
||||
enable = mkDefault true;
|
||||
|
|
@ -27,7 +32,8 @@ in {
|
|||
nfs.enable = mkDefault true;
|
||||
#nfs.debug.enable = true;
|
||||
ipa.enable = mkDefault true;
|
||||
};*/
|
||||
};
|
||||
*/
|
||||
dns = {
|
||||
enable = mkDefault true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ in
|
|||
legacyPackages = pkgs;
|
||||
packages = set.merge [pkgs wrappers.packages];
|
||||
checks = checks // formatting.checks;
|
||||
formatter = formatting.formatter;
|
||||
inherit (formatting) formatter;
|
||||
}
|
||||
// systems
|
||||
// shells
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
inputs.neorg-overlay.overlays.default
|
||||
inputs.niri.overlays.niri
|
||||
(import tree.packages.default {inherit inputs tree;})
|
||||
(final: prev: {
|
||||
(_final: prev: {
|
||||
wivrn = prev.wivrn.override {cudaSupport = true;};
|
||||
})
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
{ lib, stdenv, fetchFromGitLab, glib, gettext, substituteAll, gnome-menus }:
|
||||
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
glib,
|
||||
gettext,
|
||||
substituteAll,
|
||||
gnome-menus,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnome-shell-extension-arcmenu";
|
||||
version = "63";
|
||||
|
|
@ -19,7 +26,8 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
buildInputs = [
|
||||
glib gettext
|
||||
glib
|
||||
gettext
|
||||
];
|
||||
|
||||
makeFlags = ["INSTALLBASE=${placeholder "out"}/share/gnome-shell/extensions"];
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
stdenvNoCC,
|
||||
fetchgit,
|
||||
openssh,
|
||||
findutils,
|
||||
...
|
||||
}:
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
cmake,
|
||||
setuptools,
|
||||
python,
|
||||
}: let
|
||||
cppyy = python.buildPythonPackage rec {
|
||||
|
|
@ -26,4 +22,5 @@
|
|||
license = licenses.bsd3Lbnl;
|
||||
};
|
||||
};
|
||||
in cppyy
|
||||
in
|
||||
cppyy
|
||||
|
|
|
|||
|
|
@ -18,9 +18,7 @@
|
|||
webkitgtk_4_1,
|
||||
cargo-tauri,
|
||||
desktop-file-utils,
|
||||
}:
|
||||
|
||||
let
|
||||
}: let
|
||||
webkitgtk_4_1' = webkitgtk_4_1.override {
|
||||
enableExperimental = true;
|
||||
};
|
||||
|
|
@ -35,7 +33,6 @@ let
|
|||
};
|
||||
};
|
||||
in
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "dorion";
|
||||
version = "6.7.1";
|
||||
|
|
@ -191,4 +188,3 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||
];
|
||||
};
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
extra-cmake-modules,
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@
|
|||
cachix,
|
||||
jq,
|
||||
nix,
|
||||
curl
|
||||
curl,
|
||||
}: let
|
||||
inherit (lib) makeBinPath;
|
||||
in writeShellScriptBin "nf-build-system" ''
|
||||
in
|
||||
writeShellScriptBin "nf-build-system" ''
|
||||
export PATH="$PATH:${lib.makeBinPath [
|
||||
git
|
||||
cachix
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@
|
|||
cachix,
|
||||
jq,
|
||||
nix,
|
||||
curl
|
||||
curl,
|
||||
}: let
|
||||
inherit (lib) makeBinPath;
|
||||
in writeShellScriptBin "nf-update" ''
|
||||
in
|
||||
writeShellScriptBin "nf-update" ''
|
||||
export PATH="$PATH:${lib.makeBinPath [
|
||||
git
|
||||
cachix
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ _: let
|
|||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.lists) singleton;
|
||||
inherit (lib.attrsets) nameValuePair listToAttrs;
|
||||
datasets = [
|
||||
"root"
|
||||
|
|
@ -16,7 +15,12 @@ _: let
|
|||
"home"
|
||||
"var"
|
||||
];
|
||||
datasetEntry = dataset: nameValuePair (if dataset == "root" then "/" else "/${dataset}") {
|
||||
datasetEntry = dataset:
|
||||
nameValuePair (
|
||||
if dataset == "root"
|
||||
then "/"
|
||||
else "/${dataset}"
|
||||
) {
|
||||
device = "zpool/${dataset}";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
|
|
@ -40,7 +44,8 @@ _: let
|
|||
};
|
||||
};
|
||||
in {
|
||||
imports = (with tree.nixos.profiles; [
|
||||
imports =
|
||||
(with tree.nixos.profiles; [
|
||||
graphical
|
||||
wireless
|
||||
gaming
|
||||
|
|
@ -48,7 +53,8 @@ _: let
|
|||
++ (with tree.nixos.environments; [
|
||||
#hyprland
|
||||
niri
|
||||
]) ++ (with inputs.nixos-hardware.outputs.nixosModules; [
|
||||
])
|
||||
++ (with inputs.nixos-hardware.outputs.nixosModules; [
|
||||
common-pc
|
||||
common-pc-ssd
|
||||
common-cpu-amd
|
||||
|
|
@ -138,7 +144,9 @@ _: let
|
|||
supportedFilesystems = ["ntfs" "zfs"];
|
||||
};
|
||||
|
||||
fileSystems = datasetEntries // {
|
||||
fileSystems =
|
||||
datasetEntries
|
||||
// {
|
||||
"/boot" = drives.boot.result;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ _: let
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.lists) singleton;
|
||||
inherit (lib.attrsets) nameValuePair listToAttrs;
|
||||
datasets = [
|
||||
"root"
|
||||
|
|
@ -15,7 +14,12 @@ _: let
|
|||
"home"
|
||||
"var"
|
||||
];
|
||||
datasetEntry = dataset: nameValuePair (if dataset == "root" then "/" else "/${dataset}") {
|
||||
datasetEntry = dataset:
|
||||
nameValuePair (
|
||||
if dataset == "root"
|
||||
then "/"
|
||||
else "/${dataset}"
|
||||
) {
|
||||
device = "zpool/${dataset}";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
|
|
@ -65,7 +69,9 @@ _: let
|
|||
niri
|
||||
]);
|
||||
|
||||
fileSystems = datasetEntries // {
|
||||
fileSystems =
|
||||
datasetEntries
|
||||
// {
|
||||
"/boot" = drives.boot.result;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
{ pkgs, ... }: {
|
||||
_: {
|
||||
projectRootFile = "flake.nix";
|
||||
programs = {
|
||||
alejandra.enable = true;
|
||||
deadnix.enable = true;
|
||||
statix.enable = true;
|
||||
terraform.enable = true;
|
||||
beautysh.enable = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue