??
This commit is contained in:
7
Makefile
7
Makefile
@@ -47,17 +47,18 @@ unlink:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
rebuild:
|
rebuild:
|
||||||
sudo nixos-rebuild switch
|
sudo nixos-rebuild switch --flake .
|
||||||
|
|
||||||
update:
|
update:
|
||||||
sudo nixos-rebuild switch --upgrade
|
nix flake update
|
||||||
|
sudo nixos-rebuild switch --flake .
|
||||||
|
|
||||||
purge:
|
purge:
|
||||||
sudo nix-collect-garbage -d
|
sudo nix-collect-garbage -d
|
||||||
sudo /run/current-system/bin/switch-to-configuration boot
|
sudo /run/current-system/bin/switch-to-configuration boot
|
||||||
|
|
||||||
check:
|
check:
|
||||||
nix-instantiate '<nixpkgs/nixos>' -A system --dry-run
|
nixos-rebuild build --flake . --dry-run
|
||||||
|
|
||||||
edit:
|
edit:
|
||||||
@$${EDITOR:-nano} $(SETTINGS)
|
@$${EDITOR:-nano} $(SETTINGS)
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
./modules/boot.nix
|
./modules/boot.nix
|
||||||
./modules/networking.nix
|
./modules/networking.nix
|
||||||
./modules/locale.nix
|
./modules/locale.nix
|
||||||
./modules/desktop.nix
|
./modules/hyprland.nix
|
||||||
|
./modules/stylix.nix
|
||||||
./modules/audio.nix
|
./modules/audio.nix
|
||||||
./modules/users.nix
|
./modules/users.nix
|
||||||
./modules/packages.nix
|
./modules/packages.nix
|
||||||
|
|||||||
44
flake.nix
Normal file
44
flake.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
description = "NixOS Configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
|
||||||
|
stylix.url = "github:danth/stylix";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, home-manager, hyprland, stylix, ... }@inputs:
|
||||||
|
let
|
||||||
|
settings = import ./settings.nix;
|
||||||
|
system = "x86_64-linux";
|
||||||
|
lib = nixpkgs.lib;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixosConfigurations = {
|
||||||
|
"${settings.hostname}" = lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
stylix.nixosModules.stylix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users."${settings.username}" = {
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
95
modules/hyprland.nix
Normal file
95
modules/hyprland.nix
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
|
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
enableHidpi = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Environment variables for Wayland
|
||||||
|
environment.sessionVariables = {
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
|
||||||
|
# QT Variables
|
||||||
|
QT_QPA_PLATFORM = "wayland";
|
||||||
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
|
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||||
|
|
||||||
|
# Toolkit Backends
|
||||||
|
GDK_BACKEND = "wayland,x11,*";
|
||||||
|
SDL_VIDEODRIVER = "wayland";
|
||||||
|
CLUTTER_BACKEND = "wayland";
|
||||||
|
|
||||||
|
# XDG Specifications
|
||||||
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
XDG_SESSION_DESKTOP = "Hyprland";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Core
|
||||||
|
waybar # Status bar
|
||||||
|
rofi-wayland # App launcher
|
||||||
|
swaynotificationcenter # Notifications
|
||||||
|
libnotify # Notification library
|
||||||
|
|
||||||
|
# Theming & Wallpaper
|
||||||
|
swww # Wallpaper daemon
|
||||||
|
hyprcursor # Cursor theme manager
|
||||||
|
|
||||||
|
# Utilities
|
||||||
|
wl-clipboard # Clipboard manager
|
||||||
|
cliphist # Clipboard history
|
||||||
|
grim # Screenshot tool
|
||||||
|
slurp # Region selector
|
||||||
|
swappy # Screenshot editor
|
||||||
|
hyprpicker # Color picker
|
||||||
|
|
||||||
|
# System Management
|
||||||
|
hypridle # Idle daemon
|
||||||
|
hyprlock # Screen locker
|
||||||
|
wlogout # Logout menu
|
||||||
|
|
||||||
|
# Audio
|
||||||
|
pamixer
|
||||||
|
playerctl
|
||||||
|
|
||||||
|
# File Management
|
||||||
|
# (Dolphin or Nautilus usually handled by user preference, keeping system clean)
|
||||||
|
|
||||||
|
# Polkit Agent
|
||||||
|
polkit_gnome
|
||||||
|
];
|
||||||
|
|
||||||
|
# Security / Polkit
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
|
description = "polkit-gnome-authentication-agent-1";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
wants = [ "graphical-session.target" ];
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Portals
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -52,12 +52,6 @@ in
|
|||||||
impression
|
impression
|
||||||
streamcontroller
|
streamcontroller
|
||||||
onlyoffice-desktopeditors
|
onlyoffice-desktopeditors
|
||||||
|
|
||||||
# Gnome Extensions
|
|
||||||
gnomeExtensions.blur-my-shell
|
|
||||||
gnomeExtensions.just-perfection
|
|
||||||
gnomeExtensions.arc-menu
|
|
||||||
gnomeExtensions.appindicator
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Programs with extra configuration
|
# Programs with extra configuration
|
||||||
|
|||||||
60
modules/stylix.nix
Normal file
60
modules/stylix.nix
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
stylix = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Set the wallpaper
|
||||||
|
image = ../assets/wallpapers/japantrain.png;
|
||||||
|
|
||||||
|
# Set the color scheme (dark mode)
|
||||||
|
polarity = "dark";
|
||||||
|
|
||||||
|
# Optionally force a specific scheme instead of generating from image
|
||||||
|
# base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
package = pkgs.bibata-cursors;
|
||||||
|
name = "Bibata-Modern-Ice";
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts = {
|
||||||
|
monospace = {
|
||||||
|
package = pkgs.nerd-fonts.jetbrains-mono;
|
||||||
|
name = "JetBrainsMono Nerd Font Mono";
|
||||||
|
};
|
||||||
|
sansSerif = {
|
||||||
|
package = pkgs.dejavu_fonts;
|
||||||
|
name = "DejaVu Sans";
|
||||||
|
};
|
||||||
|
serif = {
|
||||||
|
package = pkgs.dejavu_fonts;
|
||||||
|
name = "DejaVu Serif";
|
||||||
|
};
|
||||||
|
|
||||||
|
sizes = {
|
||||||
|
applications = 12;
|
||||||
|
terminal = 15;
|
||||||
|
desktop = 10;
|
||||||
|
popups = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Opacity for various applications
|
||||||
|
opacity = {
|
||||||
|
applications = 1.0;
|
||||||
|
terminal = 0.95;
|
||||||
|
desktop = 1.0;
|
||||||
|
popups = 1.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure which targets Stylix should manage
|
||||||
|
targets = {
|
||||||
|
console.enable = true;
|
||||||
|
gnome.enable = true;
|
||||||
|
gtk.enable = true;
|
||||||
|
nixos-icons.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user