fix flake on non-x86_64-linux

This commit is contained in:
Mars 2024-07-28 03:29:11 -04:00
parent eb2692dff9
commit e4c20f0163
Signed by: pupbrained
GPG key ID: 874E22DF2F9DFCB5
3 changed files with 47 additions and 39 deletions

View file

@ -39,29 +39,13 @@
};
outputs = {...} @ inputs:
with inputs; let
pkgs = import nixpkgs {inherit system;};
system = "x86_64-linux";
in
with inputs;
snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
formatter.${system} = treefmt-nix.lib.mkWrapper pkgs {
projectRootFile = "flake.nix";
programs = {
alejandra.enable = true;
deadnix.enable = true;
};
};
overlays = [
snowfall-flake.overlays.default
(_final: _prev: {
nixSuper = nix-super.packages.${system}.default;
})
];
channels-config = {
@ -80,16 +64,35 @@
impermanence.nixosModules.impermanence
];
devShells.${system}.default = with pkgs;
mkShellNoCC {
packages = [
alejandra
git
nvfetcher
statix
(writeScriptBin "build" "nix fmt && nh os switch . -- --impure")
(writeScriptBin "up" "nix flake update")
];
outputs-builder = channels: {
overlays = [
(_final: _prev: {
nixSuper = nix-super.packages.default;
})
];
formatter = treefmt-nix.lib.mkWrapper channels.nixpkgs {
projectRootFile = "flake.nix";
programs = {
alejandra.enable = true;
deadnix.enable = true;
stylua.enable = true;
taplo.enable = true;
};
};
devShells.default = with channels.nixpkgs;
mkShellNoCC {
packages = [
alejandra
git
nvfetcher
statix
(writeScriptBin "build" "nix fmt && nh os switch . -- --impure")
(writeScriptBin "up" "nix flake update")
];
};
};
};
}

View file

@ -1,11 +1,11 @@
local c = wezterm.config_builder()
wezterm.on('user-var-changed', function(window, pane, name, value)
local overrides = window:get_config_overrides() or {}
if name == "ZEN_MODE" then
local incremental = value:find("+")
if name == 'ZEN_MODE' then
local incremental = value:find('+')
local number_value = tonumber(value)
if incremental ~= nil then
while (number_value > 0) do
while number_value > 0 do
window:perform_action(wezterm.action.IncreaseFontSize, pane)
number_value = number_value - 1
end
@ -22,13 +22,13 @@ wezterm.on('user-var-changed', function(window, pane, name, value)
window:set_config_overrides(overrides)
end)
wezterm.on('format-window-title', function(tab, pane, tabs, panes, config)
local zoomed = ""
local zoomed = ''
if tab.active_pane.is_zoomed then
zoomed = '[Z] '
end
local index = ""
local index = ''
if #tabs > 1 then
index = string.format('[%d/%d] ', tab.tab_index + 1, #tabs)
@ -60,8 +60,8 @@ wezterm.plugin.require('https://github.com/nekowinston/wezterm-bar').apply_to_co
numerals = 'arabic',
pane_count = 'subscript',
brackets = {
active = { "", ':' },
inactive = { "", ':' },
active = { '', ':' },
inactive = { '', ':' },
},
},
clock = {
@ -86,23 +86,23 @@ local keybinds = {
{
key = 'l',
mods = 'CTRL|SHIFT',
action = act.ActivatePaneDirection 'Right',
action = act.ActivatePaneDirection('Right'),
},
{
key = 'k',
mods = 'CTRL|SHIFT',
action = act.ActivatePaneDirection 'Up',
action = act.ActivatePaneDirection('Up'),
},
{
key = 'j',
mods = 'CTRL|SHIFT',
action = act.ActivatePaneDirection 'Down',
action = act.ActivatePaneDirection('Down'),
},
{
key = 't',
mods = 'CTRL|SHIFT',
action = act.SpawnCommandInNewTab { cwd = wezterm.home_dir },
}
action = act.SpawnCommandInNewTab({ cwd = wezterm.home_dir }),
},
}
local config = {

5
stylua.toml Normal file
View file

@ -0,0 +1,5 @@
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferSingle"
call_parentheses = "Always"