repo: add niri hm config, theme nixos instead of hm, add regreet/greetd config

This commit is contained in:
Anthony Rodriguez 2024-10-02 16:45:43 +02:00
parent f7c4be7334
commit 9acd24afd4
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
9 changed files with 84 additions and 41 deletions

View file

@ -5,7 +5,6 @@
}: {
imports = [
./terminal
self.nixosModules.theme
];
home = {
username = "nezia";
@ -14,7 +13,4 @@
};
programs.home-manager.enable = true;
theme.wallpaper = lib.mkDefault ../wallpapers/nix-wallpaper-nineish-catppuccin-frappe-alt.svg;
theme.scheme = lib.mkDefault "catppuccin-frappe";
}

View file

@ -1,8 +1,14 @@
{self, ...}: {
{
self,
pkgs,
...
}: {
imports = [
"${self}/home/services/udiskie.nix"
"${self}/home/programs"
"${self}/home/programs/niri"
"${self}/home/programs/fuzzel.nix"
"${self}/home/terminal/emulators/foot.nix"

View file

@ -0,0 +1,39 @@
{
config,
lib,
pkgs,
...
}: let
appLauncher = lib.getExe pkgs.fuzzel;
terminal = lib.getExe pkgs.foot;
in {
# TODO: put this into the theme module to avoid repeating in greeter config
home.pointerCursor = {
gtk.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
};
programs.niri = {
settings = {
environment."NIXOS_OZONE_WL" = "1";
prefer-no-csd = true;
binds = {
"Mod+D".action.spawn = appLauncher;
"Mod+Return".action.spawn = terminal;
"Mod+Shift+E".action.quit.skip-confirmation = true;
"Mod+Shift+Slash".action = config.lib.niri.actions.show-hotkey-overlay;
"Mod+Q".action = config.lib.niri.actions.close-window;
"Mod+F".action = config.lib.niri.actions.maximize-column;
};
window-rules = [
{
matches = [
{app-id = "foot";}
];
default-column-width = {proportion = 0.5;};
}
];
};
};
}

View file

@ -1,6 +1,6 @@
{
inputs,
config,
nixosConfig,
...
}: {
programs.foot = {
@ -11,7 +11,7 @@
font = "monospace:size=14";
};
colors = let
inherit (config.theme) scheme;
inherit (nixosConfig.theme) scheme;
schemeData = inputs.basix.schemeData.base16.${scheme};
in {
background = schemeData.palette.base00;

View file

@ -1,6 +1,7 @@
{
self,
inputs,
lib,
...
}: {
flake.nixosConfigurations = let
@ -19,11 +20,16 @@
++ [
./vamos
../system/services/greetd.nix
# "${mod}/programs/kde.nix"
../system/services/regreet.nix
"${mod}/programs/niri"
self.nixosModules.theme
{
theme.wallpaper = lib.mkDefault ../wallpapers/nix-wallpaper-nineish-catppuccin-frappe-alt.svg;
theme.scheme = lib.mkDefault "catppuccin-frappe";
}
{
home-manager = {
users.nezia.imports = homeImports.vamos;
@ -45,6 +51,7 @@
"${mod}/programs/kde.nix"
"${mod}/hardware/nvidia.nix"
self.nixosModules.theme
{
home-manager = {
users.nezia.imports = homeImports.solaire;

View file

@ -1,4 +1,4 @@
{...}: {
{lib, ...}: {
imports = [
./hardware-configuration.nix
];

View file

@ -1,9 +1,8 @@
{
inputs,
pkgs,
...
}: {
imports = [inputs.niri.nixosModules.niri];
{inputs, ...}: {
imports = [
inputs.niri.nixosModules.niri
];
programs.niri = {
enable = true;
};

View file

@ -1,24 +0,0 @@
{
pkgs,
config,
lib,
...
}: {
programs.regreet.enable = true;
# greetd display manager
services.greetd = {
enable = true;
settings = {
default_session = let
greeter = lib.getExe config.programs.regreet.package;
program = "${lib.getExe pkgs.cage} -s";
in {
command = "${program} -- ${greeter}";
user = "nezia";
};
# unlock GPG keyring on login
security.pam.services.greetd.enableGnomeKeyring = true;
};
};
}

View file

@ -0,0 +1,20 @@
{
inputs,
config,
...
}: {
programs.regreet = {
enable = true;
cageArgs = [
"-s"
"-d"
];
settings = {
GTK = let
schemeData = inputs.basix.schemeData.base16.${config.theme.scheme};
in {
application_prefer_dark_theme = schemeData.variant == "dark";
};
};
};
}