nix fmt
This commit is contained in:
parent
fd8db4c006
commit
4b28b21068
4 changed files with 154 additions and 118 deletions
155
flake.nix
155
flake.nix
|
@ -96,92 +96,91 @@
|
|||
pkgs = import nixpkgs {
|
||||
config.allowUnfree = true;
|
||||
system = "x86_64-linux";
|
||||
overlays = [ inputs.niri.overlays.niri ]
|
||||
++ import ./overlay;
|
||||
overlays = [ inputs.niri.overlays.niri ] ++ import ./overlay;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations =
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
{
|
||||
ytnix = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs = { inherit pkgs; };
|
||||
}
|
||||
./hosts/ytnix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./modules
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
inputs.niri.nixosModules.niri
|
||||
];
|
||||
};
|
||||
chunk = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs = { inherit pkgs; };
|
||||
disabledModules = [
|
||||
"services/web-servers/garage.nix"
|
||||
];
|
||||
}
|
||||
./hosts/chunk
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./modules
|
||||
(inputs.nixpkgs-garage + "/nixos/modules/services/web-servers/garage.nix")
|
||||
];
|
||||
};
|
||||
nixosConfigurations =
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
{
|
||||
ytnix = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs = { inherit pkgs; };
|
||||
}
|
||||
./hosts/ytnix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./modules
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
inputs.niri.nixosModules.niri
|
||||
];
|
||||
};
|
||||
chunk = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs = { inherit pkgs; };
|
||||
disabledModules = [
|
||||
"services/web-servers/garage.nix"
|
||||
];
|
||||
}
|
||||
./hosts/chunk
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./modules
|
||||
(inputs.nixpkgs-garage + "/nixos/modules/services/web-servers/garage.nix")
|
||||
];
|
||||
};
|
||||
|
||||
titan = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs = { inherit pkgs; };
|
||||
}
|
||||
./hosts/titan
|
||||
disko.nixosModules.disko
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./modules
|
||||
];
|
||||
};
|
||||
};
|
||||
homeConfigurations =
|
||||
let
|
||||
lib = home-manager.lib;
|
||||
in
|
||||
{
|
||||
"yt@ytnix" = lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home/yt/ytnix.nix
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
inputs.niri.homeModules.config
|
||||
];
|
||||
titan = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs = { inherit pkgs; };
|
||||
}
|
||||
./hosts/titan
|
||||
disko.nixosModules.disko
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./modules
|
||||
];
|
||||
};
|
||||
};
|
||||
homeConfigurations =
|
||||
let
|
||||
lib = home-manager.lib;
|
||||
in
|
||||
{
|
||||
"yt@ytnix" = lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home/yt/ytnix.nix
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
inputs.niri.homeModules.config
|
||||
];
|
||||
};
|
||||
|
||||
"yt@chunk" = lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home/yt/chunk.nix
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
"yt@chunk" = lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home/yt/chunk.nix
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
|
||||
"codespace@codespace" = lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home/yt/codespace.nix
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
"codespace@codespace" = lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home/yt/codespace.nix
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
101
home/niri.nix
101
home/niri.nix
|
@ -1,43 +1,72 @@
|
|||
{ config, ...}:
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.niri.settings = {
|
||||
prefer-no-csd = true;
|
||||
input.keyboard.xkb.options = "ctrl:nocaps";
|
||||
spawn-at-startup = [
|
||||
{ command = [ "waybar" ]; }
|
||||
];
|
||||
};
|
||||
|
||||
programs.niri.settings.binds = with config.lib.niri.actions; {
|
||||
"Mod+Return".action = spawn "foot";
|
||||
"Mod+D".action = spawn "fuzzel";
|
||||
programs.niri.settings.binds =
|
||||
with config.lib.niri.actions;
|
||||
let
|
||||
terminal = "foot";
|
||||
menu = "fuzzel";
|
||||
browser = "librewolf";
|
||||
file-manager = "thunar";
|
||||
in
|
||||
{
|
||||
"Mod+Return".action = spawn terminal;
|
||||
"Mod+D".action = spawn menu;
|
||||
|
||||
"Mod+Shift+E".action = quit;
|
||||
"Mod+Equal".action = set-column-width "+10%";
|
||||
"Mod+Minus".action = set-column-width "-10%";
|
||||
"Mod+Shift+Equal".action = set-window-height "+10%";
|
||||
"Mod+Shift+Minus".action = set-window-height "-10%";
|
||||
"Mod+1".action = focus-workspace 1;
|
||||
"Super+Alt+L".action = spawn "swaylock";
|
||||
"Mod+Ctrl+Q".action = close-window;
|
||||
"Mod+H".action = focus-column-left;
|
||||
"Mod+L".action = focus-column-right;
|
||||
"Mod+K".action = focus-window-up;
|
||||
"Mod+J".action = focus-window-down;
|
||||
"Mod+Shift+H".action = move-column-left;
|
||||
"Mod+Shift+L".action = move-column-right;
|
||||
"Mod+Shift+K".action = move-window-up;
|
||||
"Mod+Shift+J".action = move-window-down;
|
||||
"Mod+U".action = focus-workspace-up;
|
||||
"Mod+I".action = focus-workspace-down;
|
||||
"Mod+Shift+U".action = move-workspace-up;
|
||||
"Mod+Shift+I".action = move-workspace-down;
|
||||
"Mod+W".action = maximize-column;
|
||||
"Mod+C".action = center-column;
|
||||
"Mod+Shift+Space".action = toggle-window-floating;
|
||||
"Mod+Space".action = switch-focus-between-floating-and-tiling;
|
||||
"Print".action = screenshot;
|
||||
"Alt+Print".action = screenshot-window;
|
||||
"Ctrl+Print".action = screenshot-screen;
|
||||
"Mod+R".action = switch-preset-column-width;
|
||||
"Mod+Shift+R".action = switch-preset-window-height;
|
||||
"Mod+Ctrl+R".action = reset-window-height;
|
||||
"Mod+F".action = fullscreen-window;
|
||||
};
|
||||
"Mod+Shift+E".action = quit;
|
||||
"Mod+Equal".action = set-column-width "+10%";
|
||||
"Mod+Minus".action = set-column-width "-10%";
|
||||
"Mod+Shift+Equal".action = set-window-height "+10%";
|
||||
"Mod+Shift+Minus".action = set-window-height "-10%";
|
||||
"Super+Alt+L".action = spawn "swaylock";
|
||||
"Mod+Ctrl+Q".action = close-window;
|
||||
"Mod+H".action = focus-column-left;
|
||||
"Mod+L".action = focus-column-right;
|
||||
"Mod+K".action = focus-window-up;
|
||||
"Mod+J".action = focus-window-down;
|
||||
"Mod+Shift+H".action = move-column-left;
|
||||
"Mod+Shift+L".action = move-column-right;
|
||||
"Mod+Shift+K".action = move-window-up;
|
||||
"Mod+Shift+J".action = move-window-down;
|
||||
"Mod+U".action = focus-workspace-up;
|
||||
"Mod+I".action = focus-workspace-down;
|
||||
"Mod+Shift+U".action = move-workspace-up;
|
||||
"Mod+Shift+I".action = move-workspace-down;
|
||||
"Mod+W".action = maximize-column;
|
||||
"Mod+C".action = center-column;
|
||||
"Mod+Shift+Space".action = toggle-window-floating;
|
||||
"Mod+Space".action = switch-focus-between-floating-and-tiling;
|
||||
"Print".action = screenshot;
|
||||
"Alt+Print".action = screenshot-window;
|
||||
"Ctrl+Print".action = screenshot-screen;
|
||||
"Mod+R".action = switch-preset-column-width;
|
||||
"Mod+Shift+R".action = switch-preset-window-height;
|
||||
"Mod+Ctrl+R".action = reset-window-height;
|
||||
"Mod+F".action = fullscreen-window;
|
||||
|
||||
"XF86AudioRaiseVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+";
|
||||
"XF86AudioLowerVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-";
|
||||
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86MonBrightnessUp".action = sh "brightnessctl set 10%+";
|
||||
"XF86MonBrightnessDown".action = sh "brightnessctl set 10%-";
|
||||
|
||||
"Mod+1".action = focus-workspace 1;
|
||||
"Mod+2".action = focus-workspace 2;
|
||||
"Mod+3".action = focus-workspace 3;
|
||||
"Mod+4".action = focus-workspace 4;
|
||||
"Mod+5".action = focus-workspace 5;
|
||||
|
||||
"Mod+Alt+B".action = spawn browser;
|
||||
"Mod+Alt+A".action = spawn "anki";
|
||||
"Mod+Alt+F".action = spawn file-manager;
|
||||
"Mod+Alt+E".action = spawn "evolution";
|
||||
"Mod+P".action = spawn "bitwarden";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -150,7 +150,10 @@
|
|||
nil_ls = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatting.command = [ "nix" "fmt" ];
|
||||
formatting.command = [
|
||||
"nix"
|
||||
"fmt"
|
||||
];
|
||||
nix.flake.autoArchive = true;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.niri;
|
||||
in
|
||||
|
|
Loading…
Add table
Reference in a new issue