Update config

This commit is contained in:
iFargle 2024-01-05 16:10:10 +09:00
parent e253adc0ee
commit 0ea1cb162d
40 changed files with 39 additions and 248 deletions

View file

@ -53,7 +53,7 @@
framework-server = libx.mkHost { hostname = "framework-server"; }; framework-server = libx.mkHost { hostname = "framework-server"; };
nuc-server = libx.mkHost { hostname = "nuc-server"; }; nuc-server = libx.mkHost { hostname = "nuc-server"; };
nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; desktop = "plasma6"; gpu = "nvidia"; }; nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; desktop = "plasma6"; gpu = "nvidia"; };
nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "amd"; theme = "stylix"; }; nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "amd"; color = "stylix"; };
backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; }; backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; };
piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; }; piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; };
quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; platform = "aarch64-linux"; type = "small"; }; quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; platform = "aarch64-linux"; type = "small"; };
@ -63,7 +63,7 @@
"albert@framework-server" = libx.mkHome { hostname = "framework-server"; }; "albert@framework-server" = libx.mkHome { hostname = "framework-server"; };
"albert@nuc-server" = libx.mkHome { hostname = "nuc-server"; }; "albert@nuc-server" = libx.mkHome { hostname = "nuc-server"; };
"albert@nixos-desktop" = libx.mkHome { hostname = "nixos-desktop"; desktop = "plasma6"; }; "albert@nixos-desktop" = libx.mkHome { hostname = "nixos-desktop"; desktop = "plasma6"; };
"albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "stylix"; }; "albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; color = "stylix"; };
"albert@backups-rpi4" = libx.mkHome { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; }; "albert@backups-rpi4" = libx.mkHome { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; };
"albert@piaware-rpi4" = libx.mkHome { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; }; "albert@piaware-rpi4" = libx.mkHome { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; };
"albert@quitman-rpi4" = libx.mkHome { hostname = "quitman-rpi4"; platform = "aarch64-linux"; type = "small"; }; "albert@quitman-rpi4" = libx.mkHome { hostname = "quitman-rpi4"; platform = "aarch64-linux"; type = "small"; };

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View file

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -0,0 +1,7 @@
{lib, inputs, pkgs, gpu, platform, color, ...}: {
stylix = {
image = /etc/nixos/git/wallpapers/${color}/wallpaper2.jpg;
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-cave.yaml";
};
}

View file

@ -4,6 +4,7 @@
./mako.nix ./mako.nix
./rofi.nix ./rofi.nix
./swaylock.nix ./swaylock.nix
./swayosd.nix
./waybar.nix ./waybar.nix
./wlogout.nix ./wlogout.nix
]; ];

View file

@ -0,0 +1,3 @@
{
services.swayosd.enable = true;
}

View file

@ -1,9 +1,9 @@
{ pkgs, inputs, theme, ... }: { { pkgs, inputs, theme, color, ... }: {
imports = [ imports = [
inputs.stylix.homeManagerModules.stylix inputs.stylix.homeManagerModules.stylix
./stylix ./colors/${color}.nix
./swayosd/swayosd.nix ./components
./waybar/scripts.nix ./assets/waybar/scripts.nix
]; ];
services.gammastep = { services.gammastep = {
@ -17,10 +17,7 @@
gtk.enable = true; gtk.enable = true;
stylix = { stylix = {
image = /etc/nixos/git/wallpapers/stylix/wallpaper2.jpg;
autoEnable = true; autoEnable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-cave.yaml";
polarity = "dark";
targets = { targets = {
vscode.enable = true; vscode.enable = true;
kitty = { kitty = {

View file

@ -1,21 +0,0 @@
{ theme, ... }: {
wayland.windowManager.hyprland = {
settings = {
extraConfig = ''
# Resize
bind = SUPER, R, exec, notify-send "Entered resize mode. Press ESC to quit."
bind = SUPER, R, submap, resize
submap = resize
binde = , H, resizeactive,-50 0
binde = , L, resizeactive,50 0
binde = , K, resizeactive,0 -50
binde = , J, resizeactive,0 50
binde = , left, resizeactive,-50 0
binde = , right, resizeactive,50 0
binde = , up, resizeactive,0 -50
binde = , down, resizeactive,0 50
bind = , escape, submap, reset
submap = reset
'';
};
}

View file

@ -1,3 +0,0 @@
{ ... }: {
services.swayosd.enable = true;
}

View file

@ -1,44 +0,0 @@
{ ... }: {
xdg.configFile."wlogout/layout" = {
enable = true;
target = "./wlogout/layout";
text = ''
{
"label" : "lock",
"action" : "swaylock",
"text" : "Lock",
"keybind" : "l"
}
{
"label" : "hibernate",
"action" : "systemctl hibernate",
"text" : "Hibernate",
"keybind" : "h"
}
{
"label" : "logout",
"action" : "loginctl terminate-user $USER",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "suspend",
"action" : "systemctl suspend",
"text" : "Suspend",
"keybind" : "u"
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"text" : "Reboot",
"keybind" : "r"
}
'';
};
}

View file

@ -1,4 +0,0 @@
# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix
{
}

View file

@ -1,4 +0,0 @@
# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix
{
}

View file

@ -1,51 +0,0 @@
{ theme, ... }: {
home.file = {
".config/hypr/hyprland.conf" = {
enable = true;
text = ''
# Monitor specific:
monitor=,2560x1440,auto,1
$mainMod = SUPER
# Start the config:
exec-once=bash ~/.config/hypr/start.sh
'';
};
# Set the custom launcher script
".config/hypr/start.sh" = {
enable = true;
executable = true;
text = ''
#!/usr/bin/env bash
# https://wiki.hyprland.org/FAQ/#some-of-my-apps-take-a-really-long-time-to-open
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &
# Set the wallpaper
swww init
# Waybar
waybar &
# Set up the idle management daemon
swayidle -w \
timeout 120 'swaylock -f && playerctl pause' \
timeout 180 'hyprctl dispatch dpms off' \
timeout 300 'systemctl suspend-then-hibernate' \
resume 'hyprctl dispatch dpms on' \
before-sleep 'swaylock -f' \
before-sleep 'playerctl pause' &
# Automatic device mounting
udiskie &
DIR=/etc/nixos/git/wallpapers/${theme}
IMG=`ls $DIR | shuf -n 1`
swww img $DIR/$IMG -t random &
# Notification listener
mako
'';
};
};
}

View file

@ -5,8 +5,7 @@
./common/software/cli/git.nix ./common/software/cli/git.nix
./common/software/cli/neovim.nix ./common/software/cli/neovim.nix
./common/software/cli/ssh.nix ./common/software/cli/ssh.nix
./common/software/cli/btop.nix
./common/software/cli/themes/${theme}/btop.nix
# User configs # User configs
./users/${username} ./users/${username}

View file

@ -22,11 +22,11 @@
username ? "albert", username ? "albert",
desktop ? null, desktop ? null,
platform ? "x86_64-linux", platform ? "x86_64-linux",
theme ? "default", color ? "default",
type ? "default" type ? "default"
}: inputs.home-manager.lib.homeManagerConfiguration { }: inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.${platform}; pkgs = inputs.nixpkgs.legacyPackages.${platform};
extraSpecialArgs = { inherit inputs outputs desktop hostname platform username hmStateVersion theme; }; extraSpecialArgs = { inherit inputs outputs desktop hostname platform username hmStateVersion color; };
modules = [ modules = [
../home-manager/${type}.nix ../home-manager/${type}.nix
]; ];
@ -39,10 +39,10 @@
desktop ? null, desktop ? null,
gpu ? null, gpu ? null,
platform ? "x86_64-linux", platform ? "x86_64-linux",
theme ? "default", color ? "default",
type ? "default" type ? "default"
}: inputs.nixpkgs.lib.nixosSystem { }: inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu platform theme; }; specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu platform color; };
modules = [ modules = [
# Types are 'default', 'small', and 'minimal' # Types are 'default', 'small', and 'minimal'
../nixos/${type}.nix ../nixos/${type}.nix
@ -58,10 +58,10 @@
desktop ? null, desktop ? null,
platform ? "x86_64-linux", platform ? "x86_64-linux",
gpu ? null, gpu ? null,
theme ? "default", color ? "default",
format format
}: inputs.nixos-generators.nixosGenerate { }: inputs.nixos-generators.nixosGenerate {
specialArgs = { inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu platform theme format; }; specialArgs = { inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu platform color format; };
system = platform; system = platform;
format = format; format = format;
@ -71,7 +71,7 @@
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
inputs.lanzaboote.nixosModules.lanzaboote inputs.lanzaboote.nixosModules.lanzaboote
inputs.home-manager.nixosModules.home-manager { inputs.home-manager.nixosModules.home-manager {
home-manager.extraSpecialArgs = { inherit inputs outputs desktop hostname username hmStateVersion stateVersion gpu platform theme format; }; home-manager.extraSpecialArgs = { inherit inputs outputs desktop hostname username hmStateVersion stateVersion gpu platform color format; };
home-manager.users."${username}" = import ../home-manager; home-manager.users."${username}" = import ../home-manager;
} }
]; ];
@ -84,11 +84,11 @@
desktop ? null, desktop ? null,
platform ? "x86_64-linux", platform ? "x86_64-linux",
gpu ? null, gpu ? null,
theme ? "default", color ? "default",
format format
}: }:
inputs.nixos-generators.nixosGenerate { inputs.nixos-generators.nixosGenerate {
specialArgs = { inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu platform theme format; }; specialArgs = { inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu platform color format; };
system = platform; system = platform;
format = format; format = format;

View file

@ -83,15 +83,4 @@
gnome.gnome-session gnome.gnome-session
]; ];
imports = [
# Gnome Themes
# ./themes/arc.nix
# ./themes/gruvbox.nix
# ./themes/tokyo-night.nix
# ./themes/nordic.nix
# ./themes/vimix.nix
# ./themes/fluent.nix
# You may need to edit which theme you're using in dconf.nix if you remove themes
];
} }

View file

@ -1,5 +0,0 @@
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
arc-theme
];
}

View file

@ -1,6 +0,0 @@
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
fluent-gtk-theme
fluent-icon-theme
];
}

View file

@ -1,7 +0,0 @@
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
gruvbox-gtk-theme
gruvbox-dark-icons-gtk
gruvbox-dark-gtk
];
}

View file

@ -1,7 +0,0 @@
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
nordic
nordzy-icon-theme
nordzy-cursor-theme
];
}

View file

@ -1,5 +0,0 @@
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
tokyo-night-gtk
];
}

View file

@ -1,6 +0,0 @@
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
vimix-icon-theme
vimix-gtk-themes
];
}

View file

@ -0,0 +1,7 @@
{lib, inputs, pkgs, gpu, platform, color, ...}: {
stylix = {
image = /etc/nixos/git/wallpapers/${color}/wallpaper2.jpg;
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-cave.yaml";
};
}

View file

@ -1,4 +1,4 @@
{lib, inputs, pkgs, gpu, platform, ...}: { {lib, inputs, pkgs, gpu, platform, color, ...}: {
# nixpkgs = { # nixpkgs = {
# overlays = [ # overlays = [
@ -7,16 +7,16 @@
# ]; # ];
# }; # };
imports = [ inputs.stylix.nixosModules.stylix ]; imports = [
inputs.stylix.nixosModules.stylix
./colors/${color}.nix;
];
stylix = { stylix = {
image = /etc/nixos/git/wallpapers/stylix/wallpaper2.jpg;
targets = { targets = {
plymouth.enable = false; plymouth.enable = false;
}; };
autoEnable = true; autoEnable = true;
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-cave.yaml";
fonts = { fonts = {
serif = { serif = {
package = pkgs.dejavu_fonts; package = pkgs.dejavu_fonts;

View file

@ -1,40 +0,0 @@
{ lib, config, pkgs, hostname, gpu, ... }: {
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Configure keymap in X11
services.xserver = {
enable = true;
layout = "us";
xkbVariant = "";
autorun = true;
videoDrivers = [ ] ++ lib.optional (builtins.isString gpu) gpu;
};
##### disable nvidia, very nice battery life.
# hardware.nvidiaOptimus.disable = lib.mkDefault true;
services.xserver = {
# https://nixos.org/manual/nixos/stable/index.html#chap-gnome
# Enable the GNOME Desktop Environment.
desktopManager = {
xterm.enable = false;
xfce.enable = true;
};
displayManager.defaultSession = "xfce";
};
environment.systemPackages = with pkgs; [
# Gnome relevant packages
papirus-icon-theme
dconf2nix # https://github.com/gvolpe/dconf2nix
];
}