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 {
|
pkgs = import nixpkgs {
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
overlays = [ inputs.niri.overlays.niri ]
|
overlays = [ inputs.niri.overlays.niri ] ++ import ./overlay;
|
||||||
++ import ./overlay;
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
let
|
let
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
ytnix = lib.nixosSystem {
|
ytnix = lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nixpkgs = { inherit pkgs; };
|
nixpkgs = { inherit pkgs; };
|
||||||
}
|
}
|
||||||
./hosts/ytnix
|
./hosts/ytnix
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
./modules
|
./modules
|
||||||
inputs.lanzaboote.nixosModules.lanzaboote
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
inputs.niri.nixosModules.niri
|
inputs.niri.nixosModules.niri
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
chunk = lib.nixosSystem {
|
chunk = lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nixpkgs = { inherit pkgs; };
|
nixpkgs = { inherit pkgs; };
|
||||||
disabledModules = [
|
disabledModules = [
|
||||||
"services/web-servers/garage.nix"
|
"services/web-servers/garage.nix"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
./hosts/chunk
|
./hosts/chunk
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
./modules
|
./modules
|
||||||
(inputs.nixpkgs-garage + "/nixos/modules/services/web-servers/garage.nix")
|
(inputs.nixpkgs-garage + "/nixos/modules/services/web-servers/garage.nix")
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
titan = lib.nixosSystem {
|
titan = lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nixpkgs = { inherit pkgs; };
|
nixpkgs = { inherit pkgs; };
|
||||||
}
|
}
|
||||||
./hosts/titan
|
./hosts/titan
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
./modules
|
./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
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
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 {
|
"yt@chunk" = lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./home/yt/chunk.nix
|
./home/yt/chunk.nix
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
"codespace@codespace" = lib.homeManagerConfiguration {
|
"codespace@codespace" = lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./home/yt/codespace.nix
|
./home/yt/codespace.nix
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
];
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
105
home/niri.nix
105
home/niri.nix
|
@ -1,43 +1,72 @@
|
||||||
{ config, ...}:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
programs.niri.settings = {
|
programs.niri.settings = {
|
||||||
prefer-no-csd = true;
|
prefer-no-csd = true;
|
||||||
|
input.keyboard.xkb.options = "ctrl:nocaps";
|
||||||
|
spawn-at-startup = [
|
||||||
|
{ command = [ "waybar" ]; }
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.niri.settings.binds = with config.lib.niri.actions; {
|
programs.niri.settings.binds =
|
||||||
"Mod+Return".action = spawn "foot";
|
with config.lib.niri.actions;
|
||||||
"Mod+D".action = spawn "fuzzel";
|
let
|
||||||
|
terminal = "foot";
|
||||||
"Mod+Shift+E".action = quit;
|
menu = "fuzzel";
|
||||||
"Mod+Equal".action = set-column-width "+10%";
|
browser = "librewolf";
|
||||||
"Mod+Minus".action = set-column-width "-10%";
|
file-manager = "thunar";
|
||||||
"Mod+Shift+Equal".action = set-window-height "+10%";
|
in
|
||||||
"Mod+Shift+Minus".action = set-window-height "-10%";
|
{
|
||||||
"Mod+1".action = focus-workspace 1;
|
"Mod+Return".action = spawn terminal;
|
||||||
"Super+Alt+L".action = spawn "swaylock";
|
"Mod+D".action = spawn menu;
|
||||||
"Mod+Ctrl+Q".action = close-window;
|
|
||||||
"Mod+H".action = focus-column-left;
|
"Mod+Shift+E".action = quit;
|
||||||
"Mod+L".action = focus-column-right;
|
"Mod+Equal".action = set-column-width "+10%";
|
||||||
"Mod+K".action = focus-window-up;
|
"Mod+Minus".action = set-column-width "-10%";
|
||||||
"Mod+J".action = focus-window-down;
|
"Mod+Shift+Equal".action = set-window-height "+10%";
|
||||||
"Mod+Shift+H".action = move-column-left;
|
"Mod+Shift+Minus".action = set-window-height "-10%";
|
||||||
"Mod+Shift+L".action = move-column-right;
|
"Super+Alt+L".action = spawn "swaylock";
|
||||||
"Mod+Shift+K".action = move-window-up;
|
"Mod+Ctrl+Q".action = close-window;
|
||||||
"Mod+Shift+J".action = move-window-down;
|
"Mod+H".action = focus-column-left;
|
||||||
"Mod+U".action = focus-workspace-up;
|
"Mod+L".action = focus-column-right;
|
||||||
"Mod+I".action = focus-workspace-down;
|
"Mod+K".action = focus-window-up;
|
||||||
"Mod+Shift+U".action = move-workspace-up;
|
"Mod+J".action = focus-window-down;
|
||||||
"Mod+Shift+I".action = move-workspace-down;
|
"Mod+Shift+H".action = move-column-left;
|
||||||
"Mod+W".action = maximize-column;
|
"Mod+Shift+L".action = move-column-right;
|
||||||
"Mod+C".action = center-column;
|
"Mod+Shift+K".action = move-window-up;
|
||||||
"Mod+Shift+Space".action = toggle-window-floating;
|
"Mod+Shift+J".action = move-window-down;
|
||||||
"Mod+Space".action = switch-focus-between-floating-and-tiling;
|
"Mod+U".action = focus-workspace-up;
|
||||||
"Print".action = screenshot;
|
"Mod+I".action = focus-workspace-down;
|
||||||
"Alt+Print".action = screenshot-window;
|
"Mod+Shift+U".action = move-workspace-up;
|
||||||
"Ctrl+Print".action = screenshot-screen;
|
"Mod+Shift+I".action = move-workspace-down;
|
||||||
"Mod+R".action = switch-preset-column-width;
|
"Mod+W".action = maximize-column;
|
||||||
"Mod+Shift+R".action = switch-preset-window-height;
|
"Mod+C".action = center-column;
|
||||||
"Mod+Ctrl+R".action = reset-window-height;
|
"Mod+Shift+Space".action = toggle-window-floating;
|
||||||
"Mod+F".action = fullscreen-window;
|
"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 = {
|
nil_ls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
formatting.command = [ "nix" "fmt" ];
|
formatting.command = [
|
||||||
|
"nix"
|
||||||
|
"fmt"
|
||||||
|
];
|
||||||
nix.flake.autoArchive = true;
|
nix.flake.autoArchive = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.my.niri;
|
cfg = config.my.niri;
|
||||||
in
|
in
|
||||||
|
|
Loading…
Add table
Reference in a new issue