Compare commits
2 commits
f2f8c204ee
...
4b28b21068
Author | SHA1 | Date | |
---|---|---|---|
4b28b21068 | |||
fd8db4c006 |
8 changed files with 293 additions and 75 deletions
108
flake.lock
generated
108
flake.lock
generated
|
@ -355,6 +355,64 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"niri": {
|
||||||
|
"inputs": {
|
||||||
|
"niri-stable": "niri-stable",
|
||||||
|
"niri-unstable": "niri-unstable",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
|
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
||||||
|
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737231928,
|
||||||
|
"narHash": "sha256-eOvFTgpFGP8hy6r3O8Ae5jOGc483l4BszwQsPcccbbs=",
|
||||||
|
"owner": "sodiboo",
|
||||||
|
"repo": "niri-flake",
|
||||||
|
"rev": "ca748d585a271a512807cd60e5353a9ddb4d1dee",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "sodiboo",
|
||||||
|
"repo": "niri-flake",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"niri-stable": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1736614405,
|
||||||
|
"narHash": "sha256-AJ1rlgNOPb3/+DbS5hkhm21t6Oz8IgqLllwmZt0lyzk=",
|
||||||
|
"owner": "YaLTeR",
|
||||||
|
"repo": "niri",
|
||||||
|
"rev": "e05bc269e678ecf828b96ae79c991c13b00b38a5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "YaLTeR",
|
||||||
|
"ref": "v25.01",
|
||||||
|
"repo": "niri",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"niri-unstable": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737211438,
|
||||||
|
"narHash": "sha256-XPcV2rV7Vy7lLeZMhTOwd0t/sRwNquXI7CH7+3Aftt0=",
|
||||||
|
"owner": "YaLTeR",
|
||||||
|
"repo": "niri",
|
||||||
|
"rev": "818248457210f5101459ea7d7066d12c456c8a97",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "YaLTeR",
|
||||||
|
"repo": "niri",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-darwin": {
|
"nix-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -436,6 +494,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-stable_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737165118,
|
||||||
|
"narHash": "sha256-s40Kk/OulP3J/1JvC3VT16U4r/Xw6Qdi7SRw3LYkPWs=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "6a3ae7a5a12fb8cac2d59d7df7cbd95f9b2f0566",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixvim": {
|
"nixvim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"devshell": "devshell",
|
"devshell": "devshell",
|
||||||
|
@ -520,6 +594,7 @@
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"lanzaboote": "lanzaboote",
|
"lanzaboote": "lanzaboote",
|
||||||
|
"niri": "niri",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-garage": "nixpkgs-garage",
|
"nixpkgs-garage": "nixpkgs-garage",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
|
@ -642,6 +717,39 @@
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"xwayland-satellite-stable": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730166465,
|
||||||
|
"narHash": "sha256-nq7bouXQXaaPPo/E+Jbq+wNHnatD4dY8OxSrRqzvy6s=",
|
||||||
|
"owner": "Supreeeme",
|
||||||
|
"repo": "xwayland-satellite",
|
||||||
|
"rev": "a713cf46cb7db84a0d1b57c3a397c610cad3cf98",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Supreeeme",
|
||||||
|
"ref": "v0.5",
|
||||||
|
"repo": "xwayland-satellite",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xwayland-satellite-unstable": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1736487362,
|
||||||
|
"narHash": "sha256-4kGoOA7FgK9N2mzS+TFEn41kUUNY6KwdiA/0rqlr868=",
|
||||||
|
"owner": "Supreeeme",
|
||||||
|
"repo": "xwayland-satellite",
|
||||||
|
"rev": "8f55e27f63a749881c4bbfbb6b1da028342a91d1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Supreeeme",
|
||||||
|
"repo": "xwayland-satellite",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
155
flake.nix
155
flake.nix
|
@ -28,6 +28,8 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
niri.url = "github:sodiboo/niri-flake";
|
||||||
|
niri.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR
|
nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR
|
||||||
};
|
};
|
||||||
|
@ -35,9 +37,11 @@
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
"https://cache.cything.io/central"
|
"https://cache.cything.io/central"
|
||||||
|
"https://niri.cachix.org"
|
||||||
];
|
];
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
"central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg="
|
"central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg="
|
||||||
|
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||||
];
|
];
|
||||||
builders-use-substitutes = true;
|
builders-use-substitutes = true;
|
||||||
};
|
};
|
||||||
|
@ -92,88 +96,91 @@
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
overlays = import ./overlay;
|
overlays = [ inputs.niri.overlays.niri ] ++ import ./overlay;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
let
|
let
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
ytnix = lib.nixosSystem {
|
ytnix = lib.nixosSystem {
|
||||||
modules = [
|
specialArgs = { inherit inputs; };
|
||||||
{
|
modules = [
|
||||||
nixpkgs = { inherit pkgs; };
|
{
|
||||||
}
|
nixpkgs = { inherit pkgs; };
|
||||||
./hosts/ytnix
|
}
|
||||||
inputs.sops-nix.nixosModules.sops
|
./hosts/ytnix
|
||||||
./modules
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.lanzaboote.nixosModules.lanzaboote
|
./modules
|
||||||
];
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
};
|
inputs.niri.nixosModules.niri
|
||||||
chunk = lib.nixosSystem {
|
];
|
||||||
specialArgs = { inherit inputs; };
|
};
|
||||||
modules = [
|
chunk = lib.nixosSystem {
|
||||||
{
|
specialArgs = { inherit inputs; };
|
||||||
nixpkgs = { inherit pkgs; };
|
modules = [
|
||||||
disabledModules = [
|
{
|
||||||
"services/web-servers/garage.nix"
|
nixpkgs = { inherit pkgs; };
|
||||||
];
|
disabledModules = [
|
||||||
}
|
"services/web-servers/garage.nix"
|
||||||
./hosts/chunk
|
];
|
||||||
inputs.sops-nix.nixosModules.sops
|
}
|
||||||
./modules
|
./hosts/chunk
|
||||||
(inputs.nixpkgs-garage + "/nixos/modules/services/web-servers/garage.nix")
|
inputs.sops-nix.nixosModules.sops
|
||||||
];
|
./modules
|
||||||
};
|
(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
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
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
|
||||||
];
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
72
home/niri.nix
Normal file
72
home/niri.nix
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
{ 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;
|
||||||
|
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%";
|
||||||
|
"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 = {
|
nil_ls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
formatting.command = [ "nix" "fmt" ];
|
formatting.command = [
|
||||||
|
"nix"
|
||||||
|
"fmt"
|
||||||
|
];
|
||||||
nix.flake.autoArchive = true;
|
nix.flake.autoArchive = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./common.nix
|
./common.nix
|
||||||
../foot.nix
|
../foot.nix
|
||||||
|
../niri.nix
|
||||||
];
|
];
|
||||||
home = {
|
home = {
|
||||||
username = "yt";
|
username = "yt";
|
||||||
|
@ -99,6 +100,7 @@
|
||||||
clang
|
clang
|
||||||
seahorse
|
seahorse
|
||||||
github-cli
|
github-cli
|
||||||
|
fuzzel
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.waybar.enable = true;
|
programs.waybar.enable = true;
|
||||||
|
|
|
@ -315,4 +315,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services.trezord.enable = true;
|
services.trezord.enable = true;
|
||||||
|
|
||||||
|
my.niri = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.niri-unstable;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./backup.nix
|
./backup.nix
|
||||||
|
./niri.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
20
modules/niri.nix
Normal file
20
modules/niri.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.my.niri;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.niri = {
|
||||||
|
enable = lib.mkEnableOption "niri";
|
||||||
|
package = lib.mkPackageOption pkgs "niri" { };
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.niri.package = cfg.package;
|
||||||
|
programs.niri.enable = true;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue