mirror of
https://github.com/artagaz/nix-config.git
synced 2026-06-22 02:02:09 +07:00
niri matugen
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@
|
||||
extraSpecialArgs = { inherit inputs self; };
|
||||
backupCommand = "rm";
|
||||
|
||||
users.matthew = {
|
||||
users.${self.user} = {
|
||||
home.stateVersion = "25.11";
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
imports = [
|
||||
self.nixosModules.laptopHardware
|
||||
|
||||
self.nixosModules.fastfetch
|
||||
self.nixosModules.base
|
||||
self.nixosModules.gamedev
|
||||
self.nixosModules.gaming
|
||||
|
||||
self.nixosModules.fastfetch
|
||||
self.nixosModules.home-manager
|
||||
self.nixosModules.kitty
|
||||
self.nixosModules.vpn
|
||||
self.nixosModules.niri
|
||||
|
||||
# self.nixosModules.plasma
|
||||
self.nixosModules.zen-browser
|
||||
self.nixosModules.niri
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
@@ -72,34 +72,17 @@
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.matthew = {
|
||||
users.users.${self.user} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
packages = with pkgs; [
|
||||
tree
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Allow unfree packages.
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile.
|
||||
# You can use https://search.nixos.org/ to find more packages (and options).
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-clocks
|
||||
kdePackages.okular
|
||||
kdePackages.partitionmanager
|
||||
krita
|
||||
obsidian
|
||||
telegram-desktop
|
||||
vesktop
|
||||
];
|
||||
|
||||
# List font packages installed in system profile.
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.terminess-ttf
|
||||
];
|
||||
|
||||
fileSystems = {
|
||||
"/".options = [ "compress=zstd" ];
|
||||
"/home".options = [ "compress=zstd" ];
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{ self, ... }:
|
||||
{
|
||||
flake.nixosModules.base = { pkgs, ... }: {
|
||||
imports = [
|
||||
self.nixosModules.vpn
|
||||
self.nixosModules.zen-browser
|
||||
];
|
||||
|
||||
# List packages installed in system profile.
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-clocks
|
||||
kdePackages.okular
|
||||
kdePackages.partitionmanager
|
||||
krita
|
||||
obsidian
|
||||
telegram-desktop
|
||||
vesktop
|
||||
];
|
||||
|
||||
# List font packages installed in system profile.
|
||||
fonts.packages = with pkgs; [
|
||||
ibm-plex
|
||||
nerd-fonts.jetbrains-mono
|
||||
];
|
||||
};
|
||||
|
||||
flake = {
|
||||
user = "matthew";
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{ self, ... }:
|
||||
{
|
||||
flake.nixosModules.bash = {
|
||||
home-manager.users.matthew.imports = [
|
||||
home-manager.users.${self.user}.imports = [
|
||||
{
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ self, ... }:
|
||||
{
|
||||
flake.nixosModules.fastfetch = {
|
||||
home-manager.users.matthew.imports = [
|
||||
home-manager.users.${self.user}.imports = [
|
||||
{
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{
|
||||
flake.nixosModules.gaming = { pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
prismlauncher
|
||||
];
|
||||
|
||||
programs.steam.enable = true;
|
||||
programs.gamescope.enable = true;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ self, ... }:
|
||||
{
|
||||
flake.nixosModules.git = {
|
||||
home-manager.users.matthew.imports = [
|
||||
home-manager.users.${self.user}.imports = [
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{ self, ... }:
|
||||
{
|
||||
flake.nixosModules.kitty = {
|
||||
home-manager.users.matthew.imports = [
|
||||
home-manager.users.${self.user}.imports = [
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "${self.font}Mono";
|
||||
name = "${self.font.mono}";
|
||||
size = 13;
|
||||
};
|
||||
settings = {
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
self.nixosModules.bash
|
||||
];
|
||||
|
||||
home-manager.users.matthew.imports = [
|
||||
home-manager.users.${self.user}.imports = [
|
||||
{
|
||||
home.activation = {
|
||||
matugen = ''
|
||||
${pkgs.matugen}/bin/matugen image /home/matthew/Pictures/iriza-katou.jpg --source-color-index 0
|
||||
${pkgs.matugen}/bin/matugen image ${self.wallpaper} --source-color-index 0
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -37,6 +37,11 @@
|
||||
input_path = '${builtins.toString ./templates/Matugen.colors}'
|
||||
output_path = '~/.local/share/color-schemes/Matugen.colors'
|
||||
|
||||
[templates.niri]
|
||||
input_path = '${builtins.toString ./templates/niri-colors.kdl}'
|
||||
output_path = '~/.config/niri/colors.kdl'
|
||||
# post_hook = 'niri msg action load-config-file'
|
||||
|
||||
[templates.qt5ct]
|
||||
input_path = '${builtins.toString ./templates/qtct-colors.conf}'
|
||||
output_path = '~/.config/qt5ct/colors/matugen.conf'
|
||||
@@ -57,14 +62,14 @@
|
||||
|
||||
qt5ctSettings = {
|
||||
Appearance = {
|
||||
color_scheme_path = "/home/matthew/.config/qt5ct/colors/matugen.conf";
|
||||
color_scheme_path = "/home/${self.user}/.config/qt5ct/colors/matugen.conf";
|
||||
custom_palette = true;
|
||||
};
|
||||
};
|
||||
|
||||
qt6ctSettings = {
|
||||
Appearance = {
|
||||
color_scheme_path = "/home/matthew/.config/qt5ct/colors/matugen.conf";
|
||||
color_scheme_path = "/home/${self.user}/.config/qt5ct/colors/matugen.conf";
|
||||
custom_palette = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
layout {
|
||||
focus-ring {
|
||||
active-color "{{colors.primary.default.hex}}"
|
||||
inactive-color "{{colors.outline.default.hex}}"
|
||||
urgent-color "{{colors.error.default.hex}}"
|
||||
}
|
||||
|
||||
border {
|
||||
active-color "{{colors.primary.default.hex}}"
|
||||
inactive-color "{{colors.outline.default.hex}}"
|
||||
urgent-color "{{colors.error.default.hex}}"
|
||||
}
|
||||
|
||||
shadow {
|
||||
color "{{colors.shadow.default.hex}}70"
|
||||
}
|
||||
|
||||
tab-indicator {
|
||||
active-color "{{colors.primary.default.hex}}"
|
||||
inactive-color "{{colors.outline.default.hex}}"
|
||||
urgent-color "{{colors.error.default.hex}}"
|
||||
}
|
||||
|
||||
insert-hint {
|
||||
color "{{colors.primary.default.hex}}80"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ inputs, ... }:
|
||||
{ self, inputs, ... }:
|
||||
{
|
||||
flake.nixosModules.neovim = {
|
||||
home-manager.users.matthew.imports = [
|
||||
home-manager.users.${self.user}.imports = [
|
||||
{
|
||||
imports = [ inputs.nvf.homeManagerModules.default ];
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ self, ... }:
|
||||
{
|
||||
flake.nixosModules.tmux = { pkgs, ... }: {
|
||||
home-manager.users.matthew.imports = [
|
||||
home-manager.users.${self.user}.imports = [
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
||||
+90
-91
@@ -11,7 +11,7 @@
|
||||
font-awesome
|
||||
];
|
||||
|
||||
home-manager.users.matthew.imports = [
|
||||
home-manager.users.${self.user}.imports = [
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
@@ -94,112 +94,111 @@
|
||||
};
|
||||
|
||||
style = /*css*/ ''
|
||||
@import "/home/matthew/.cache/wal/colors-waybar.css";
|
||||
@import "/home/${self.user}/.cache/wal/colors-waybar.css";
|
||||
* {
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: ${self.font.propo}, JetBrainsMonoNerdFontPropo;
|
||||
font-size: 13pt;
|
||||
transition-property: background-color;
|
||||
transition-duration: .25s;
|
||||
}
|
||||
|
||||
* {
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: FontAwesome, ${self.font}Propo;
|
||||
font-size: 13pt;
|
||||
transition-property: background-color;
|
||||
transition-duration: .25s;
|
||||
}
|
||||
window#waybar {
|
||||
background-color: @background;
|
||||
color: @cursor;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: @background;
|
||||
color: @cursor;
|
||||
}
|
||||
button {
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
/* Avoid rounded borders under each button name */
|
||||
|
||||
button {
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
/* Avoid rounded borders under each button name */
|
||||
border: none;
|
||||
border-radius: ${self.border.small};
|
||||
margin: 2 2;
|
||||
}
|
||||
|
||||
border: none;
|
||||
border-radius: 4;
|
||||
margin: 2 2;
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background-color: transparent;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background: @color1;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: @color1;
|
||||
}
|
||||
#workspaces button.focused, #workspaces button.active {
|
||||
background-color: @color8;
|
||||
color: @background;
|
||||
/* box-shadow: inset 0 -3px @color3; */
|
||||
}
|
||||
|
||||
#workspaces button.focused, #workspaces button.active {
|
||||
background-color: @color8;
|
||||
color: @background;
|
||||
/* box-shadow: inset 0 -3px @color3; */
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
background-color: @color4;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: @color4;
|
||||
}
|
||||
#language,
|
||||
#tray,
|
||||
#bluetooth,
|
||||
#wireplumber,
|
||||
#network,
|
||||
#backlight,
|
||||
#clock,
|
||||
#battery,
|
||||
#custom-power {
|
||||
margin: 2 2;
|
||||
padding: 0 10;
|
||||
color: @cursor;
|
||||
border-radius: ${self.border.small};
|
||||
}
|
||||
|
||||
#language,
|
||||
#tray,
|
||||
#bluetooth,
|
||||
#wireplumber,
|
||||
#network,
|
||||
#backlight,
|
||||
#clock,
|
||||
#battery,
|
||||
#custom-power {
|
||||
margin: 2 2;
|
||||
padding: 0 10;
|
||||
color: @cursor;
|
||||
border-radius: 4;
|
||||
}
|
||||
#battery,
|
||||
#bluetooth,
|
||||
#wireplumber,
|
||||
#custom-power,
|
||||
#network {
|
||||
background-color: @color4;
|
||||
color: @background;
|
||||
}
|
||||
|
||||
#battery,
|
||||
#bluetooth,
|
||||
#wireplumber,
|
||||
#custom-power,
|
||||
#network {
|
||||
background-color: @color4;
|
||||
color: @background;
|
||||
}
|
||||
/* top right bottom left */
|
||||
#battery {
|
||||
padding: 0 5 0 10;
|
||||
border-radius: ${self.border.small} 0 0 ${self.border.small};
|
||||
margin: 2 0 2 2;
|
||||
}
|
||||
|
||||
/* top right bottom left */
|
||||
#battery {
|
||||
padding: 0 5 0 10;
|
||||
border-radius: 4 0 0 4;
|
||||
margin: 2 0 2 2;
|
||||
}
|
||||
#battery.bat2 {
|
||||
padding: 0 10 0 5;
|
||||
border-radius: 0 ${self.border.small} ${self.border.small} 0;
|
||||
margin: 2 2 2 0;
|
||||
}
|
||||
|
||||
#battery.bat2 {
|
||||
padding: 0 10 0 5;
|
||||
border-radius: 0 4 4 0;
|
||||
margin: 2 2 2 0;
|
||||
}
|
||||
#custom-power {
|
||||
background-color: @color8;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
background-color: @color8;
|
||||
}
|
||||
#bluetooth:hover,
|
||||
#wireplumber:hover,
|
||||
#network:hover,
|
||||
#custom-power:hover {
|
||||
background-color: @color3;
|
||||
}
|
||||
|
||||
#bluetooth:hover,
|
||||
#wireplumber:hover,
|
||||
#network:hover,
|
||||
#custom-power:hover {
|
||||
background-color: @color3;
|
||||
}
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
}
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces {
|
||||
margin-right: 0;
|
||||
}
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces {
|
||||
margin-right: 0;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
// Check the wiki for a full description of the configuration:
|
||||
// https://yalter.github.io/niri/Configuration:-Introduction
|
||||
|
||||
include "./colors.kdl"
|
||||
include "./config-nix.kdl"
|
||||
|
||||
// Input device configuration.
|
||||
// Find the full list of options on the wiki:
|
||||
// https://yalter.github.io/niri/Configuration:-Input
|
||||
@@ -22,8 +25,8 @@ input {
|
||||
// localectl set-x11-keymap.
|
||||
}
|
||||
|
||||
repeat-delay 250
|
||||
repeat-rate 25
|
||||
repeat-delay 250
|
||||
repeat-rate 25
|
||||
|
||||
// Enable numlock on startup, omitting this setting disables it.
|
||||
// numlock
|
||||
@@ -174,13 +177,12 @@ layout {
|
||||
|
||||
// Color of the ring on the active monitor.
|
||||
// active-color "#7fc8ff"
|
||||
active-color "#4c7f54"
|
||||
|
||||
// Color of the ring on inactive monitors.
|
||||
//
|
||||
// The focus ring only draws around the active window, so the only place
|
||||
// where you can see its inactive-color is on other monitors.
|
||||
inactive-color "#505050"
|
||||
// inactive-color "#505050"
|
||||
|
||||
// You can also use gradients. They take precedence over solid colors.
|
||||
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
|
||||
@@ -205,11 +207,11 @@ layout {
|
||||
off
|
||||
|
||||
width 2
|
||||
active-color "#ffc87f"
|
||||
inactive-color "#505050"
|
||||
// active-color "#ffc87f"
|
||||
// inactive-color "#505050"
|
||||
|
||||
// Color of the border around windows that request your attention.
|
||||
urgent-color "#9b0000"
|
||||
// urgent-color "#9b0000"
|
||||
|
||||
// Gradients can use a few different interpolation color spaces.
|
||||
// For example, this is a pastel rainbow gradient via in="oklch longer hue".
|
||||
@@ -253,7 +255,7 @@ layout {
|
||||
offset x=0 y=5
|
||||
|
||||
// You can also change the shadow color and opacity.
|
||||
color "#0007"
|
||||
// color "#0007"
|
||||
}
|
||||
|
||||
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
|
||||
@@ -275,9 +277,6 @@ layout {
|
||||
// See the binds section below for more spawn examples.
|
||||
|
||||
// This line starts waybar, a commonly used bar for Wayland compositors.
|
||||
// spawn-sh-at-startup "wal -i /home/matthew/Pictures/iriza-katou.jpg --cols16 --saturate 0.15"
|
||||
// spawn-sh-at-startup "matugen image /home/matthew/Pictures/iriza-katou.jpg --source-color-index 0";
|
||||
spawn-sh-at-startup "swaybg -i /home/matthew/Pictures/iriza-katou.jpg" // Wallpaper utility.
|
||||
spawn-at-startup "waybar" // Bar.
|
||||
spawn-at-startup "dunst" // Notification daemon.
|
||||
spawn-sh-at-startup "wlsunset -l 43.2 -L 76.9 -t 5000" // Night light utility.
|
||||
@@ -363,7 +362,7 @@ window-rule {
|
||||
// Example: enable rounded corners for all windows.
|
||||
// (This example rule is commented out with a "/-" in front.)
|
||||
window-rule {
|
||||
geometry-corner-radius 8
|
||||
// geometry-corner-radius 0
|
||||
clip-to-geometry true
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
flake.nixosModules.niri = { pkgs, lib, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
self.nixosModules.waybar
|
||||
self.nixosModules.kitty
|
||||
self.nixosModules.matugen
|
||||
self.nixosModules.waybar
|
||||
];
|
||||
|
||||
programs.niri.enable = true;
|
||||
@@ -47,17 +48,17 @@
|
||||
xwayland-satellite
|
||||
];
|
||||
|
||||
home-manager.users.matthew.imports = [
|
||||
home-manager.users.${self.user}.imports = [
|
||||
{
|
||||
home.activation = {
|
||||
pywal = ''
|
||||
${pkgs.pywal}/bin/wal -i /home/matthew/Pictures/iriza-katou.jpg --saturate 0.25
|
||||
${pkgs.pywal}/bin/wal -i ${self.wallpaper} --saturate 0.25
|
||||
'';
|
||||
};
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "${self.font}Mono 18";
|
||||
font = "${self.font.mono} 18";
|
||||
extraConfig = {
|
||||
kb-row-up = "Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab";
|
||||
kb-row-down = "Down,Control+j";
|
||||
@@ -87,6 +88,14 @@
|
||||
# Symlink config file.
|
||||
xdg.configFile."niri/config.kdl".source = ./config.kdl;
|
||||
|
||||
# Write custom config file.
|
||||
xdg.configFile."niri/config-nix.kdl".text = /* kdl */ ''
|
||||
spawn-sh-at-startup "swaybg -i ${self.wallpaper}" // Wallpaper utility.
|
||||
window-rule {
|
||||
geometry-corner-radius ${self.border.main}
|
||||
}
|
||||
'';
|
||||
|
||||
# Set default applications.
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
@@ -124,7 +133,7 @@
|
||||
size = 24;
|
||||
};
|
||||
font = {
|
||||
name = "${self.font}Mono";
|
||||
name = "${self.font.mono}";
|
||||
size = 13;
|
||||
};
|
||||
};
|
||||
@@ -136,15 +145,15 @@
|
||||
|
||||
qt5ctSettings = {
|
||||
Fonts = {
|
||||
fixed = "\"${self.font}Mono,13\"";
|
||||
general = "\"${self.font}Mono,13\"";
|
||||
fixed = "\"${self.font.mono},13\"";
|
||||
general = "\"${self.font.mono},13\"";
|
||||
};
|
||||
};
|
||||
|
||||
qt6ctSettings = {
|
||||
Fonts = {
|
||||
fixed = "\"${self.font}Mono,13\"";
|
||||
general = "\"${self.font}Mono,13\"";
|
||||
fixed = "\"${self.font.mono},13\"";
|
||||
general = "\"${self.font.mono},13\"";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
+16
-2
@@ -1,8 +1,22 @@
|
||||
{ self, ... }:
|
||||
let
|
||||
font = "JetBrainsMonoNerdFont";
|
||||
# font = "TerminessNerdFont";
|
||||
wallpaper = "/home/${self.user}/Pictures/iriza-katou.jpg";
|
||||
|
||||
font = {
|
||||
mono = "JetBrainsMonoNerdFontMono";
|
||||
propo = "JetBrainsMonoNerdFontPropo";
|
||||
# mono = "IBM Plex Mono";
|
||||
# propo = "IBM Plex Mono";
|
||||
};
|
||||
|
||||
border = {
|
||||
main = "0";
|
||||
small = "0";
|
||||
};
|
||||
in {
|
||||
flake = {
|
||||
inherit font;
|
||||
inherit wallpaper;
|
||||
inherit border;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user