Compare commits

...

23 commits

Author SHA1 Message Date
c3354e3609
fix: remove most of the lib.mkDefaults to stop quirks 2024-08-07 08:43:27 -07:00
6155b9062a feat: reduce font size in kitty on laptop 2024-08-07 08:35:06 -07:00
ee303edef3 style: adjust waybar padding 2024-08-07 08:22:56 -07:00
046f91a5f2 refactor: remove desktop-only hyprland for consistency 2024-08-07 08:17:54 -07:00
4a840c8fae feat: add some laptop configuration for hyprland 2024-08-07 08:17:21 -07:00
3dbc049b64 feat: switch to new hostname 'demeter' 2024-08-07 08:03:17 -07:00
4cc4dc2c37 fix: build successfully on desktop 2024-08-07 07:58:36 -07:00
ff235895de fix: missing semicolon 2024-08-07 07:55:58 -07:00
6abc51f47a style: initial waybar rice on callisto 2024-08-07 07:48:46 -07:00
c2e287ec90 feat: re-enable the notch on mac 2024-08-07 07:27:48 -07:00
c30ab2e0f0 feat: add laptop config for waybar 2024-08-07 07:22:09 -07:00
3e5297d04a fix: correctly reference waybar config 2024-08-07 07:19:01 -07:00
69e13ac02d refactor: move common-de stuff to home.nix 2024-08-07 07:14:52 -07:00
df50a3a1f9 refactor: move neofetch.conf to more sensible location 2024-08-07 07:12:28 -07:00
f0c424b39a refactor: move some unlikely to be shared config into hosts 2024-08-07 07:06:41 -07:00
098cbdd9f1 refactor: engage super ultra abstraction for multi-architecture
temp

temp
2024-08-07 07:02:26 -07:00
cde45f87fd feat: successfully compile on callisto (asahi aarch64) 2024-08-07 05:57:55 -07:00
d9dce7d1a7 temp: attempt to build callisto
chore: stop re-hosting apple-silicon-support
2024-08-07 05:57:54 -07:00
5ab58b4bb1 feat: add initial callisto configuration 2024-08-07 01:03:40 -07:00
e5c3d9c52b refactor: change hosts configuration to be more modular 2024-08-07 01:01:58 -07:00
ee4c922eb2 refactor: move home-manager configuration to users dir 2024-08-07 00:49:16 -07:00
d7373ba537 docs: update readme again 2024-08-07 00:31:21 -07:00
57b6f4db86 docs: update readme 2024-08-06 23:27:28 -07:00
58 changed files with 1218 additions and 507 deletions

0
LICENSE Normal file → Executable file
View file

31
README.md Normal file → Executable file
View file

@ -1,6 +1,33 @@
# NixOS Configuration Files # liminalOS
This repository directly mirrors `/etc/nixos` on my main NixOS machine. In the future, it will be modularized to support deployment across multiple machines. This is a repository that implements liminalOS, my personal Linux distribution based on [NixOS](https://nixos.org/).
Traditional Linux distributions are either _rolling_ or _fixed_ release. liminalOS operates on a new kind of release schedule: _liminal_ release.
> **lim·i·nal**
> 2. relating to a transitional or initial stage of a process.
Users who install liminalOS may feel a sense of eeriness similar to a [liminal space](<https://en.wikipedia.org/wiki/Liminal_space_(aesthetic)>) - the system has clearly been configured exactly according to someone's preferences and specifications, yet they stand alone in an empty OS, with the usual user nowhere to be found, and a home directory devoid of human presence. System updates are released at random times, and upon installing, it appears that someone has adjusted minute configuration details, yet no other users exist in the system.
## Installation guide
TBD. May use `deploy-rs` or the in-house [dartgun](https://github.com/youwen5/dartgun) tool for easy deployment.
## FAQ
### This looks like a collection of NixOS configuration files and modules. What makes it a distinct distribution?
Most Linux[^1] users will agree that any self-respecting distribution must include at least the following: installer, package manager, and some set of default packages. Therefore, anything that implements the aforementioned items must also be a Linux distribution.
liminalOS comes with the Nix package manager (nobody said you need a _unique_ package manager - Ubuntu and Debian are distinct distributions yet both use `apt`), a custom desktop environment composed of Waybar, Hyprland, rofi, as well as various applications installed by default, and [the means to generate an installer](https://nixos.wiki/wiki/Creating_a_NixOS_live_CD). Therefore, liminalOS is a Linux distribution. QED.[^2]
### Should I actually install this?
No.
[^1]: also known as GNU/Linux, GNU+Linux, Freedesktop/systemd/musl/busybox Linux, Linux+friends, etc
[^2]: disclaimer: this is unfortunately not actually how the converse works. A => B does not necessarily imply B => A. I hope this satiates the rigor-hungry mathematicians reading.
## Keybinds ## Keybinds

View file

@ -1,5 +1,27 @@
{ {
"nodes": { "nodes": {
"apple-silicon": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1722469787,
"narHash": "sha256-P20oAmbgXHl1E77TXPXiAj1Ntycc1mf7fZMI7X13VYw=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "8a665fee82901878edaeb8ee120296a979db2dd2",
"type": "github"
},
"original": {
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"type": "github"
}
},
"bleedingpkgs": { "bleedingpkgs": {
"locked": { "locked": {
"lastModified": 1722979953, "lastModified": 1722979953,
@ -70,6 +92,21 @@
} }
}, },
"flake-compat": { "flake-compat": {
"locked": {
"lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
@ -252,14 +289,14 @@
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks-nix": "pre-commit-hooks-nix", "pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1718178907, "lastModified": 1718178907,
@ -460,6 +497,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"apple-silicon": "apple-silicon",
"bleedingpkgs": "bleedingpkgs", "bleedingpkgs": "bleedingpkgs",
"catppuccin": "catppuccin", "catppuccin": "catppuccin",
"home-manager": "home-manager", "home-manager": "home-manager",
@ -474,6 +512,22 @@
} }
}, },
"rust-overlay": { "rust-overlay": {
"flake": false,
"locked": {
"lastModified": 1686795910,
"narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
"lanzaboote", "lanzaboote",

102
flake.nix
View file

@ -32,49 +32,79 @@
"https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz"; "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, home-manager, catppuccin, lanzaboote, stablepkgs outputs = { self, nixpkgs, home-manager, catppuccin, lanzaboote, stablepkgs
, bleedingpkgs, lix-module, nix-darwin, nix-homebrew, ... }@inputs: rec { , bleedingpkgs, lix-module, nix-darwin, nix-homebrew, apple-silicon, ...
}@inputs: rec {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations = {
specialArgs = { inherit inputs; }; demeter = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; specialArgs = { inherit inputs; };
modules = [ system = "x86_64-linux";
./modules/nixos/nixos-configuration.nix modules = [
./modules/nixos/secureboot.nix ./hosts/nixos
./modules/nixos/gaming.nix ./modules/nixos/gaming
./modules/nixos/audio.nix ./modules/nixos/audio
./modules/nixos/nvidia.nix ./modules/nixos/networking
./modules/nixos/networking.nix ./modules/common/fonts
./modules/common/fonts.nix
./machines/nixos/hardware-configuration.nix
catppuccin.nixosModules.catppuccin catppuccin.nixosModules.catppuccin
lix-module.nixosModules.default
lanzaboote.nixosModules.lanzaboote
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.youwen = {
imports = [
./users/youwen/linux/desktop
./users/youwen/linux/packages/x86_64
./users/youwen/linux/programs
./users/youwen/common
inputs.catppuccin.homeManagerModules.catppuccin
];
};
}
];
};
callisto = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
system = "aarch64-linux";
modules = [
./hosts/callisto
./modules/nixos/audio
./modules/nixos/networking
./modules/common/fonts
lix-module.nixosModules.default apple-silicon.nixosModules.apple-silicon-support
catppuccin.nixosModules.catppuccin
lix-module.nixosModules.default
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.youwen = {
imports = [
./users/youwen/common
./users/youwen/linux/laptop
./users/youwen/linux/packages/aarch-64
lanzaboote.nixosModules.lanzaboote inputs.catppuccin.homeManagerModules.catppuccin
];
home-manager.nixosModules.home-manager };
{ }
home-manager.useGlobalPkgs = true; ];
home-manager.useUserPackages = true; };
home-manager.backupFileExtension = "backup";
home-manager.users.youwen = {
imports = [
./modules/home-manager/linux/linux-home.nix
./modules/home-manager/linux/desktop.nix
./modules/home-manager/linux/programs.nix
./modules/home-manager/common/core.nix
./modules/home-manager/linux/catppuccin.nix
inputs.catppuccin.homeManagerModules.catppuccin
];
};
}
];
}; };
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixfmt; formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixfmt;
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.nixfmt;
# Build darwin flake using: # Build darwin flake using:
# $ darwin-rebuild build --flake .#Youwens-MacBook-Pro # $ darwin-rebuild build --flake .#Youwens-MacBook-Pro
darwinConfigurations."Youwens-MacBook-Pro" = nix-darwin.lib.darwinSystem { darwinConfigurations."Youwens-MacBook-Pro" = nix-darwin.lib.darwinSystem {
@ -86,8 +116,8 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.youwen.imports = [ home-manager.users.youwen.imports = [
./modules/home-manager/darwin/darwin-home.nix ./users/youwen/darwin/darwin-home.nix
./modules/home-manager/common/core.nix ./users/youwen/common/core.nix
]; ];
home-manager.backupFileExtension = "backup"; home-manager.backupFileExtension = "backup";

196
hosts/callisto/default.nix Executable file
View file

@ -0,0 +1,196 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, inputs, pkgs, ... }:
{
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
# ./apple-silicon-support
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
hardware.asahi = {
peripheralFirmwareDirectory = ./firmware;
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "overlay";
};
boot.extraModprobeConfig = ''
options hid_apple iso_layout=0
'';
boot.kernelParams = [ "apple_dcp.show_notch=1" ];
networking.hostName = "callisto"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.wireless.iwd = {
enable = true;
settings.General.EnableNetworkConfiguration = true;
};
nixpkgs.overlays = [ inputs.apple-silicon.overlays.apple-silicon-overlay ];
programs.light.enable = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
# networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = false;
programs.nix-ld = {
enable = true;
libraries = with pkgs; [ icu xorg.libXtst xorg.libXi ];
};
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "catppuccin-mocha";
package = pkgs.kdePackages.sddm;
};
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = [ "networkmanager" "wheel" "nixos" "realtime" ];
};
users.groups.realtime = { };
nix.settings = {
trusted-users = [ "root" "youwen" ];
experimental-features = [ "nix-command" "flakes" ];
};
services.udev.extraRules = ''
KERNEL=="cpu_dma_latency", GROUP="realtime"
'';
security.pam.loginLimits = [
{
domain = "@realtime";
type = "-";
item = "rtprio";
value = 98;
}
{
domain = "@realtime";
type = "-";
item = "memlock";
value = "unlimited";
}
{
domain = "@realtime";
type = "-";
item = "nice";
value = -11;
}
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim
wget
git
curl
# librewolf
# gnumake
# clang
# gcc
# cachix
# nodejs_22
# cargo
# rustc
# gnupg
# openssh
# python3
(pkgs.catppuccin-sddm.override { flavor = "mocha"; })
# steam-run
# # deps for neovim compilation
# lua51Packages.lua
# lua51Packages.luarocks
# tree-sitter
];
environment.variables = {
EDITOR = "nvim";
NIX_AUTO_RUN = 1;
};
# tells electron apps to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.dconf.enable = true;
programs.hyprland.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
programs.zsh.enable = false;
programs.fish.enable = true;
users.users.youwen.shell = pkgs.fish;
}

94
hosts/callisto/default.nix.bak Executable file
View file

@ -0,0 +1,94 @@
# Edit this configuration file to define what should be installed on your system. Help is available in the configuration.nix(5) man page, on https://search.nixos.org/options and in
# the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{ imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./apple-silicon-support
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = false;
hardware.asahi.peripheralFirmwareDirectory = ./firmware;
boot.extraModprobeConfig = ''
options hid_apple iso_layout=0
'';
networking.wireless.iwd = {
enable = true;
settings.General.EnableNetworkConfiguration = true;
};
networking.hostName = "callisto"; # Define your hostname. Pick only one of the below networking options. networking.wireless.enable = true; # Enables wireless support via
# wpa_supplicant. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
Set your time zone. time.timeZone = "America/Amsterdam";
# Configure network proxy if necessary networking.proxy.default = "http://user:password@proxy:port/"; networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16"; keyMap = "us"; useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system. services.xserver.enable = true;
# Configure keymap in X11 services.xserver.xkb.layout = "us"; services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents. services.printing.enable = true;
# Enable sound. hardware.pulseaudio.enable = true; OR services.pipewire = {
# enable = true; pulse.enable = true;
# };
# Enable touchpad support (enabled default in most desktopManager). services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd. users.users.alice = {
# isNormalUser = true; extraGroups = [ "wheel" ]; # Enable sudo for the user. packages = with pkgs; [
# firefox tree
# ];
# };
# List packages installed in system profile. To search, run: $ nix search wget environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget
# ];
# Some programs need SUID wrappers, can be configured further or are started in user sessions. programs.mtr.enable = true; programs.gnupg.agent = {
# enable = true; enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon. services.openssh.enable = true;
# Open ports in the firewall. networking.firewall.allowedTCPPorts = [ ... ]; networking.firewall.allowedUDPPorts = [ ... ]; Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system (/run/current-system/configuration.nix). This is useful in case you accidentally delete
# configuration.nix. system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine, and is used to maintain compatibility with application data (e.g. databases)
# created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason, even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from, so changing it will NOT upgrade your system - see
# https://nixos.org/manual/nixos/stable/#sec-upgrading for how to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "24.11"; # Did you read the comment?
}

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,35 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "usb_storage" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/bc88058e-6e3a-4987-b78e-e19cb5611608";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/852F-07F1";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View file

@ -2,24 +2,33 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, inputs, pkgs, ... }: { config, inputs, pkgs, lib, ... }:
{ {
# imports = [ # Include the results of the hardware scan. imports = [ # Include the results of the hardware scan.
# ./hardware-configuration.nix ./hardware-configuration.nix
# ]; ];
# Bootloader. # Bootloader.
boot.loader = { boot.loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
timeout = 15; timeout = 15;
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
systemd-boot = { systemd-boot = {
enable = true; enable = false;
consoleMode = "auto"; consoleMode = "auto";
}; };
}; };
networking.hostName = "nixos"; # Define your hostname. boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
networking.hostName = "demeter"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# select kernel # select kernel
@ -69,6 +78,20 @@
package = pkgs.kdePackages.sddm; package = pkgs.kdePackages.sddm;
}; };
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
};
hardware.graphics.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = [ "nvidia" ];
# services.desktopManager.plasma6.enable = true; # services.desktopManager.plasma6.enable = true;
# Configure keymap in X11 # Configure keymap in X11
@ -87,14 +110,41 @@
users.users.youwen = { users.users.youwen = {
isNormalUser = true; isNormalUser = true;
description = "Youwen Wu"; description = "Youwen Wu";
extraGroups = [ "networkmanager" "wheel" "nixos" ]; extraGroups = [ "networkmanager" "wheel" "nixos" "realtime" ];
}; };
users.groups.realtime = { };
nix.settings = { nix.settings = {
trusted-users = [ "root" "youwen" ]; trusted-users = [ "root" "youwen" ];
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
}; };
services.udev.extraRules = ''
KERNEL=="cpu_dma_latency", GROUP="realtime"
'';
security.pam.loginLimits = [
{
domain = "@realtime";
type = "-";
item = "rtprio";
value = 98;
}
{
domain = "@realtime";
type = "-";
item = "memlock";
value = "unlimited";
}
{
domain = "@realtime";
type = "-";
item = "nice";
value = -11;
}
];
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

View file

0
modules/darwin/darwin-configuration.nix Normal file → Executable file
View file

0
modules/darwin/homebrew.nix Normal file → Executable file
View file

0
modules/darwin/yabai.nix Normal file → Executable file
View file

View file

@ -1,55 +0,0 @@
{ pkgs, ... }: {
wayland.windowManager.hyprland = import ./hyprland-conf.nix;
# Audio effects and EQ tool
services.easyeffects.enable = true;
services.easyeffects.package = pkgs.easyeffects;
# Notification daemon
services.dunst = {
enable = true;
catppuccin.enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
size = "32x32";
};
};
# Currently non-functional
programs.wlogout.enable = true;
gtk = {
enable = true;
catppuccin.enable = true;
cursorTheme = {
name = "Bibata-Modern-Ice";
size = 26;
};
iconTheme = { name = "Papirus-Dark"; };
};
qt = {
enable = true;
platformTheme.name = "qtct";
style.name = "kvantum";
};
xdg.configFile = {
"Kvantum/kvantum.kvconfig".text = ''
[General]
theme=GraphiteNordDark
'';
"Kvantum/GraphiteNord".source =
"${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord";
};
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
theme = "gruvbox-dark";
};
programs.waybar = import ./waybar/waybar-conf.nix;
}

View file

@ -1,208 +0,0 @@
{
enable = true;
settings = {
exec-once = [ "waypaper --restore" ];
"$mod" = "SUPER";
"$Left" = "Y";
"$Right" = "O";
"$Up" = "I";
"$Down" = "U";
env = [
"HYPRCURSOR_THEME,Bibata-Modern-Ice"
"HYPRCURSOR_SIZE,26"
"XCURSOR_THEME,Bibata-Modern-Ice"
"XCURSOR_SIZE,26"
];
bind = [
# Application Keybinds
"$mod, F, exec, librewolf"
"$mod, T, exec, kitty"
"$mod, E, exec, dolphin"
"$mod, R, exec, pavucontrol"
# Window actions
"$mod, Q, killactive"
"$mod, W, togglefloating"
"$mod, J, togglesplit"
"$mod, Return, fullscreen"
# Move around
"$mod, $Left, movefocus, l"
"$mod, $Right, movefocus, r"
"$mod, $Up, movefocus, u"
"$mod, $Down, movefocus, d"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod, S, togglespecialworkspace"
# Move windows around
"$mod+Shift+Ctrl, $Left, movewindow, l"
"$mod+Shift+Ctrl, $Right, movewindow, r"
"$mod+Shift+Ctrl, $Up, movewindow, u"
"$mod+Shift+Ctrl, $Down, movewindow, d"
"$mod+Ctrl+Alt, $Right, movetoworkspace, r+1"
"$mod+Ctrl+Alt, $Left, movetoworkspace, r-1"
"$mod+Ctrl, $Right, workspace, r+1"
"$mod+Ctrl, $Left, workspace, r-1"
"$mod+Alt, S, movetoworkspacesilent, special"
# Utilities
"$mod, Space, exec, pkill -x rofi || rofi -show drun" # Run rofi
''$mod, P, exec, grim -g "$(slurp)" - | swappy -f -'' # Screenshot
"$mod, Backspace, exec, wlogout" # Screenshot
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod, Z, movewindow"
"$mod, X, resizewindow"
];
windowrulev2 = [
"opacity 0.90 0.90,class:^(librewolf)$"
"opacity 0.90 0.90,class:^(Brave-browser)$"
"opacity 0.80 0.80,class:^(Steam)$"
"opacity 0.80 0.80,class:^(steam)$"
"opacity 0.80 0.80,class:^(steamwebhelper)$"
"opacity 0.80 0.80,class:^(Spotify)$"
"opacity 0.80 0.80,initialTitle:^(Spotify Premium)$"
"opacity 0.80 0.80,initialTitle:^(Spotify Free)$"
"opacity 0.80 0.80,class:^(code-oss)$"
"opacity 0.80 0.80,class:^(Code)$"
"opacity 0.80 0.80,class:^(code-url-handler)$"
"opacity 0.80 0.80,class:^(code-insiders-url-handler)$"
"opacity 0.80 0.80,class:^(kitty)$"
"opacity 0.80 0.80,class:^(org.kde.dolphin)$"
"opacity 0.80 0.80,class:^(org.kde.ark)$"
"opacity 0.80 0.80,class:^(nwg-look)$"
"opacity 0.80 0.80,class:^(qt5ct)$"
"opacity 0.80 0.80,class:^(qt6ct)$"
"opacity 0.80 0.80,class:^(kvantummanager)$"
"opacity 0.90 0.90,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk"
"opacity 0.80 0.80,class:^(com.github.tchx84.Flatseal)$ # Flatseal-Gtk"
"opacity 0.80 0.80,class:^(hu.kramo.Cartridges)$ # Cartridges-Gtk"
"opacity 0.80 0.80,class:^(com.obsproject.Studio)$ # Obs-Qt"
"opacity 0.80 0.80,class:^(gnome-boxes)$ # Boxes-Gtk"
"opacity 0.80 0.80,class:^(discord)$ # Discord-Electron"
"opacity 0.80 0.80,class:^(vesktop)$ # Vesktop-Electron"
"opacity 0.80 0.80,class:^(ArmCord)$ # ArmCord-Electron"
"opacity 0.80 0.80,class:^(app.drey.Warp)$ # Warp-Gtk"
"opacity 0.80 0.80,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt"
"opacity 0.80 0.80,class:^(yad)$ # Protontricks-Gtk"
"opacity 0.80 0.80,class:^(signal)$ # Signal-Gtk"
"opacity 0.80 0.80,class:^(io.github.alainm23.planify)$ # planify-Gtk"
"opacity 0.80 0.80,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk"
"opacity 0.80 0.80,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gtk"
"opacity 0.80 0.80,class:^(lutris)$ # Lutris game launcher"
"opacity 0.80 0.70,class:^(pavucontrol)$"
"opacity 0.80 0.70,class:^(blueman-manager)$"
"opacity 0.80 0.70,class:^(nm-applet)$"
"opacity 0.80 0.70,class:^(nm-connection-editor)$"
"opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$"
"float,class:^(org.kde.dolphin)$,title:^(Progress Dialog Dolphin)$"
"float,class:^(org.kde.dolphin)$,title:^(Copying Dolphin)$"
"float,title:^(Picture-in-Picture)$"
"float,class:^(librewolf)$,title:^(Library)$"
"float,class:^(vlc)$"
"float,class:^(kvantummanager)$"
"float,class:^(qt5ct)$"
"float,class:^(qt6ct)$"
"float,class:^(nwg-look)$"
"float,class:^(org.kde.ark)$"
"float,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk"
"float,class:^(app.drey.Warp)$ # Warp-Gtk"
"float,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt"
"float,class:^(yad)$ # Protontricks-Gtk"
"float,class:^(eog)$ # Imageviewer-Gtk"
"float,class:^(io.github.alainm23.planify)$ # planify-Gtk"
"float,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk"
"float,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gkk"
"float,class:^(pavucontrol)$"
"float,class:^(blueman-manager)$"
"float,class:^(nm-applet)$"
"float,class:^(nm-connection-editor)$"
"float,class:^(org.kde.polkit-kde-authentication-agent-1)$"
"opacity 0.80 0.80,class:^(org.freedesktop.impl.portal.desktop.gtk)$"
"opacity 0.80 0.80,class:^(org.freedesktop.impl.portal.desktop.hyprland)$"
];
layerrule = [
"blur,rofi"
"ignorezero,rofi"
"blur,notifications"
"ignorezero,notifications"
"blur,swaync-notification-window"
"ignorezero,swaync-notification-window"
"blur,swaync-control-center"
"ignorezero,swaync-control-center"
"blur,logout_dialog"
];
monitor =
[ "DP-1,2560x1440@165,1920x0,auto" "HDMI-A-1,1920x1080@60,0x0,1" ];
dwindle = {
pseudotile = "yes";
preserve_split = "yes";
};
animations = {
enabled = "yes";
bezier = [
"wind, 0.05, 0.9, 0.1, 1.05"
"winIn, 0.1, 1.1, 0.1, 1.1"
"winOut, 0.3, -0.3, 0, 1"
"liner, 1, 1, 1, 1"
];
animation = [
"windows, 1, 6, wind, slide"
"windowsIn, 1, 6, winIn, slide"
"windowsOut, 1, 5, winOut, slide"
"windowsMove, 1, 5, wind, slide"
"border, 1, 1, liner"
"borderangle, 1, 30, liner, loop"
"fade, 1, 10, default"
"workspaces, 1, 5, wind"
];
};
general = {
gaps_in = "3";
gaps_out = "8";
border_size = "2";
#
# the dot is a hyprland name, not nix syntax, so we escape it
"col.active_border" = "rgba(ca9ee6ff) rgba(f2d5cfff) 45deg";
"col.inactive_border" = "rgba(b4befecc) rgba(6c7086cc) 45deg";
layout = "dwindle";
resize_on_border = "true";
sensitivity = "0.5";
};
decoration = {
rounding = "10";
drop_shadow = "false";
dim_special = "0.3";
blur = {
enabled = "yes";
size = "6";
passes = "3";
new_optimizations = "on";
ignore_opacity = "on";
xray = "false";
special = true;
};
};
};
}

View file

@ -1,89 +0,0 @@
{
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 24;
width = 1600;
reload-style-on-change = true;
margin = "10px 0px 0px 0px";
modules-left = [ "hyprland/window" "hyprland/workspaces" ];
modules-right = [ "backlight" "group/adjustable" "custom/weather" ];
modules-center = [ "network" "group/hardware" "clock" ];
"hyprland/workspaces" = {
active-only = false;
all-outputs = false;
format = "{icon}";
persistent-workspaces = {
eDP-1 = [ 1 ];
DP-1 = [ 2 3 4 5 ];
};
};
"group/hardware" = {
orientation = "inherit";
modules = [ "cpu" "memory" "battery" ];
};
"group/adjustable" = {
orientation = "inherit";
drawer = {
transition-duration = 500;
transition-left-to-right = true;
};
modules = [ "pulseaudio" "mpris" ];
};
"custom/weather" = {
orientation = "horizontal";
exec = ''curl wttr.in/?format="%l:%20%t"'';
interval = 10;
};
cpu = {
interval = 10;
format = "{usage}% ";
};
memory = {
interval = 10;
format = "{percentage}% ";
};
# mpris = {
# format-playing = "  {title} ";
# format-paused = " 󰏤 {title} ";
# format-stopped = "Nothing Playing";
# };
tray = { spacing = 10; };
clock = { format = "{:%a %b %d, %I:%M %p} "; };
backlight = {
device = "intel_backlight";
format = "{percent}% {icon}";
format-icons = [ "󰃞" "󰃠" ];
};
battery = {
states = {
good = 95;
warning = 20;
critical = 10;
};
format = "{capacity}% {icon}";
format-icons = [ "󰁻" "󰁽" "󰁿" "󰂀" "󰁹" ];
};
"hyprland/window" = { format = "{class}"; };
network = {
format-wifi = "{essid} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
pulseaudio = {
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
format-icons = { default = [ "" "" "" ]; };
};
};
};
style = ./waybar.css;
systemd.enable = true;
}

View file

View file

@ -22,6 +22,10 @@
libvorbis libvorbis
stdenv.cc.cc.lib stdenv.cc.cc.lib
libkrb5 libkrb5
(writeShellScriptBin "launch-gamescope" ''
(sleep 1; pgrep gamescope| xargs renice -n -11 -p)&
exec gamescope "$@"
'')
keyutils keyutils
]; ];
}; };

View file

View file

@ -1,15 +0,0 @@
{ config, ... }: {
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
};
hardware.graphics.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = [ "nvidia" ];
}

View file

@ -1,17 +0,0 @@
({ pkgs, lib, ... }: {
environment.systemPackages = [
# For debugging and troubleshooting Secure Boot.
pkgs.sbctl
];
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
})

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { { pkgs, ... }: {
programs.bash.enable = pkgs.lib.mkDefault true; programs.bash.enable = true;
programs.nushell = pkgs.lib.mkDefault { programs.nushell = {
enable = true; enable = true;
configFile.text = '' configFile.text = ''
$env.config = { $env.config = {
@ -10,21 +10,21 @@
''; '';
}; };
programs.fzf = pkgs.lib.mkDefault { enable = true; }; programs.fzf = { enable = true; };
programs.git = pkgs.lib.mkDefault { programs.git = {
enable = true; enable = true;
userName = "Youwen Wu"; userName = "Youwen Wu";
userEmail = "youwenw@gmail.com"; userEmail = "youwenw@gmail.com";
delta.enable = true; delta.enable = true;
extraConfig = { extraConfig = {
init.defaultBranch = "main"; init.defaultBranch = "main";
commit.gpgsign = "true"; commit.gpgsign = pkgs.lib.mkDefault "true";
user.signingkey = "8F5E6C1AF90976CA7102917A865658ED1FE61EC3"; user.signingkey = "8F5E6C1AF90976CA7102917A865658ED1FE61EC3";
}; };
}; };
programs.lazygit = pkgs.lib.mkDefault { programs.lazygit = {
enable = true; enable = true;
settings = { settings = {
git.paging = { git.paging = {
@ -34,28 +34,28 @@
}; };
}; };
programs.bat.enable = pkgs.lib.mkDefault true; programs.bat.enable = true;
programs.ripgrep.enable = pkgs.lib.mkDefault true; programs.ripgrep.enable = true;
programs.readline = { programs.readline = {
enable = true; enable = true;
extraConfig = "set editing-mode vi"; extraConfig = "set editing-mode vi";
}; };
programs.zoxide = pkgs.lib.mkDefault { programs.zoxide = {
enable = true; enable = true;
# enableZshIntegration = true; # enableZshIntegration = true;
enableFishIntegration = true; enableFishIntegration = true;
enableNushellIntegration = true; enableNushellIntegration = true;
}; };
programs.gh = pkgs.lib.mkDefault { programs.gh = {
enable = true; enable = true;
extensions = [ pkgs.github-copilot-cli ]; extensions = [ pkgs.github-copilot-cli ];
}; };
programs.oh-my-posh = pkgs.lib.mkDefault { programs.oh-my-posh = {
enable = true; enable = true;
# enableZshIntegration = true; # enableZshIntegration = true;
enableFishIntegration = true; enableFishIntegration = true;
@ -124,9 +124,9 @@
]; ];
}; };
programs.fd.enable = pkgs.lib.mkDefault true; programs.fd.enable = true;
programs.btop = pkgs.lib.mkDefault { programs.btop = {
enable = true; enable = true;
settings = { settings = {
color_theme = "tokyo-night"; color_theme = "tokyo-night";
@ -135,13 +135,13 @@
}; };
}; };
programs.eza = pkgs.lib.mkDefault { programs.eza = {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
enableBashIntegration = true; enableBashIntegration = true;
}; };
programs.neovim = pkgs.lib.mkDefault { programs.neovim = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
viAlias = true; viAlias = true;

View file

@ -0,0 +1 @@
{ imports = [ ./core.nix ]; }

View file

View file

@ -19,8 +19,7 @@
# xxx # xxx
# ''; # '';
home.file.".config/neofetch/config.conf".source = home.file.".config/neofetch/config.conf".source = ../common/neofetch.conf;
../../../config/neofetch.conf;
# Packages that should be installed to the user profile. # Packages that should be installed to the user profile.
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -0,0 +1,10 @@
{
imports = [
../theming
../home.nix
../programs
../hyprland/desktop
../waybar/desktop
];
}

View file

@ -19,69 +19,11 @@
# xxx # xxx
# ''; # '';
home.file.".config/neofetch/config.conf".source = home.file.".config/neofetch/config.conf".source = ../common/neofetch.conf;
../../../config/neofetch.conf;
home.file.".wallpapers" = { home.file.".wallpapers" = {
source = ../../../wallpapers; source = ../../../wallpapers;
recursive = true; recursive = true;
}; };
# Packages that should be installed to the user profile.
home.packages = with pkgs; [
neofetch
# archives
zip
xz
unzip
p7zip
# utils
nurl # helps fetch git data for nixpkgs
# nix related
#
# it provides the command `nom` works just like `nix`
# with more details log output
nix-output-monitor
# system tools
pciutils # lspci
usbutils # lsusb
# desktop utils
wl-clipboard
grim
slurp
swappy
pavucontrol
swww
waypaper
# desktop apps
dolphin
bitwarden-desktop
thunderbird
spotify
vesktop
signal-desktop
modrinth-app
lutris
wine
# dev tools
nodePackages_latest.pnpm
rustfmt
rust-analyzer
# desktop ricing
bibata-cursors
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct
papirus-icon-theme
libsForQt5.qt5ct
];
# This value determines the home Manager release that your # This value determines the home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
# when a new home Manager release introduces backwards # when a new home Manager release introduces backwards
@ -92,6 +34,29 @@
# the home Manager release notes for a list of state version # the home Manager release notes for a list of state version
# changes in each release. # changes in each release.
# Audio effects and EQ tool
services.easyeffects.enable = true;
services.easyeffects.package = pkgs.easyeffects;
# Notification daemon
services.dunst = {
enable = true;
catppuccin.enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
size = "32x32";
};
};
# Currently non-functional
programs.wlogout.enable = true;
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
theme = "gruvbox-dark";
};
# Let home Manager install and manage itself. # Let home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }

View file

@ -0,0 +1,210 @@
{
wayland.windowManager.hyprland = {
enable = true;
settings = {
exec-once = [ "waypaper --restore" ];
"$mod" = "SUPER";
"$Left" = "Y";
"$Right" = "O";
"$Up" = "I";
"$Down" = "U";
env = [
"HYPRCURSOR_THEME,Bibata-Modern-Ice"
"HYPRCURSOR_SIZE,26"
"XCURSOR_THEME,Bibata-Modern-Ice"
"XCURSOR_SIZE,26"
];
bind = [
# Application Keybinds
"$mod, F, exec, librewolf"
"$mod, T, exec, kitty"
"$mod, E, exec, dolphin"
"$mod, R, exec, pavucontrol"
# Window actions
"$mod, Q, killactive"
"$mod, W, togglefloating"
"$mod, J, togglesplit"
"$mod, Return, fullscreen"
# Move around
"$mod, $Left, movefocus, l"
"$mod, $Right, movefocus, r"
"$mod, $Up, movefocus, u"
"$mod, $Down, movefocus, d"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod, S, togglespecialworkspace"
# Move windows around
"$mod+Shift+Ctrl, $Left, movewindow, l"
"$mod+Shift+Ctrl, $Right, movewindow, r"
"$mod+Shift+Ctrl, $Up, movewindow, u"
"$mod+Shift+Ctrl, $Down, movewindow, d"
"$mod+Ctrl+Alt, $Right, movetoworkspace, r+1"
"$mod+Ctrl+Alt, $Left, movetoworkspace, r-1"
"$mod+Ctrl, $Right, workspace, r+1"
"$mod+Ctrl, $Left, workspace, r-1"
"$mod+Alt, S, movetoworkspacesilent, special"
# Utilities
"$mod, Space, exec, pkill -x rofi || rofi -show drun" # Run rofi
''$mod, P, exec, grim -g "$(slurp)" - | swappy -f -'' # Screenshot
"$mod, Backspace, exec, wlogout" # Screenshot
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod, Z, movewindow"
"$mod, X, resizewindow"
];
windowrulev2 = [
"opacity 0.90 0.90,class:^(librewolf)$"
"opacity 0.90 0.90,class:^(Brave-browser)$"
"opacity 0.80 0.80,class:^(Steam)$"
"opacity 0.80 0.80,class:^(steam)$"
"opacity 0.80 0.80,class:^(steamwebhelper)$"
"opacity 0.80 0.80,class:^(Spotify)$"
"opacity 0.80 0.80,initialTitle:^(Spotify Premium)$"
"opacity 0.80 0.80,initialTitle:^(Spotify Free)$"
"opacity 0.80 0.80,class:^(code-oss)$"
"opacity 0.80 0.80,class:^(Code)$"
"opacity 0.80 0.80,class:^(code-url-handler)$"
"opacity 0.80 0.80,class:^(code-insiders-url-handler)$"
"opacity 0.80 0.80,class:^(kitty)$"
"opacity 0.80 0.80,class:^(org.kde.dolphin)$"
"opacity 0.80 0.80,class:^(org.kde.ark)$"
"opacity 0.80 0.80,class:^(nwg-look)$"
"opacity 0.80 0.80,class:^(qt5ct)$"
"opacity 0.80 0.80,class:^(qt6ct)$"
"opacity 0.80 0.80,class:^(kvantummanager)$"
"opacity 0.90 0.90,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk"
"opacity 0.80 0.80,class:^(com.github.tchx84.Flatseal)$ # Flatseal-Gtk"
"opacity 0.80 0.80,class:^(hu.kramo.Cartridges)$ # Cartridges-Gtk"
"opacity 0.80 0.80,class:^(com.obsproject.Studio)$ # Obs-Qt"
"opacity 0.80 0.80,class:^(gnome-boxes)$ # Boxes-Gtk"
"opacity 0.80 0.80,class:^(discord)$ # Discord-Electron"
"opacity 0.80 0.80,class:^(vesktop)$ # Vesktop-Electron"
"opacity 0.80 0.80,class:^(ArmCord)$ # ArmCord-Electron"
"opacity 0.80 0.80,class:^(app.drey.Warp)$ # Warp-Gtk"
"opacity 0.80 0.80,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt"
"opacity 0.80 0.80,class:^(yad)$ # Protontricks-Gtk"
"opacity 0.80 0.80,class:^(signal)$ # Signal-Gtk"
"opacity 0.80 0.80,class:^(io.github.alainm23.planify)$ # planify-Gtk"
"opacity 0.80 0.80,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk"
"opacity 0.80 0.80,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gtk"
"opacity 0.80 0.80,class:^(lutris)$ # Lutris game launcher"
"opacity 0.80 0.70,class:^(pavucontrol)$"
"opacity 0.80 0.70,class:^(blueman-manager)$"
"opacity 0.80 0.70,class:^(nm-applet)$"
"opacity 0.80 0.70,class:^(nm-connection-editor)$"
"opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$"
"float,class:^(org.kde.dolphin)$,title:^(Progress Dialog Dolphin)$"
"float,class:^(org.kde.dolphin)$,title:^(Copying Dolphin)$"
"float,title:^(Picture-in-Picture)$"
"float,class:^(librewolf)$,title:^(Library)$"
"float,class:^(vlc)$"
"float,class:^(kvantummanager)$"
"float,class:^(qt5ct)$"
"float,class:^(qt6ct)$"
"float,class:^(nwg-look)$"
"float,class:^(org.kde.ark)$"
"float,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk"
"float,class:^(app.drey.Warp)$ # Warp-Gtk"
"float,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt"
"float,class:^(yad)$ # Protontricks-Gtk"
"float,class:^(eog)$ # Imageviewer-Gtk"
"float,class:^(io.github.alainm23.planify)$ # planify-Gtk"
"float,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk"
"float,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gkk"
"float,class:^(pavucontrol)$"
"float,class:^(blueman-manager)$"
"float,class:^(nm-applet)$"
"float,class:^(nm-connection-editor)$"
"float,class:^(org.kde.polkit-kde-authentication-agent-1)$"
"opacity 0.80 0.80,class:^(org.freedesktop.impl.portal.desktop.gtk)$"
"opacity 0.80 0.80,class:^(org.freedesktop.impl.portal.desktop.hyprland)$"
];
layerrule = [
"blur,rofi"
"ignorezero,rofi"
"blur,notifications"
"ignorezero,notifications"
"blur,swaync-notification-window"
"ignorezero,swaync-notification-window"
"blur,swaync-control-center"
"ignorezero,swaync-control-center"
"blur,logout_dialog"
];
monitor =
[ "DP-1,2560x1440@165,1920x0,auto" "HDMI-A-1,1920x1080@60,0x0,1" ];
dwindle = {
pseudotile = "yes";
preserve_split = "yes";
};
animations = {
enabled = "yes";
bezier = [
"wind, 0.05, 0.9, 0.1, 1.05"
"winIn, 0.1, 1.1, 0.1, 1.1"
"winOut, 0.3, -0.3, 0, 1"
"liner, 1, 1, 1, 1"
];
animation = [
"windows, 1, 6, wind, slide"
"windowsIn, 1, 6, winIn, slide"
"windowsOut, 1, 5, winOut, slide"
"windowsMove, 1, 5, wind, slide"
"border, 1, 1, liner"
"borderangle, 1, 30, liner, loop"
"fade, 1, 10, default"
"workspaces, 1, 5, wind"
];
};
general = {
gaps_in = "3";
gaps_out = "8";
border_size = "2";
#
# the dot is a hyprland name, not nix syntax, so we escape it
"col.active_border" = "rgba(ca9ee6ff) rgba(f2d5cfff) 45deg";
"col.inactive_border" = "rgba(b4befecc) rgba(6c7086cc) 45deg";
layout = "dwindle";
resize_on_border = "true";
sensitivity = "0.5";
};
decoration = {
rounding = "10";
drop_shadow = "false";
dim_special = "0.3";
blur = {
enabled = "yes";
size = "6";
passes = "3";
new_optimizations = "on";
ignore_opacity = "on";
xray = "false";
special = true;
};
};
};
};
}

View file

@ -0,0 +1 @@
{ imports = [ ../common.nix ]; }

View file

@ -0,0 +1,18 @@
{ lib, ... }:
{
imports = [ ../common.nix ];
wayland.windowManager.hyprland.settings.input.touchpad = {
natural_scroll = true;
disable_while_typing = true;
clickfinger_behavior = true;
tap-to-click = false;
scroll_factor = 0.5;
};
wayland.windowManager.hyprland.settings.general.sensitivity = lib.mkForce 1.0;
wayland.windowManager.hyprland.settings.env = [
"HYPRCURSOR_THEME,Bibata-Modern-Ice"
"HYPRCURSOR_SIZE,24"
"XCURSOR_THEME,Bibata-Modern-Ice"
"XCURSOR_SIZE,24"
];
}

View file

@ -0,0 +1,14 @@
{ pkgs, ... }:
{
imports = [
../theming
../home.nix
../programs
../hyprland/laptop
../waybar/laptop
];
# some overrides for laptop specifically
programs.kitty.settings.font_size = pkgs.lib.mkForce 11;
}

View file

@ -0,0 +1,3 @@
{ pkgs, ... }:
let createCommon = import ../common-packages.nix;
in { home.packages = ((createCommon pkgs) ++ [ ]); }

View file

@ -0,0 +1,50 @@
pkgs:
with pkgs; [
neofetch
# archives
zip
xz
unzip
p7zip
# utils
nurl # helps fetch git data for nixpkgs
# nix related
#
# it provides the command `nom` works just like `nix`
# with more details log output
nix-output-monitor
# system tools
pciutils # lspci
usbutils # lsusb
# desktop utils
wl-clipboard
grim
slurp
swappy
pavucontrol
swww
waypaper
# desktop apps
dolphin
thunderbird
vesktop
signal-desktop
# dev tools
nodePackages_latest.pnpm
rustfmt
rust-analyzer
# desktop ricing
bibata-cursors
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct
papirus-icon-theme
libsForQt5.qt5ct
]

View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
let createCommon = import ../common-packages.nix;
in {
home.packages = ((createCommon pkgs) ++ (with pkgs; [
spotify
bitwarden-desktop
modrinth-app
lutris
wine
sbctl
]));
}

View file

@ -0,0 +1,30 @@
{ pkgs, ... }: {
imports = [ ./catppuccin.nix ];
gtk = {
enable = true;
catppuccin.enable = true;
cursorTheme = {
name = "Bibata-Modern-Ice";
size = 26;
};
iconTheme = { name = "Papirus-Dark"; };
};
qt = {
enable = true;
platformTheme.name = "qtct";
style.name = "kvantum";
};
xdg.configFile = {
"Kvantum/kvantum.kvconfig".text = ''
[General]
theme=GraphiteNordDark
'';
"Kvantum/GraphiteNord".source =
"${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord";
};
}

View file

@ -0,0 +1,91 @@
{
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 24;
width = 1600;
reload-style-on-change = true;
margin = "10px 0px 0px 0px";
modules-left = [ "hyprland/window" "hyprland/workspaces" ];
modules-right = [ "backlight" "group/adjustable" "custom/weather" ];
modules-center = [ "network" "group/hardware" "clock" ];
"hyprland/workspaces" = {
active-only = false;
all-outputs = false;
format = "{icon}";
persistent-workspaces = {
eDP-1 = [ 1 ];
DP-1 = [ 2 3 4 5 ];
};
};
"group/hardware" = {
orientation = "inherit";
modules = [ "cpu" "memory" "battery" ];
};
"group/adjustable" = {
orientation = "inherit";
drawer = {
transition-duration = 500;
transition-left-to-right = true;
};
modules = [ "pulseaudio" "mpris" ];
};
"custom/weather" = {
orientation = "horizontal";
exec = ''curl wttr.in/?format="%l:%20%t"'';
interval = 10;
};
cpu = {
interval = 10;
format = "{usage}% ";
};
memory = {
interval = 10;
format = "{percentage}% ";
};
# mpris = {
# format-playing = "  {title} ";
# format-paused = " 󰏤 {title} ";
# format-stopped = "Nothing Playing";
# };
tray = { spacing = 10; };
clock = { format = "{:%a %b %d, %I:%M %p} "; };
backlight = {
device = "intel_backlight";
format = "{percent}% {icon}";
format-icons = [ "󰃞" "󰃠" ];
};
battery = {
states = {
good = 95;
warning = 20;
critical = 10;
};
format = "{capacity}% {icon}";
format-icons = [ "󰁻" "󰁽" "󰁿" "󰂀" "󰁹" ];
};
"hyprland/window" = { format = "{class}"; };
network = {
format-wifi = "{essid} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
pulseaudio = {
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
format-icons = { default = [ "" "" "" ]; };
};
};
};
style = ./waybar.css;
systemd.enable = true;
};
}

View file

@ -0,0 +1,93 @@
{
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 24;
# width = 1000;
reload-style-on-change = true;
margin = "5px 0px 0px 0px";
modules-left =
[ "hyprland/window" "hyprland/workspaces" "network" "clock" ];
modules-right =
[ "group/hardware" "backlight" "group/adjustable" "custom/weather" ];
# modules-center = [ "network" "group/hardware" "clock" ];
"hyprland/workspaces" = {
active-only = false;
all-outputs = false;
format = "{icon}";
persistent-workspaces = {
eDP-1 = [ 1 ];
DP-1 = [ 2 3 4 5 ];
};
};
"group/hardware" = {
orientation = "inherit";
modules = [ "cpu" "battery" ];
};
"group/adjustable" = {
orientation = "inherit";
drawer = {
transition-duration = 500;
transition-left-to-right = true;
};
modules = [ "pulseaudio" "mpris" ];
};
"custom/weather" = {
orientation = "horizontal";
exec = ''curl wttr.in/?format="%l:%20%t"'';
interval = 10;
};
cpu = {
interval = 10;
format = "{usage}% ";
};
memory = {
interval = 10;
format = "{percentage}% ";
};
# mpris = {
# format-playing = "  {title} ";
# format-paused = " 󰏤 {title} ";
# format-stopped = "Nothing Playing";
# };
tray = { spacing = 10; };
clock = { format = "{:%a %b %d, %I:%M %p} "; };
backlight = {
device = "intel_backlight";
format = "{percent}% {icon}";
format-icons = [ "󰃞" "󰃠" ];
};
battery = {
states = {
good = 95;
warning = 20;
critical = 10;
};
format = "{capacity}% {icon}";
format-icons = [ "󰁻" "󰁽" "󰁿" "󰂀" "󰁹" ];
};
"hyprland/window" = { format = "{class}"; };
network = {
format-wifi = "{essid} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
pulseaudio = {
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
format-icons = { default = [ "" "" "" ]; };
};
};
};
style = ./waybar.css;
systemd.enable = true;
};
}

View file

@ -0,0 +1,108 @@
* {
font-size: 12px;
}
window#waybar {
border-bottom: 0px solid #ffffff;
background: transparent;
transition-property: none;
transition-duration: 0s;
}
#workspaces {
background: #24273a;
padding: 0px 5px 0px 5px;
margin: 0px 0px 0px 2px;
border-radius: 5px;
}
#workspaces {
background: #24273a;
padding: 0px 5px 0px 5px;
margin: 0px 0px 0px 2px;
border-radius: 5px;
}
#workspaces button,
#workspaces button:hover {
padding: 0;
background-color: #24273a;
/* color: @color4; */
}
#workspaces button.active,
#workspaces button:hover {
/* color: @color8; */
}
#clock,
#pulseaudio,
#network,
#battery,
#tray,
#mpris,
#cpu,
#memory,
#temperature,
#custom-weather,
#window,
#backlight {
background-color: #24273a;
/* color: @color4; */
opacity: 1;
border-radius: 5px;
padding: 1px 10px 1px 10px;
margin: 0px 5px 0px 0px;
}
#backlight {
margin-right: 0px;
padding-right: 3px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
#network {
margin-left: 15px;
padding-right: 15px;
}
#mpris {
padding-left: 0px;
margin-left: 0px;
margin-right: 5px;
padding-right: 0px;
}
#pulseaudio {
padding-left: 5px;
padding-right: 5px;
margin-left: 0px;
margin-right: 5px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
#memory,
#cpu {
padding-right: 2px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
border-right-width: 0px;
}
#memory,
#battery {
margin-left: 0px;
padding-left: 2px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border-left-width: 0px;
}
#cpu {
margin-right: 0px;
}
#battery {
padding-right: 13px;
}
#custom-weather {
margin-right: 10px;
}
#window {
margin-right: 10px;
margin-left: 10px;
}

0
wallpapers/aesthetic/ign_colorful.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

0
wallpapers/anime/frieren.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 9.6 MiB

After

Width:  |  Height:  |  Size: 9.6 MiB

0
wallpapers/anime/kudou-chitose-normal.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 633 KiB

After

Width:  |  Height:  |  Size: 633 KiB

0
wallpapers/anime/kudou-chitose-violet.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

0
wallpapers/anime/nixos-sus-anime-wallpaper.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 3 MiB

After

Width:  |  Height:  |  Size: 3 MiB

0
wallpapers/anime/nixos-sus-anime.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 529 KiB

After

Width:  |  Height:  |  Size: 529 KiB

0
wallpapers/cityscapes/yellow_kyoto.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 11 MiB

After

Width:  |  Height:  |  Size: 11 MiB

0
wallpapers/nixos/nix-neon.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

0
wallpapers/nixos/nix-wallpaper.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

0
wallpapers/nixos/nixos-ascii.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

0
wallpapers/nixos/nixos-declarative.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 235 KiB

After

Width:  |  Height:  |  Size: 235 KiB

0
wallpapers/nixos/nixos-everforest.webp Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

0
wallpapers/nixos/nixos-hm.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View file

Before

Width:  |  Height:  |  Size: 376 KiB

After

Width:  |  Height:  |  Size: 376 KiB

0
wallpapers/retro/commodore.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 457 KiB

After

Width:  |  Height:  |  Size: 457 KiB