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 = [ imports = [
./terminal ./terminal
self.nixosModules.theme
]; ];
home = { home = {
username = "nezia"; username = "nezia";
@ -14,7 +13,4 @@
}; };
programs.home-manager.enable = true; 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 = [ imports = [
"${self}/home/services/udiskie.nix" "${self}/home/services/udiskie.nix"
"${self}/home/programs" "${self}/home/programs"
"${self}/home/programs/niri"
"${self}/home/programs/fuzzel.nix" "${self}/home/programs/fuzzel.nix"
"${self}/home/terminal/emulators/foot.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, inputs,
config, nixosConfig,
... ...
}: { }: {
programs.foot = { programs.foot = {
@ -11,7 +11,7 @@
font = "monospace:size=14"; font = "monospace:size=14";
}; };
colors = let colors = let
inherit (config.theme) scheme; inherit (nixosConfig.theme) scheme;
schemeData = inputs.basix.schemeData.base16.${scheme}; schemeData = inputs.basix.schemeData.base16.${scheme};
in { in {
background = schemeData.palette.base00; background = schemeData.palette.base00;

View file

@ -1,6 +1,7 @@
{ {
self, self,
inputs, inputs,
lib,
... ...
}: { }: {
flake.nixosConfigurations = let flake.nixosConfigurations = let
@ -19,11 +20,16 @@
++ [ ++ [
./vamos ./vamos
../system/services/greetd.nix ../system/services/regreet.nix
# "${mod}/programs/kde.nix"
"${mod}/programs/niri" "${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 = { home-manager = {
users.nezia.imports = homeImports.vamos; users.nezia.imports = homeImports.vamos;
@ -45,6 +51,7 @@
"${mod}/programs/kde.nix" "${mod}/programs/kde.nix"
"${mod}/hardware/nvidia.nix" "${mod}/hardware/nvidia.nix"
self.nixosModules.theme
{ {
home-manager = { home-manager = {
users.nezia.imports = homeImports.solaire; users.nezia.imports = homeImports.solaire;

View file

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

View file

@ -1,9 +1,8 @@
{ {inputs, ...}: {
inputs, imports = [
pkgs, inputs.niri.nixosModules.niri
... ];
}: {
imports = [inputs.niri.nixosModules.niri];
programs.niri = { programs.niri = {
enable = true; 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";
};
};
};
}