Compare commits

4 Commits
main ... niri

7 changed files with 371 additions and 16 deletions

View File

@@ -22,7 +22,6 @@
enable = true; enable = true;
xdgOpenUsePortal = true; xdgOpenUsePortal = true;
extraPortals = [ extraPortals = [
pkgs.xdg-desktop-portal-wlr
pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gtk
]; ];
}; };

141
features/niri.nix Normal file
View File

@@ -0,0 +1,141 @@
{
nixos =
{ pkgs, inputs, ... }:
{
imports = [ inputs.niri.nixosModules.niri ];
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
programs.niri.enable = true;
environment.systemPackages = with pkgs; [
swayidle
grim
slurp
wl-clipboard
brightnessctl
playerctl
pamixer
pulseaudio
cliphist
satty
wlsunset
wayland-pipewire-idle-inhibit
foot
jq
zenity
];
};
home =
{ inputs, ... }:
{
imports = [ inputs.noctalia.homeModules.default ];
programs.noctalia-shell = {
enable = true;
systemd.enable = true;
settings = {
colorSchemes.predefinedScheme = "gruvbox";
};
};
programs.niri.settings = {
environment = {
NIXOS_OZONE_WL = "1";
_JAVA_AWT_WM_NONREPARENTING = "1";
};
spawn-at-startup = [
{ argv = [ "swayidle" "-w" ]; }
{ argv = [ "wlsunset" ]; }
{ argv = [ "wl-paste" "--watch" "cliphist" "store" ]; }
];
input.keyboard.xkb = { };
binds = {
# apps
"Mod+Return".action.spawn = "ghostty";
"Mod+Space".action.spawn = [ "sh" "-c" "qs -c noctalia-shell ipc call launcher toggle" ];
"Mod+S".action.spawn = [ "sh" "-c" "qs -c noctalia-shell ipc call controlcenter toggle" ];
# window management
"Mod+Shift+Q".action.close-window = [ ];
"Mod+H".action.focus-column-left = [ ];
"Mod+J".action.focus-window-down = [ ];
"Mod+K".action.focus-window-up = [ ];
"Mod+L".action.focus-column-right = [ ];
"Mod+Shift+H".action.move-column-left = [ ];
"Mod+Shift+J".action.move-window-down = [ ];
"Mod+Shift+K".action.move-window-up = [ ];
"Mod+Shift+L".action.move-column-right = [ ];
"Mod+F".action.maximize-column = [ ];
"Mod+Shift+F".action.fullscreen-window = [ ];
# workspaces
"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+6".action.focus-workspace = 6;
"Mod+7".action.focus-workspace = 7;
"Mod+8".action.focus-workspace = 8;
"Mod+9".action.focus-workspace = 9;
"Mod+0".action.focus-workspace = 10;
"Mod+Shift+1".action.move-window-to-workspace = 1;
"Mod+Shift+2".action.move-window-to-workspace = 2;
"Mod+Shift+3".action.move-window-to-workspace = 3;
"Mod+Shift+4".action.move-window-to-workspace = 4;
"Mod+Shift+5".action.move-window-to-workspace = 5;
"Mod+Shift+6".action.move-window-to-workspace = 6;
"Mod+Shift+7".action.move-window-to-workspace = 7;
"Mod+Shift+8".action.move-window-to-workspace = 8;
"Mod+Shift+9".action.move-window-to-workspace = 9;
"Mod+Shift+0".action.move-window-to-workspace = 10;
# media (allow-when-locked for use on lock screen)
"XF86AudioRaiseVolume" = {
action.spawn = [ "pamixer" "-i" "5" ];
allow-when-locked = true;
};
"XF86AudioLowerVolume" = {
action.spawn = [ "pamixer" "-d" "5" ];
allow-when-locked = true;
};
"XF86AudioMute" = {
action.spawn = [ "pamixer" "-t" ];
allow-when-locked = true;
};
"XF86MonBrightnessUp" = {
action.spawn = [ "brightnessctl" "set" "+5%" ];
allow-when-locked = true;
};
"XF86MonBrightnessDown" = {
action.spawn = [ "brightnessctl" "set" "5%-" ];
allow-when-locked = true;
};
"XF86AudioPlay" = {
action.spawn = [ "playerctl" "play-pause" ];
allow-when-locked = true;
};
"XF86AudioNext" = {
action.spawn = [ "playerctl" "next" ];
allow-when-locked = true;
};
"XF86AudioPrev" = {
action.spawn = [ "playerctl" "previous" ];
allow-when-locked = true;
};
# screenshot
"Print".action.screenshot = { };
"Shift+Print".action.screenshot-screen = { };
# session
"Mod+Shift+E".action.quit = { };
"Mod+Shift+P".action.power-off-monitors = [ ];
};
};
};
}

View File

@@ -12,6 +12,8 @@
''; '';
}; };
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
waybar waybar
mako mako

228
flake.lock generated
View File

@@ -273,11 +273,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775360939, "lastModified": 1775320414,
"narHash": "sha256-XUBlSgUFdvTh6+K5LcI5mJu5F5L8scmJDMRiZM484TM=", "narHash": "sha256-pIDPHus8udcxO4lT+zUULBfvue2D08E73abzVEJNE+8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "2097a5c82bdc099c6135eae4b111b78124604554", "rev": "5ee3b3ef63e469c84639c2c9e282726352c86069",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -346,6 +346,62 @@
"type": "github" "type": "github"
} }
}, },
"niri": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1775089852,
"narHash": "sha256-zcX3hf2cTOQ06kRP+FCYbuaWhy+FLruLFp+D79Enjo4=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "cfa91d98691d91cc604ab8f4e224819524c496ad",
"type": "github"
},
"original": {
"owner": "sodiboo",
"repo": "niri-flake",
"type": "github"
}
},
"niri-stable": {
"flake": false,
"locked": {
"lastModified": 1756556321,
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"ref": "v25.08",
"repo": "niri",
"type": "github"
}
},
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1774616418,
"narHash": "sha256-z+dLkAS4bqytIlOI4h2MnjBJrSP4d1Awx0n+IV5YA3Y=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "8f48f56fe19918b5cfa02e5d68a47ebaf7bf3dee",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1775203647, "lastModified": 1775203647,
@@ -395,11 +451,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1775384062, "lastModified": 1775331405,
"narHash": "sha256-2N+UjyXNM2gYn6Z0orJUzUJAz/ipK74pycTxGMCx3ss=", "narHash": "sha256-S3MglA43hvGCKybF9qlhMr7wSwrpI5rlWhPz3nhj68Y=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "eae07e1ee2611bdaf1d30644436b7f470cc6591b", "rev": "0ea469d0e38c16acf20acd24ce8285f005441c42",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -425,6 +481,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1775002709,
"narHash": "sha256-d3Yx83vSrN+2z/loBh4mJpyRqr9aAJqlke4TkpFmRJA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bcd464ccd2a1a7cd09aa2f8d4ffba83b761b1d0e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1775036866, "lastModified": 1775036866,
@@ -441,6 +513,66 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": {
"locked": {
"lastModified": 1775036866,
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"noctalia": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"noctalia-qs": "noctalia-qs"
},
"locked": {
"lastModified": 1775330311,
"narHash": "sha256-/Ig/jRYPj/MY+aEgE344UTd3xGyPRTbigVAYE41Njis=",
"owner": "noctalia-dev",
"repo": "noctalia-shell",
"rev": "f02ecc9acd4bb53b5c035159176deb5a1b18e2c5",
"type": "github"
},
"original": {
"owner": "noctalia-dev",
"repo": "noctalia-shell",
"type": "github"
}
},
"noctalia-qs": {
"inputs": {
"nixpkgs": [
"noctalia",
"nixpkgs"
],
"systems": "systems",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1775135550,
"narHash": "sha256-79JP2QTdvp1jg7HGxAW+xzhzhLnlKUi8yGXq9nDCeH0=",
"owner": "noctalia-dev",
"repo": "noctalia-qs",
"rev": "e7224b756dcd10eec040df818a4c7a0fda5d6eff",
"type": "github"
},
"original": {
"owner": "noctalia-dev",
"repo": "noctalia-qs",
"type": "github"
}
},
"nur": { "nur": {
"inputs": { "inputs": {
"flake-parts": [ "flake-parts": [
@@ -513,10 +645,12 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"niri": "niri",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"nixpkgs-master": "nixpkgs-master", "nixpkgs-master": "nixpkgs-master",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable_2",
"noctalia": "noctalia",
"nvim": "nvim", "nvim": "nvim",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix" "stylix": "stylix"
@@ -550,11 +684,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775365543, "lastModified": 1775188331,
"narHash": "sha256-f50qrK0WwZ9z5EdaMGWOTtALgSF7yb7XwuE7LjCuDmw=", "narHash": "sha256-/0BoSi0Dg0ON7IW0oscM12WSPBaMSCn36XTt0lHZoy8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "a4ee2de76efb759fe8d4868c33dec9937897916f", "rev": "8f093d0d2f08f37317778bd94db5951d6cce6c46",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -576,7 +710,7 @@
"nixpkgs" "nixpkgs"
], ],
"nur": "nur", "nur": "nur",
"systems": "systems", "systems": "systems_2",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux", "tinted-tmux": "tinted-tmux",
@@ -597,6 +731,21 @@
} }
}, },
"systems": { "systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -674,6 +823,61 @@
"repo": "base16-zed", "repo": "base16-zed",
"type": "github" "type": "github"
} }
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"noctalia",
"noctalia-qs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1773297127,
"narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "71b125cd05fbfd78cab3e070b73544abe24c5016",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {
"lastModified": 1755491097,
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"ref": "v0.7",
"repo": "xwayland-satellite",
"type": "github"
}
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1773622265,
"narHash": "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "a879e5e0896a326adc79c474bf457b8b99011027",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@@ -47,6 +47,13 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
niri.url = "github:sodiboo/niri-flake";
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =

View File

@@ -21,6 +21,7 @@ in
"shell" "shell"
"desktop" "desktop"
"sway" "sway"
"niri"
"greeter" "greeter"
"printing" "printing"
"networkmanager" "networkmanager"
@@ -47,6 +48,7 @@ in
"shell" "shell"
"desktop" "desktop"
"sway" "sway"
"niri"
"greeter" "greeter"
"printing" "printing"
"networkmanager" "networkmanager"

View File

@@ -30,9 +30,9 @@
IdleActionSec = "15min"; IdleActionSec = "15min";
}; };
systemd.sleep.settings.Sleep = { systemd.sleep.extraConfig = ''
HibernateDelaySec = "30min"; HibernateDelaySec=30min
}; '';
programs.nix-ld.libraries = options.programs.nix-ld.libraries.default; programs.nix-ld.libraries = options.programs.nix-ld.libraries.default;