Initialize new config
This commit is contained in:
commit
3aeb697621
5941
flake.lock
generated
Normal file
5941
flake.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
211
flake.nix
Normal file
211
flake.nix
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
{
|
||||||
|
description = "PandOS";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
|
||||||
|
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||||
|
nix-index-database = {
|
||||||
|
url = "github:Mic92/nix-index-database";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nix-inspect.url = "github:bluskript/nix-inspect";
|
||||||
|
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
||||||
|
nixos-generators = {
|
||||||
|
url = "github:nix-community/nixos-generators";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||||||
|
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||||
|
nixvim = {
|
||||||
|
url = "github:nix-community/nixvim";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nur = {
|
||||||
|
url = "github:nix-community/NUR";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nvf.url = "github:notashelf/nvf";
|
||||||
|
quadlet-nix = {
|
||||||
|
url = "github:SEIAROTg/quadlet-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
raspberry-pi-nix.url = "github:nix-community/raspberry-pi-nix";
|
||||||
|
sops-nix = {
|
||||||
|
url = "github:Mic92/sops-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
aaru = {
|
||||||
|
url = "github:Whovian9369/aaru-nix-flake";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nix-game-preservation = {
|
||||||
|
url = "github:Whovian9369/nix-game-preservation";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
rom-properties = {
|
||||||
|
url = "github:Whovian9369/rom-properties-nix-flake";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
jovian = {
|
||||||
|
url = "github:Jovian-Experiments/Jovian-NixOS";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
wayland-pipewire-idle-inhibit = {
|
||||||
|
url = "github:rafaelrc7/wayland-pipewire-idle-inhibit";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix-citizen = {
|
||||||
|
url = "github:LovingMelody/nix-citizen";
|
||||||
|
inputs.nix-gaming.follows = "nix-gaming";
|
||||||
|
};
|
||||||
|
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||||
|
nix-proton-cachyos.url = "github:kimjongbing/nix-proton-cachyos";
|
||||||
|
openmw-nix = {
|
||||||
|
url = "git+https://codeberg.org/PopeRigby/openmw-nix.git";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
auto-cpufreq = {
|
||||||
|
url = "github:AdnanHodzic/auto-cpufreq";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
cd-ls = {
|
||||||
|
url = "github:zshzoo/cd-ls";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
nsearch = {
|
||||||
|
url = "github:niksingh710/nsearch";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
steamtinkerlaunch-master = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/sonic2kk/steamtinkerlaunch.git";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
ucodenix.url = "github:e-tho/ucodenix";
|
||||||
|
|
||||||
|
# Theming
|
||||||
|
catppuccin = {
|
||||||
|
url = "github:catppuccin/nix";
|
||||||
|
};
|
||||||
|
catppuccin-ghostwriter = {
|
||||||
|
url = "github:catppuccin/ghostwriter";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-halloy = {
|
||||||
|
url = "github:catppuccin/halloy";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-heroic = {
|
||||||
|
url = "github:catppuccin/heroic";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-kitty = {
|
||||||
|
url = "github:catppuccin/kitty";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-obs = {
|
||||||
|
url = "github:catppuccin/obs";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-powershell = {
|
||||||
|
url = "github:catppuccin/powershell";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-xresources = {
|
||||||
|
url = "github:catppuccin/xresources";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
catppuccin-zen = {
|
||||||
|
url = "github:IAmJafeth/zen-browser";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
lightly.url = "github:Bali10050/Darkly";
|
||||||
|
#stylix.url = "github:danth/stylix";
|
||||||
|
|
||||||
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
|
||||||
|
# KDE
|
||||||
|
kwin-effects-forceblur = {
|
||||||
|
url = "github:taj-ny/kwin-effects-forceblur";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
kwin-effects-kinetic = {
|
||||||
|
url = "github:gurrgur/kwin-effects-kinetic";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
outputs =
|
||||||
|
{ nixpkgs, home-manager, ... }@inputs:
|
||||||
|
{
|
||||||
|
|
||||||
|
nixosConfigurations =
|
||||||
|
let
|
||||||
|
username = "ryan";
|
||||||
|
vars = {
|
||||||
|
desktop = true;
|
||||||
|
gaming = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Desktop
|
||||||
|
thalia = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs username;
|
||||||
|
vars = vars;
|
||||||
|
};
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
|
||||||
|
./hosts/thalia
|
||||||
|
|
||||||
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
|
# inputs.chaotic.nixosModules.default
|
||||||
|
# inputs.disko.nixosModules.disko
|
||||||
|
# ./hosts/desktop/disko.nix
|
||||||
|
# { _module.args.disks = [ "/dev/disk/by-id/nvme-CT2000T700SSD3_2413E8A197BB" ]; }
|
||||||
|
#inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
|
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||||
|
inputs.nur.modules.nixos.default
|
||||||
|
inputs.quadlet-nix.nixosModules.quadlet
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
inputs.ucodenix.nixosModules.default
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
backupFileExtension = "hmbak";
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs vars username;
|
||||||
|
};
|
||||||
|
sharedModules = with inputs; [
|
||||||
|
catppuccin.homeManagerModules.catppuccin
|
||||||
|
nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
|
nix-index-database.hmModules.nix-index
|
||||||
|
nixvim.homeManagerModules.nixvim
|
||||||
|
nur.modules.homeManager.default
|
||||||
|
quadlet-nix.homeManagerModules.quadlet
|
||||||
|
nvf.homeManagerModules.default
|
||||||
|
sops-nix.homeManagerModules.sops
|
||||||
|
wayland-pipewire-idle-inhibit.homeModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
164
hosts/orion/default.nix
Normal file
164
hosts/orion/default.nix
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
host,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# System
|
||||||
|
# ./disko.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
# ./impermanence.nix
|
||||||
|
# Profiles
|
||||||
|
../../modules
|
||||||
|
# Users
|
||||||
|
../../users
|
||||||
|
];
|
||||||
|
|
||||||
|
# Users
|
||||||
|
ryan.enable = true;
|
||||||
|
pvi.enable = true;
|
||||||
|
|
||||||
|
# Custom modules
|
||||||
|
unfree.enable = true;
|
||||||
|
desktop.enable = true;
|
||||||
|
desktop.hostMonitorSettings = "
|
||||||
|
monitor = , preferred, auto, 1
|
||||||
|
";
|
||||||
|
|
||||||
|
# gaming.enable = true;
|
||||||
|
# gsr.defaultAudioDevice = "alsa_output.usb-Schiit_Audio_Schiit_Modi_-00.analog-stereo.monitor"; # alsa_output.usb-Generic_USB_Audio-00.analog-stereo.monitor
|
||||||
|
# low-latency.enable = false;
|
||||||
|
# vhs-decode.enable = true;
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = lib.mkDefault [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
kernelModules = lib.mkDefault [
|
||||||
|
"dm-snapshot"
|
||||||
|
"kvm-amd"
|
||||||
|
"tcp_bbr"
|
||||||
|
"uinput"
|
||||||
|
];
|
||||||
|
kernelParams = lib.mkDefault [
|
||||||
|
"amd_iommu=on"
|
||||||
|
"amd_pstate=active"
|
||||||
|
];
|
||||||
|
# loader = {
|
||||||
|
# systemd-boot = {
|
||||||
|
# windows = {
|
||||||
|
# "11" = {
|
||||||
|
# title = "Windows 11";
|
||||||
|
# efiDeviceHandle = "HD3b";
|
||||||
|
# sortKey = "z_windows";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# tmp.tmpfsSize = "100%";
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
amdgpu.initrd.enable = true;
|
||||||
|
cpu.amd.updateMicrocode = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "thalia-dev";
|
||||||
|
wireless.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = "ondemand";
|
||||||
|
|
||||||
|
# services = {
|
||||||
|
# beesd = {
|
||||||
|
# filesystems = {
|
||||||
|
# games = {
|
||||||
|
# spec = "/home/${username}/Games";
|
||||||
|
# verbosity = "crit";
|
||||||
|
# extraOptions = [
|
||||||
|
# "--loadavg-target"
|
||||||
|
# "5.0"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# pipewire = {
|
||||||
|
# extraConfig = {
|
||||||
|
# pipewire = {
|
||||||
|
# "10-clock-rate" = {
|
||||||
|
# "context.properties" = {
|
||||||
|
# # To make DAC properly work
|
||||||
|
# "default.clock.allowed-rates" = [
|
||||||
|
# 44100
|
||||||
|
# 48000
|
||||||
|
# 88200
|
||||||
|
# 96000
|
||||||
|
# 176400
|
||||||
|
# 192000
|
||||||
|
# ];
|
||||||
|
# "default.clock.quantum" = 512;
|
||||||
|
# "default.clock.min-quantum" = 512;
|
||||||
|
# "default.clock.max-quantum" = 512;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# # Create mono-only microphone output
|
||||||
|
# "10-loopback-mono-mic" = {
|
||||||
|
# "context.modules" = [
|
||||||
|
# {
|
||||||
|
# "name" = "libpipewire-module-loopback";
|
||||||
|
# "args" = {
|
||||||
|
# "node.description" = "Samson G-Track Pro [MONO]";
|
||||||
|
# "capture.props" = {
|
||||||
|
# "node.name" = "capture.mono-microphone";
|
||||||
|
# "audio.position" = [ "FL" ];
|
||||||
|
# "target.object" =
|
||||||
|
# "alsa_input.usb-Samson_Technologies_Samson_G-Track_Pro_D0B3381619112B00-00.analog-stereo";
|
||||||
|
# "stream.dont-remix" = true;
|
||||||
|
# "node.passive" = true;
|
||||||
|
# };
|
||||||
|
# "playback.props" = {
|
||||||
|
# "media.class" = "Audio/Source";
|
||||||
|
# "node.name" = "mono-microphone";
|
||||||
|
# "audio.position" = [ "MONO" ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# ucodenix = {
|
||||||
|
# enable = true;
|
||||||
|
# cpuModelId = "00A60F12";
|
||||||
|
# };
|
||||||
|
# udev = {
|
||||||
|
# # TODO: Remove when Linux 6.13 is out: https://www.phoronix.com/news/AMDGPU-More-Aggressive-Power
|
||||||
|
# extraRules = ''
|
||||||
|
# # https://reddit.com/r/linux_gaming/comments/196tz6v/psa_amdgpu_power_management_may_fix_your/khxs3q3/?context=3 https://gitlab.freedesktop.org/drm/amd/-/issues/1500#note_825883
|
||||||
|
# # https://gitlab.freedesktop.org/drm/amd/-/issues/1500#note_1854170
|
||||||
|
# KERNEL=="card1", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="manual", ATTR{device/pp_power_profile_mode}="1"
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
systemd.targets = {
|
||||||
|
hibernate.enable = false;
|
||||||
|
hybrid-sleep.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
39
hosts/orion/hardware-configuration.nix
Normal file
39
hosts/orion/hardware-configuration.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 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 = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/a6b7a6ac-63c2-445b-99c9-7bcf28f2bfb3";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/09B6-4C96";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/78e92e55-980d-4219-8da8-a55872e0ea63"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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.enp8s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
20
hosts/orion/variables.nix
Normal file
20
hosts/orion/variables.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
# Git Configuration ( For Pulling Software Repos )
|
||||||
|
gitUsername = "Ryan Pandya";
|
||||||
|
gitEmail = "ryan@ryanpandya.com";
|
||||||
|
|
||||||
|
# Hyprland Settings
|
||||||
|
hostMonitorSettings = "
|
||||||
|
monitor=HDMI-A-1, 1920x1080, 0x0, 1, transform, 1 # Left
|
||||||
|
monitor=DP-3, 1920x1080, 1080x840, 1 # Center
|
||||||
|
monitor=DP-1, 1920x1080, 3000x840, 1 # Right
|
||||||
|
";
|
||||||
|
|
||||||
|
# Waybar Settings
|
||||||
|
clock24h = false;
|
||||||
|
|
||||||
|
# Program Options
|
||||||
|
browser = "firefox"; # Set Default Browser (google-chrome-stable for google-chrome)
|
||||||
|
terminal = "kitty"; # Set Default System Terminal
|
||||||
|
keyboardLayout = "us";
|
||||||
|
}
|
||||||
166
hosts/thalia/default.nix
Normal file
166
hosts/thalia/default.nix
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
host,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# System
|
||||||
|
# ./disko.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
# ./impermanence.nix
|
||||||
|
# Profiles
|
||||||
|
../../modules
|
||||||
|
# Users
|
||||||
|
../../users
|
||||||
|
];
|
||||||
|
|
||||||
|
# Users
|
||||||
|
ryan.enable = true;
|
||||||
|
pvi.enable = false;
|
||||||
|
|
||||||
|
# Custom modules
|
||||||
|
unfree.enable = true;
|
||||||
|
desktop.enable = true;
|
||||||
|
desktop.hostMonitorSettings = "
|
||||||
|
monitor=desc:Dell Inc. DELL P2419H 250TX53, 1920x1080, 0x0, 1, transform, 1 # Left
|
||||||
|
monitor=desc:Dell Inc. DELL P2719H F3WNLS2, 1920x1080, 1080x840, 1 # Center
|
||||||
|
monitor=desc:Dell Inc. DELL P2719H 93WNLS2, 1920x1080, 3000x840, 1 # Right
|
||||||
|
";
|
||||||
|
|
||||||
|
# gaming.enable = true;
|
||||||
|
# gsr.defaultAudioDevice = "alsa_output.usb-Schiit_Audio_Schiit_Modi_-00.analog-stereo.monitor"; # alsa_output.usb-Generic_USB_Audio-00.analog-stereo.monitor
|
||||||
|
# low-latency.enable = false;
|
||||||
|
# vhs-decode.enable = true;
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = lib.mkDefault [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
kernelModules = lib.mkDefault [
|
||||||
|
"dm-snapshot"
|
||||||
|
"kvm-amd"
|
||||||
|
"tcp_bbr"
|
||||||
|
"uinput"
|
||||||
|
];
|
||||||
|
kernelParams = lib.mkDefault [
|
||||||
|
"amd_iommu=on"
|
||||||
|
"amd_pstate=active"
|
||||||
|
];
|
||||||
|
# loader = {
|
||||||
|
# systemd-boot = {
|
||||||
|
# windows = {
|
||||||
|
# "11" = {
|
||||||
|
# title = "Windows 11";
|
||||||
|
# efiDeviceHandle = "HD3b";
|
||||||
|
# sortKey = "z_windows";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# tmp.tmpfsSize = "100%";
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
amdgpu.initrd.enable = true;
|
||||||
|
cpu.amd.updateMicrocode = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "thalia-dev";
|
||||||
|
wireless.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = "ondemand";
|
||||||
|
|
||||||
|
# services = {
|
||||||
|
# beesd = {
|
||||||
|
# filesystems = {
|
||||||
|
# games = {
|
||||||
|
# spec = "/home/${username}/Games";
|
||||||
|
# verbosity = "crit";
|
||||||
|
# extraOptions = [
|
||||||
|
# "--loadavg-target"
|
||||||
|
# "5.0"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# pipewire = {
|
||||||
|
# extraConfig = {
|
||||||
|
# pipewire = {
|
||||||
|
# "10-clock-rate" = {
|
||||||
|
# "context.properties" = {
|
||||||
|
# # To make DAC properly work
|
||||||
|
# "default.clock.allowed-rates" = [
|
||||||
|
# 44100
|
||||||
|
# 48000
|
||||||
|
# 88200
|
||||||
|
# 96000
|
||||||
|
# 176400
|
||||||
|
# 192000
|
||||||
|
# ];
|
||||||
|
# "default.clock.quantum" = 512;
|
||||||
|
# "default.clock.min-quantum" = 512;
|
||||||
|
# "default.clock.max-quantum" = 512;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# # Create mono-only microphone output
|
||||||
|
# "10-loopback-mono-mic" = {
|
||||||
|
# "context.modules" = [
|
||||||
|
# {
|
||||||
|
# "name" = "libpipewire-module-loopback";
|
||||||
|
# "args" = {
|
||||||
|
# "node.description" = "Samson G-Track Pro [MONO]";
|
||||||
|
# "capture.props" = {
|
||||||
|
# "node.name" = "capture.mono-microphone";
|
||||||
|
# "audio.position" = [ "FL" ];
|
||||||
|
# "target.object" =
|
||||||
|
# "alsa_input.usb-Samson_Technologies_Samson_G-Track_Pro_D0B3381619112B00-00.analog-stereo";
|
||||||
|
# "stream.dont-remix" = true;
|
||||||
|
# "node.passive" = true;
|
||||||
|
# };
|
||||||
|
# "playback.props" = {
|
||||||
|
# "media.class" = "Audio/Source";
|
||||||
|
# "node.name" = "mono-microphone";
|
||||||
|
# "audio.position" = [ "MONO" ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# ucodenix = {
|
||||||
|
# enable = true;
|
||||||
|
# cpuModelId = "00A60F12";
|
||||||
|
# };
|
||||||
|
# udev = {
|
||||||
|
# # TODO: Remove when Linux 6.13 is out: https://www.phoronix.com/news/AMDGPU-More-Aggressive-Power
|
||||||
|
# extraRules = ''
|
||||||
|
# # https://reddit.com/r/linux_gaming/comments/196tz6v/psa_amdgpu_power_management_may_fix_your/khxs3q3/?context=3 https://gitlab.freedesktop.org/drm/amd/-/issues/1500#note_825883
|
||||||
|
# # https://gitlab.freedesktop.org/drm/amd/-/issues/1500#note_1854170
|
||||||
|
# KERNEL=="card1", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="manual", ATTR{device/pp_power_profile_mode}="1"
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
systemd.targets = {
|
||||||
|
hibernate.enable = false;
|
||||||
|
hybrid-sleep.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
39
hosts/thalia/hardware-configuration.nix
Normal file
39
hosts/thalia/hardware-configuration.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 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 = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/a6b7a6ac-63c2-445b-99c9-7bcf28f2bfb3";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/09B6-4C96";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/78e92e55-980d-4219-8da8-a55872e0ea63"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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.enp8s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
20
hosts/thalia/variables.nix
Normal file
20
hosts/thalia/variables.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
# Git Configuration ( For Pulling Software Repos )
|
||||||
|
gitUsername = "Ryan Pandya";
|
||||||
|
gitEmail = "ryan@ryanpandya.com";
|
||||||
|
|
||||||
|
# Hyprland Settings
|
||||||
|
hostMonitorSettings = "
|
||||||
|
monitor=HDMI-A-1, 1920x1080, 0x0, 1, transform, 1 # Left
|
||||||
|
monitor=DP-3, 1920x1080, 1080x840, 1 # Center
|
||||||
|
monitor=DP-1, 1920x1080, 3000x840, 1 # Right
|
||||||
|
";
|
||||||
|
|
||||||
|
# Waybar Settings
|
||||||
|
clock24h = false;
|
||||||
|
|
||||||
|
# Program Options
|
||||||
|
browser = "firefox"; # Set Default Browser (google-chrome-stable for google-chrome)
|
||||||
|
terminal = "kitty"; # Set Default System Terminal
|
||||||
|
keyboardLayout = "us";
|
||||||
|
}
|
||||||
8
modules/apps/default.nix
Normal file
8
modules/apps/default.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./direnv
|
||||||
|
./git
|
||||||
|
./hyprland
|
||||||
|
./vscode
|
||||||
|
];
|
||||||
|
}
|
||||||
26
modules/apps/direnv/default.nix
Normal file
26
modules/apps/direnv/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.direnv;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
direnv = {
|
||||||
|
enable = lib.mkEnableOption "Enable direnv in NixOS & home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
programs = {
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
66
modules/apps/git/default.nix
Normal file
66
modules/apps/git/default.nix
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
fullname,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.git;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
git = {
|
||||||
|
enable = lib.mkEnableOption "Enable git in NixOS & home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.gitFull;
|
||||||
|
};
|
||||||
|
home-manager.users.${username} =
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
delta = {
|
||||||
|
enable = true;
|
||||||
|
options = {
|
||||||
|
light = false;
|
||||||
|
line-numbers = true;
|
||||||
|
navigate = true;
|
||||||
|
side-by-side = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
diff = {
|
||||||
|
colorMoved = "default";
|
||||||
|
};
|
||||||
|
merge = {
|
||||||
|
conflictstyle = "diff3";
|
||||||
|
};
|
||||||
|
# safe = {
|
||||||
|
# directory = [
|
||||||
|
# "/mnt/crusader/Projects/Codeberg/nix-config"
|
||||||
|
# "/mnt/crusader/Projects/GitHub/arch-distrobox"
|
||||||
|
# "/mnt/crusader/Projects/GitHub/keenanweaver.github.io"
|
||||||
|
# "/mnt/crusader/Projects/GitHub/nix-config"
|
||||||
|
# "/mnt/crusader/Projects/GitHub/nix-config/.git"
|
||||||
|
# "/mnt/crusader/Projects/Gitlab/moka-pics"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
includes = [ { path = "${config.xdg.configHome}/git/mocha.gitconfig"; } ];
|
||||||
|
package = pkgs.gitFull;
|
||||||
|
userName = "Ryan Pandya";
|
||||||
|
userEmail = "ryan@ryanpandya.com";
|
||||||
|
# signing = {
|
||||||
|
# signByDefault = true;
|
||||||
|
# key = "0926B70C6A27AAE1";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
197
modules/apps/hyprland/default.nix
Normal file
197
modules/apps/hyprland/default.nix
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
username,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
browser = builtins.toString config.desktop.browser;
|
||||||
|
terminal = builtins.toString config.desktop.terminal;
|
||||||
|
in
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
home-manager.users.${username}.wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
extraConfig =
|
||||||
|
let
|
||||||
|
modifier = "SUPER";
|
||||||
|
in
|
||||||
|
concatStrings [
|
||||||
|
''
|
||||||
|
env = NIXOS_OZONE_WL, 1
|
||||||
|
env = NIXPKGS_ALLOW_UNFREE, 1
|
||||||
|
env = XDG_CURRENT_DESKTOP, Hyprland
|
||||||
|
env = XDG_SESSION_TYPE, wayland
|
||||||
|
env = XDG_SESSION_DESKTOP, Hyprland
|
||||||
|
env = GDK_BACKEND, wayland, x11
|
||||||
|
env = CLUTTER_BACKEND, wayland
|
||||||
|
env = QT_QPA_PLATFORM=wayland;xcb
|
||||||
|
env = QT_WAYLAND_DISABLE_WINDOWDECORATION, 1
|
||||||
|
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
|
||||||
|
env = SDL_VIDEODRIVER, x11
|
||||||
|
env = MOZ_ENABLE_WAYLAND, 1
|
||||||
|
exec-once = dbus-update-activation-environment --systemd --all
|
||||||
|
exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||||
|
exec-once = killall -q swww;sleep .5 && swww init
|
||||||
|
exec-once = killall -q waybar;sleep .5 && waybar
|
||||||
|
exec-once = killall -q swaync;sleep .5 && swaync
|
||||||
|
exec-once = nm-applet --indicator
|
||||||
|
exec-once = lxqt-policykit-agent
|
||||||
|
exec-once = sleep 1.5 && swww img /home/${username}/Pictures/Wallpapers/pink-desert.jpeg
|
||||||
|
${builtins.toString config.desktop.hostMonitorSettings}
|
||||||
|
exec-once = ${terminal}
|
||||||
|
general {
|
||||||
|
gaps_in = 6
|
||||||
|
gaps_out = 8
|
||||||
|
border_size = 2
|
||||||
|
layout = dwindle
|
||||||
|
resize_on_border = true
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
kb_layout = us
|
||||||
|
kb_options = grp:alt_shift_toggle
|
||||||
|
kb_options = caps:super
|
||||||
|
follow_mouse = 1
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = true
|
||||||
|
disable_while_typing = true
|
||||||
|
scroll_factor = 0.8
|
||||||
|
}
|
||||||
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||||
|
accel_profile = flat
|
||||||
|
}
|
||||||
|
windowrule = noborder,^(wofi)$
|
||||||
|
windowrule = center,^(wofi)$
|
||||||
|
windowrule = center,^(steam)$
|
||||||
|
windowrule = float, nm-connection-editor|blueman-manager
|
||||||
|
windowrule = float, swayimg|vlc|Viewnior|pavucontrol
|
||||||
|
windowrule = float, nwg-look|qt5ct|mpv
|
||||||
|
windowrule = float, zoom
|
||||||
|
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
|
||||||
|
windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
|
||||||
|
windowrulev2 = opacity 0.9 0.7, class:^(Brave)$
|
||||||
|
windowrulev2 = opacity 0.9 0.7, class:^(thunar)$
|
||||||
|
gestures {
|
||||||
|
workspace_swipe = true
|
||||||
|
workspace_swipe_fingers = 3
|
||||||
|
}
|
||||||
|
misc {
|
||||||
|
initial_workspace_tracking = 0
|
||||||
|
mouse_move_enables_dpms = true
|
||||||
|
key_press_enables_dpms = false
|
||||||
|
}
|
||||||
|
animations {
|
||||||
|
enabled = yes
|
||||||
|
bezier = wind, 0.05, 0.9, 0.1, 1.05
|
||||||
|
bezier = winIn, 0.1, 1.1, 0.1, 1.1
|
||||||
|
bezier = winOut, 0.3, -0.3, 0, 1
|
||||||
|
bezier = liner, 1, 1, 1, 1
|
||||||
|
animation = windows, 1, 6, wind, slide
|
||||||
|
animation = windowsIn, 1, 6, winIn, slide
|
||||||
|
animation = windowsOut, 1, 5, winOut, slide
|
||||||
|
animation = windowsMove, 1, 5, wind, slide
|
||||||
|
animation = border, 1, 1, liner
|
||||||
|
animation = fade, 1, 10, default
|
||||||
|
animation = workspaces, 1, 5, wind
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
rounding = 10
|
||||||
|
blur {
|
||||||
|
enabled = true
|
||||||
|
size = 5
|
||||||
|
passes = 3
|
||||||
|
new_optimizations = on
|
||||||
|
ignore_opacity = off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
plugin {
|
||||||
|
hyprtrails {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dwindle {
|
||||||
|
pseudotile = true
|
||||||
|
preserve_split = true
|
||||||
|
}
|
||||||
|
bind = ${modifier},Return,exec,${terminal}
|
||||||
|
bind = ${modifier}SHIFT,Return,exec,rofi-launcher
|
||||||
|
bind = ${modifier}SHIFT,W,exec,web-search
|
||||||
|
bind = ${modifier}ALT,W,exec,wallsetter
|
||||||
|
bind = ${modifier}SHIFT,N,exec,swaync-client -rs
|
||||||
|
bind = ${modifier},W,exec,${browser}
|
||||||
|
bind = ${modifier},E,exec,emopicker9000
|
||||||
|
bind = ${modifier},S,exec,screenshootin
|
||||||
|
bind = ${modifier},D,exec,discord
|
||||||
|
bind = ${modifier},O,exec,obs
|
||||||
|
bind = ${modifier},C,exec,hyprpicker -a
|
||||||
|
bind = ${modifier},G,exec,gimp
|
||||||
|
bind = ${modifier}SHIFT,G,exec,godot4
|
||||||
|
bind = ${modifier},T,exec,thunar
|
||||||
|
bind = ${modifier},M,exec,spotify
|
||||||
|
bind = ${modifier},Q,killactive,
|
||||||
|
bind = ${modifier},P,pseudo,
|
||||||
|
bind = ${modifier}SHIFT,I,togglesplit,
|
||||||
|
bind = ${modifier},F,fullscreen,
|
||||||
|
bind = ${modifier}SHIFT,F,togglefloating,
|
||||||
|
bind = ${modifier}SHIFT,C,exit,
|
||||||
|
bind = ${modifier}SHIFT,left,movewindow,l
|
||||||
|
bind = ${modifier}SHIFT,right,movewindow,r
|
||||||
|
bind = ${modifier}SHIFT,up,movewindow,u
|
||||||
|
bind = ${modifier}SHIFT,down,movewindow,d
|
||||||
|
bind = ${modifier}SHIFT,h,movewindow,l
|
||||||
|
bind = ${modifier}SHIFT,l,movewindow,r
|
||||||
|
bind = ${modifier}SHIFT,k,movewindow,u
|
||||||
|
bind = ${modifier}SHIFT,j,movewindow,d
|
||||||
|
bind = ${modifier},left,movefocus,l
|
||||||
|
bind = ${modifier},right,movefocus,r
|
||||||
|
bind = ${modifier},up,movefocus,u
|
||||||
|
bind = ${modifier},down,movefocus,d
|
||||||
|
bind = ${modifier},h,movefocus,l
|
||||||
|
bind = ${modifier},l,movefocus,r
|
||||||
|
bind = ${modifier},k,movefocus,u
|
||||||
|
bind = ${modifier},j,movefocus,d
|
||||||
|
bind = ${modifier},1,workspace,1
|
||||||
|
bind = ${modifier},2,workspace,2
|
||||||
|
bind = ${modifier},3,workspace,3
|
||||||
|
bind = ${modifier},4,workspace,4
|
||||||
|
bind = ${modifier},5,workspace,5
|
||||||
|
bind = ${modifier},6,workspace,6
|
||||||
|
bind = ${modifier},7,workspace,7
|
||||||
|
bind = ${modifier},8,workspace,8
|
||||||
|
bind = ${modifier},9,workspace,9
|
||||||
|
bind = ${modifier},0,workspace,10
|
||||||
|
bind = ${modifier}SHIFT,SPACE,movetoworkspace,special
|
||||||
|
bind = ${modifier},SPACE,togglespecialworkspace
|
||||||
|
bind = ${modifier}SHIFT,1,movetoworkspace,1
|
||||||
|
bind = ${modifier}SHIFT,2,movetoworkspace,2
|
||||||
|
bind = ${modifier}SHIFT,3,movetoworkspace,3
|
||||||
|
bind = ${modifier}SHIFT,4,movetoworkspace,4
|
||||||
|
bind = ${modifier}SHIFT,5,movetoworkspace,5
|
||||||
|
bind = ${modifier}SHIFT,6,movetoworkspace,6
|
||||||
|
bind = ${modifier}SHIFT,7,movetoworkspace,7
|
||||||
|
bind = ${modifier}SHIFT,8,movetoworkspace,8
|
||||||
|
bind = ${modifier}SHIFT,9,movetoworkspace,9
|
||||||
|
bind = ${modifier}SHIFT,0,movetoworkspace,10
|
||||||
|
bind = ${modifier}CONTROL,right,workspace,e+1
|
||||||
|
bind = ${modifier}CONTROL,left,workspace,e-1
|
||||||
|
bind = ${modifier},mouse_down,workspace, e+1
|
||||||
|
bind = ${modifier},mouse_up,workspace, e-1
|
||||||
|
bindm = ${modifier},mouse:272,movewindow
|
||||||
|
bindm = ${modifier},mouse:273,resizewindow
|
||||||
|
bind = ALT,Tab,cyclenext
|
||||||
|
bind = ALT,Tab,bringactivetotop
|
||||||
|
bind = ,XF86AudioRaiseVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||||
|
bind = ,XF86AudioLowerVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||||
|
binde = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||||
|
bind = ,XF86AudioPlay, exec, playerctl play-pause
|
||||||
|
bind = ,XF86AudioPause, exec, playerctl play-pause
|
||||||
|
bind = ,XF86AudioNext, exec, playerctl next
|
||||||
|
bind = ,XF86AudioPrev, exec, playerctl previous
|
||||||
|
bind = ,XF86MonBrightnessDown,exec,brightnessctl set 5%-
|
||||||
|
bind = ,XF86MonBrightnessUp,exec,brightnessctl set +5%
|
||||||
|
''
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
108
modules/apps/vscode/default.nix
Normal file
108
modules/apps/vscode/default.nix
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.vscode;
|
||||||
|
marketplace-extensions =
|
||||||
|
with inputs.nix-vscode-extensions.extensions.x86_64-linux.vscode-marketplace; [
|
||||||
|
arrterian.nix-env-selector
|
||||||
|
ban.spellright
|
||||||
|
charliermarsh.ruff
|
||||||
|
#codeium.codeium
|
||||||
|
eamodio.gitlens
|
||||||
|
formulahendry.code-runner
|
||||||
|
foxundermoon.shell-format
|
||||||
|
jnoortheen.nix-ide
|
||||||
|
mkhl.direnv
|
||||||
|
ms-python.python
|
||||||
|
ms-vscode.powershell
|
||||||
|
ms-vscode-remote.remote-containers
|
||||||
|
ms-vscode-remote.remote-ssh
|
||||||
|
redhat.ansible
|
||||||
|
redhat.vscode-xml
|
||||||
|
redhat.vscode-yaml
|
||||||
|
rust-lang.rust-analyzer
|
||||||
|
skellock.just
|
||||||
|
s-nlf-fh.glassit
|
||||||
|
sumneko.lua
|
||||||
|
tamasfe.even-better-toml
|
||||||
|
timonwong.shellcheck
|
||||||
|
usernamehw.errorlens
|
||||||
|
yzhang.markdown-all-in-one
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
vscode = {
|
||||||
|
enable = lib.mkEnableOption "Enable vscode in NixOS & home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home-manager.users.${username} =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs = {
|
||||||
|
overlays = [ inputs.nix-vscode-extensions.overlays.default ];
|
||||||
|
};
|
||||||
|
programs.vscode = {
|
||||||
|
enable = true;
|
||||||
|
enableExtensionUpdateCheck = false;
|
||||||
|
enableUpdateCheck = false;
|
||||||
|
extensions = marketplace-extensions;
|
||||||
|
package = pkgs.vscodium;
|
||||||
|
userSettings = {
|
||||||
|
"ansible.ansible.path" = "ansible";
|
||||||
|
"ansible.python.interpreterPath" = "python";
|
||||||
|
"ansible.validation.lint.path" = "ansible-lint";
|
||||||
|
"codeium.enableConfig"."*" = true;
|
||||||
|
"codeium.enableConfig"."nix" = true;
|
||||||
|
"editor.formatOnSave" = true;
|
||||||
|
"editor.inlineSuggest.enabled" = true;
|
||||||
|
"editor.minimap.enabled" = true;
|
||||||
|
"editor.minimap.renderCharacters" = false;
|
||||||
|
"editor.renderControlCharacters" = true;
|
||||||
|
"editor.semanticHighlighting.enabled" = true;
|
||||||
|
"editor.tabCompletion" = "on";
|
||||||
|
"editor.wordWrap" = "on";
|
||||||
|
"git.allowForcePush" = true;
|
||||||
|
"git.autofetch" = true;
|
||||||
|
"git.confirmSync" = false;
|
||||||
|
"git.enableCommitSigning" = true;
|
||||||
|
"gopls"."ui.semanticTokens" = true;
|
||||||
|
"[nix]"."editor.defaultFormatter" = "jnoortheen.nix-ide";
|
||||||
|
"nix.enableLanguageServer" = true;
|
||||||
|
"nix.formatterPath" = "nixfmt";
|
||||||
|
"nix.serverPath" = "nixd";
|
||||||
|
"nix.serverSettings"."nixd"."formatting"."command" = [ "nixfmt" ];
|
||||||
|
"nix.serverSettings"."nixd"."formatting"."options" = {
|
||||||
|
"enable" = [ true ];
|
||||||
|
"nixos" = {
|
||||||
|
"expr" =
|
||||||
|
"(builtins.getFlake \"github:keenanweaver/nix-config\").nixosConfigurations.${config.networking.hostName}.options";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"powershell.powerShellAdditionalExePaths"."exePath" = "${pkgs.powershell}/bin/pwsh";
|
||||||
|
"powershell.integratedConsole.focusConsoleOnExecute" = false;
|
||||||
|
"powershell.integratedConsole.showOnStartup" = false;
|
||||||
|
"[powershell]"."editor.renderControlCharacters" = true;
|
||||||
|
"[powershell]"."editor.renderWhitespace" = "all";
|
||||||
|
"[powershell]"."files.autoGuessEncoding" = true;
|
||||||
|
"[powershell]"."files.trimTrailingWhitespace" = true;
|
||||||
|
"[python]"."editor.defaultFormatter" = "charliermarsh.ruff";
|
||||||
|
"redhat.telemetry.enabled" = false;
|
||||||
|
"rust-analyzer.server.path" = "rust-analyzer";
|
||||||
|
"security.workspace.trust.enabled" = false;
|
||||||
|
"terminal.integrated.minimumContrastRatio" = 1;
|
||||||
|
"terminal.integrated.shellIntegration.enabled" = true;
|
||||||
|
"window.titleBarStyle" = "custom";
|
||||||
|
"workbench.editorAssociations"."git-rebase-todo" = "gitlens.rebase";
|
||||||
|
"workbench.sideBar.location" = "right";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
58
modules/components/boot/default.nix
Normal file
58
modules/components/boot/default.nix
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
binfmt = {
|
||||||
|
emulatedSystems = [
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
consoleLogLevel = 0;
|
||||||
|
initrd = {
|
||||||
|
systemd.enable = true; # Plymouth login screen
|
||||||
|
verbose = false;
|
||||||
|
};
|
||||||
|
kernel = {
|
||||||
|
sysctl = {
|
||||||
|
"kernel.sysrq" = 4;
|
||||||
|
"kernel.nmi_watchdog" = 0;
|
||||||
|
"net.core.default_qdisc" = "cake";
|
||||||
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||||
|
"vm.swappiness" = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||||
|
kernelParams = [
|
||||||
|
"nowatchdog"
|
||||||
|
"zswap.enabled=0"
|
||||||
|
# Quiet boot
|
||||||
|
"quiet"
|
||||||
|
# "splash" # Plymouth
|
||||||
|
"loglevel=0"
|
||||||
|
"rd.udev.log_level=3"
|
||||||
|
"systemd.show_status=auto"
|
||||||
|
"udev.log_priority=3"
|
||||||
|
"vt.global_cursor_default=0"
|
||||||
|
];
|
||||||
|
loader = {
|
||||||
|
efi = {
|
||||||
|
canTouchEfiVariables = true;
|
||||||
|
efiSysMountPoint = "/boot";
|
||||||
|
};
|
||||||
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
editor = false;
|
||||||
|
};
|
||||||
|
timeout = 1;
|
||||||
|
};
|
||||||
|
plymouth.enable = false;
|
||||||
|
supportedFilesystems = [
|
||||||
|
"btrfs"
|
||||||
|
"cifs"
|
||||||
|
"ext4"
|
||||||
|
"fat"
|
||||||
|
"ntfs"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [ sbctl ];
|
||||||
|
}
|
||||||
15
modules/components/default.nix
Normal file
15
modules/components/default.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./boot
|
||||||
|
# ./flatpak
|
||||||
|
# ./fonts
|
||||||
|
# ./mounts
|
||||||
|
# ./networking
|
||||||
|
./nix
|
||||||
|
# ./nvidia
|
||||||
|
# ./pipewire
|
||||||
|
./theming
|
||||||
|
# ./users
|
||||||
|
# ./virtualization
|
||||||
|
];
|
||||||
|
}
|
||||||
136
modules/components/nix/default.nix
Normal file
136
modules/components/nix/default.nix
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
vars,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.nixConfig;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
nixConfig = {
|
||||||
|
enable = lib.mkEnableOption "Enable nix in NixOS & home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
documentation = {
|
||||||
|
man = {
|
||||||
|
man-db.enable = true;
|
||||||
|
generateCaches = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nix = {
|
||||||
|
extraOptions = ''
|
||||||
|
builders-use-substitutes = true
|
||||||
|
keep-outputs = true
|
||||||
|
keep-derivations = true
|
||||||
|
'';
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
|
optimise = {
|
||||||
|
automatic = true;
|
||||||
|
dates = [ "10:00" ];
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
connect-timeout = 5;
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
extra-substituters = [
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://nyx.chaotic.cx"
|
||||||
|
];
|
||||||
|
extra-trusted-public-keys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
|
||||||
|
];
|
||||||
|
log-lines = lib.mkDefault 25;
|
||||||
|
trusted-users = [ "${username}" ];
|
||||||
|
use-xdg-base-directories = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nixpkgs = {
|
||||||
|
config = {
|
||||||
|
allowBroken = false;
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
overlays = [
|
||||||
|
(import ../../../packages/overlay.nix)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = false;
|
||||||
|
dates = "04:00:00";
|
||||||
|
allowReboot = if vars.server then true else false;
|
||||||
|
rebootWindow = {
|
||||||
|
lower = "04:00";
|
||||||
|
upper = "06:00";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.${username} =
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
extraProfileCommands = ''
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
'';
|
||||||
|
language.base = "en_US.UTF-8";
|
||||||
|
sessionPath = [
|
||||||
|
"${config.home.homeDirectory}/.bin"
|
||||||
|
"${config.home.homeDirectory}/.local/bin"
|
||||||
|
];
|
||||||
|
sessionVariables = {
|
||||||
|
MANPAGER = "batman";
|
||||||
|
NIXOS_OZONE_WL = "1"; # Electron apps
|
||||||
|
NIXPKGS_ALLOW_UNFREE = "1";
|
||||||
|
#RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
|
||||||
|
#WLR_NO_HARDWARE_CURSOR = "1";
|
||||||
|
XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompose";
|
||||||
|
};
|
||||||
|
shellAliases = {
|
||||||
|
b = "bat --color=always -pp";
|
||||||
|
bb = "bat --color=always";
|
||||||
|
db = "distrobox";
|
||||||
|
dbe = "db enter";
|
||||||
|
l = "lsd -la --group-dirs=first";
|
||||||
|
ls = "lsd -l --group-dirs=first";
|
||||||
|
nv = "nvim";
|
||||||
|
ngc = "nh clean all";
|
||||||
|
nor = "nh os switch";
|
||||||
|
npr = "nix run nixpkgs#nixpkgs-review -- pr";
|
||||||
|
psr = "plasmashell --replace & disown";
|
||||||
|
rbn = "podman stop -a && systemctl reboot";
|
||||||
|
sudo = "sudo ";
|
||||||
|
up = "topgrade";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nix = {
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
frequency = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
templates = null;
|
||||||
|
publicShare = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
455
modules/components/theming/default.nix
Normal file
455
modules/components/theming/default.nix
Normal file
@ -0,0 +1,455 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
username,
|
||||||
|
pkgs,
|
||||||
|
vars,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
accent-lower = "lavender";
|
||||||
|
accent-upper = "Lavender";
|
||||||
|
flavor-lower = "mocha";
|
||||||
|
flavor-upper = "Mocha";
|
||||||
|
cfg = config.catppuccinTheming;
|
||||||
|
mono-font = "JetBrainsMono Nerd Font";
|
||||||
|
sans-font = "Inter";
|
||||||
|
sans-font-pkg = pkgs.inter;
|
||||||
|
#serif-font = "IBM Plex Serif";
|
||||||
|
GTK-THEME = "Breeze-Dark";
|
||||||
|
cursor-theme = "breeze_cursors";
|
||||||
|
in
|
||||||
|
#cursor-theme = "Catppuccin-${flavor-upper}-${accent-upper}";
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
catppuccinTheming = {
|
||||||
|
enable = lib.mkEnableOption "Enable catppuccinTheming in NixOS & home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
accent = "${accent-lower}";
|
||||||
|
cache.enable = true;
|
||||||
|
flavor = "${flavor-lower}";
|
||||||
|
sddm = {
|
||||||
|
background = "/home/${username}/Pictures/wallpapers/lavender-wave-haikei.png";
|
||||||
|
font = "${mono-font}";
|
||||||
|
fontSize = "11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
console = {
|
||||||
|
packages = with pkgs; [ terminus_font ];
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
sessionVariables = {
|
||||||
|
# Breaks theming but forces the color scheme
|
||||||
|
#GTK_THEME = "${GTK-THEME}";
|
||||||
|
};
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
(catppuccin-kde.override {
|
||||||
|
accents = [ "${accent-lower}" ];
|
||||||
|
flavour = [ "${flavor-lower}" ];
|
||||||
|
})
|
||||||
|
(catppuccin-papirus-folders.override {
|
||||||
|
accent = "${accent-lower}";
|
||||||
|
flavor = "${flavor-lower}";
|
||||||
|
})
|
||||||
|
#inputs.kwin-effects-forceblur.packages.${pkgs.system}.default
|
||||||
|
inputs.lightly.packages.${pkgs.system}.darkly-qt5
|
||||||
|
inputs.lightly.packages.${pkgs.system}.darkly-qt6
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
displayManager = {
|
||||||
|
sddm = {
|
||||||
|
settings = {
|
||||||
|
Theme = {
|
||||||
|
CursorTheme = "${cursor-theme}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
home-manager.users.${username} =
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
accent = "${accent-lower}";
|
||||||
|
flavor = "${flavor-lower}";
|
||||||
|
cursors = {
|
||||||
|
enable = false;
|
||||||
|
accent = "${accent-lower}";
|
||||||
|
flavor = "${flavor-lower}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
cursorTheme = {
|
||||||
|
name = lib.mkDefault "${cursor-theme}";
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
font = {
|
||||||
|
name = "${sans-font}";
|
||||||
|
size = 12;
|
||||||
|
package = sans-font-pkg;
|
||||||
|
};
|
||||||
|
gtk2 = {
|
||||||
|
configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
|
# force = true; # https://github.com/nix-community/home-manager/pull/5263
|
||||||
|
};
|
||||||
|
gtk3 = {
|
||||||
|
extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = true;
|
||||||
|
gtk-button-images = true;
|
||||||
|
gtk-decoration-layout = "icon:minimize,maximize,close";
|
||||||
|
gtk-enable-animations = true;
|
||||||
|
gtk-menu-images = true;
|
||||||
|
gtk-modules = "colorreload-gtk-module";
|
||||||
|
gtk-primary-button-warps-slider = true;
|
||||||
|
gtk-sound-theme-name = "ocean";
|
||||||
|
gtk-toolbar-style = "3";
|
||||||
|
gtk-xft-antialias = 1;
|
||||||
|
gtk-xft-hinting = 1;
|
||||||
|
gtk-xft-hintstyle = "hintslight";
|
||||||
|
gtk-xft-rgba = "rgb";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
gtk4 = {
|
||||||
|
extraConfig = {
|
||||||
|
gtk-decoration-layout = "icon:minimize,maximize,close";
|
||||||
|
gtk-enable-animations = true;
|
||||||
|
gtk-primary-button-warps-slider = true;
|
||||||
|
gtk-sound-theme-name = "ocean";
|
||||||
|
gtk-xft-antialias = 1;
|
||||||
|
gtk-xft-hinting = 1;
|
||||||
|
gtk-xft-hintstyle = "hintslight";
|
||||||
|
gtk-xft-rgba = "rgb";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
theme = {
|
||||||
|
name = "${GTK-THEME}";
|
||||||
|
package = pkgs.kdePackages.breeze-gtk;
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
file = {
|
||||||
|
# UMU cursor workaround
|
||||||
|
breeze-cursors = {
|
||||||
|
enable = true;
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${pkgs.kdePackages.breeze}/share/icons/breeze_cursors";
|
||||||
|
target = "${config.xdg.dataHome}/icons/breeze_cursors";
|
||||||
|
};
|
||||||
|
# Flatpak theming issue workarounds
|
||||||
|
catppuccin-gtk = {
|
||||||
|
enable = true;
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${pkgs.kdePackages.breeze-gtk}/share/themes/${GTK-THEME}";
|
||||||
|
target = "${config.xdg.dataHome}/themes/${GTK-THEME}";
|
||||||
|
};
|
||||||
|
catppuccin-ghostwriter = {
|
||||||
|
enable = true;
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${inputs.catppuccin-ghostwriter}/colours/Catppuccin-Latte-${flavor-upper}-${accent-upper}.json";
|
||||||
|
target = "${config.xdg.dataHome}/ghostwriter/themes/Catppuccin-Latte-${flavor-upper}-${accent-upper}.json";
|
||||||
|
};
|
||||||
|
catppuccin-halloy = {
|
||||||
|
enable = true;
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${inputs.catppuccin-halloy}/themes/catppuccin-${flavor-lower}.toml";
|
||||||
|
target = "${config.xdg.configHome}/halloy/themes/catppuccin-${flavor-lower}.toml";
|
||||||
|
};
|
||||||
|
catppuccin-heroic = {
|
||||||
|
enable = vars.gaming;
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${inputs.catppuccin-heroic}/themes/catppuccin-${flavor-lower}.css";
|
||||||
|
target = "Games/Heroic/catppuccin-${flavor-lower}.css";
|
||||||
|
};
|
||||||
|
catppuccin-obs-flatpak = {
|
||||||
|
enable = true;
|
||||||
|
recursive = true;
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${inputs.catppuccin-obs}/themes";
|
||||||
|
target = ".var/app/com.obsproject.Studio/config/obs-studio/themes";
|
||||||
|
};
|
||||||
|
catppuccin-powershell = {
|
||||||
|
enable = true;
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${inputs.catppuccin-powershell}";
|
||||||
|
target = "${config.xdg.dataHome}/powershell/Modules/Catppuccin";
|
||||||
|
};
|
||||||
|
catppuccin-vesktop = {
|
||||||
|
enable = true;
|
||||||
|
text = ''
|
||||||
|
@import url("https://catppuccin.github.io/discord/dist/catppuccin-${flavor-lower}-${accent-lower}.theme.css");
|
||||||
|
'';
|
||||||
|
target = "${config.xdg.configHome}/vesktop/themes/${flavor-lower}.theme.css";
|
||||||
|
};
|
||||||
|
catppuccin-zen-flatpak = {
|
||||||
|
enable = true;
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${inputs.catppuccin-zen}/themes/${flavor-upper}/${accent-upper}";
|
||||||
|
target = ".var/app/app.zen_browser.zen/.zen/${username}/chrome";
|
||||||
|
};
|
||||||
|
cursor-theme-default = {
|
||||||
|
enable = true;
|
||||||
|
text = ''
|
||||||
|
[Icon Theme]
|
||||||
|
Inherits=${cursor-theme}
|
||||||
|
'';
|
||||||
|
target = "${config.xdg.dataHome}/icons/default/index.theme";
|
||||||
|
};
|
||||||
|
klassy-config = {
|
||||||
|
enable = true;
|
||||||
|
text = ''
|
||||||
|
[ButtonBehaviour]
|
||||||
|
ShowCloseOutlineOnHoverActive=false
|
||||||
|
ShowCloseOutlineOnHoverInactive=false
|
||||||
|
ShowCloseOutlineOnPressActive=false
|
||||||
|
ShowCloseOutlineOnPressInactive=false
|
||||||
|
ShowOutlineOnHoverActive=false
|
||||||
|
ShowOutlineOnHoverInactive=false
|
||||||
|
ShowOutlineOnPressActive=false
|
||||||
|
ShowOutlineOnPressInactive=false
|
||||||
|
|
||||||
|
[ButtonColors]
|
||||||
|
ButtonBackgroundColorsActive=TitleBarTextNegativeClose
|
||||||
|
ButtonBackgroundColorsInactive=TitleBarTextNegativeClose
|
||||||
|
ButtonBackgroundOpacityActive=10
|
||||||
|
ButtonBackgroundOpacityInactive=10
|
||||||
|
ButtonOverrideColorsActiveClose={"BackgroundHover":["NegativeFullySaturated"],"BackgroundPress":["NegativeSaturated",80]}
|
||||||
|
ButtonOverrideColorsInactiveClose={"BackgroundHover":["NegativeFullySaturated"],"BackgroundPress":["NegativeSaturated",80]}
|
||||||
|
OnPoorIconContrastActive=Nothing
|
||||||
|
OnPoorIconContrastInactive=Nothing
|
||||||
|
|
||||||
|
[ButtonSizing]
|
||||||
|
ButtonCornerRadius=Custom
|
||||||
|
ButtonCustomCornerRadius=0
|
||||||
|
FullHeightButtonSpacingLeft=0
|
||||||
|
FullHeightButtonSpacingRight=0
|
||||||
|
FullHeightButtonWidthMarginRight=14
|
||||||
|
IntegratedRoundedRectangleBottomPadding=0.5
|
||||||
|
|
||||||
|
[ShadowStyle]
|
||||||
|
ShadowSize=ShadowSmall
|
||||||
|
|
||||||
|
[TitleBarOpacity]
|
||||||
|
ActiveTitleBarOpacity=75
|
||||||
|
|
||||||
|
[TitleBarSpacing]
|
||||||
|
LockTitleBarLeftRightMargins=false
|
||||||
|
PercentMaximizedTopBottomMargins=50
|
||||||
|
TitleAlignment=AlignLeft
|
||||||
|
TitleBarBottomMargin=2.25
|
||||||
|
TitleBarLeftMargin=2
|
||||||
|
TitleBarTopMargin=2.25
|
||||||
|
|
||||||
|
[Windeco]
|
||||||
|
BoldButtonIcons=BoldIconsFine
|
||||||
|
ButtonIconStyle=StyleSystemIconTheme
|
||||||
|
ButtonShape=ShapeFullHeightRectangle
|
||||||
|
ColorizeThinWindowOutlineWithButton=false
|
||||||
|
IconSize=IconMedium
|
||||||
|
WindowCornerRadius=8
|
||||||
|
|
||||||
|
[WindowOutlineStyle]
|
||||||
|
LockThinWindowOutlineStyleActiveInactive=true
|
||||||
|
ThinWindowOutlineStyleActive=WindowOutlineContrast
|
||||||
|
ThinWindowOutlineStyleInactive=WindowOutlineContrast
|
||||||
|
'';
|
||||||
|
target = "${config.xdg.configHome}/klassy/klassyrc";
|
||||||
|
};
|
||||||
|
powershell-profile = {
|
||||||
|
enable = true;
|
||||||
|
text = ''
|
||||||
|
Import-Module Catppuccin
|
||||||
|
$Flavor = $Catppuccin['${flavor-upper}']
|
||||||
|
'';
|
||||||
|
target = "${config.xdg.configHome}/powershell/Microsoft.PowerShell_profile.ps1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
packages = with pkgs; [
|
||||||
|
hicolor-icon-theme
|
||||||
|
vivid
|
||||||
|
## GNOME
|
||||||
|
adwaita-icon-theme
|
||||||
|
gnome-settings-daemon
|
||||||
|
gsettings-desktop-schemas
|
||||||
|
gsettings-qt
|
||||||
|
];
|
||||||
|
sessionVariables = {
|
||||||
|
GSETTINGS_BACKEND = "keyfile";
|
||||||
|
GTK_USE_PORTAL = "1";
|
||||||
|
LS_COLORS = "$(vivid generate catppuccin-${flavor-lower})";
|
||||||
|
XCURSOR_NAME = "${cursor-theme}";
|
||||||
|
XCURSOR_SIZE = "24";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
bat = {
|
||||||
|
config = {
|
||||||
|
pager = "less -FR";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
btop = {
|
||||||
|
settings = {
|
||||||
|
theme_background = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
foot = {
|
||||||
|
settings = {
|
||||||
|
colors = {
|
||||||
|
alpha = 0.7;
|
||||||
|
};
|
||||||
|
main = {
|
||||||
|
font = "${mono-font}:size=12";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
git = {
|
||||||
|
delta = { };
|
||||||
|
};
|
||||||
|
kitty = {
|
||||||
|
font = {
|
||||||
|
name = "${mono-font}";
|
||||||
|
size = 14;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
background_opacity = "0.7";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lazygit = {
|
||||||
|
settings = {
|
||||||
|
gui = {
|
||||||
|
border = "single";
|
||||||
|
mainPanelSplitMode = "vertical";
|
||||||
|
nerdFontsVersion = "3";
|
||||||
|
scrollHeight = 10;
|
||||||
|
scrollOffMargin = 4;
|
||||||
|
showFileTree = false;
|
||||||
|
sidePanelWidth = 0.3333;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nixvim = {
|
||||||
|
colorschemes.catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
background.dark = "${flavor-lower}";
|
||||||
|
flavor = "${flavor-lower}";
|
||||||
|
integrations = {
|
||||||
|
cmp = true;
|
||||||
|
coc_nvim = true;
|
||||||
|
gitsigns = true;
|
||||||
|
markdown = true;
|
||||||
|
neotree = true;
|
||||||
|
overseer = true;
|
||||||
|
treesitter = true;
|
||||||
|
treesitter_context = true;
|
||||||
|
which_key = true;
|
||||||
|
};
|
||||||
|
term_colors = true;
|
||||||
|
transparentBackground = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nvf = {
|
||||||
|
settings = {
|
||||||
|
vim = {
|
||||||
|
theme = {
|
||||||
|
enable = true;
|
||||||
|
name = "catppuccin";
|
||||||
|
style = "mocha";
|
||||||
|
transparent = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
vscode = {
|
||||||
|
extensions = with inputs.nix-vscode-extensions.extensions.x86_64-linux.vscode-marketplace; [
|
||||||
|
catppuccin.catppuccin-vsc-icons
|
||||||
|
catppuccin.catppuccin-vsc
|
||||||
|
];
|
||||||
|
userSettings = {
|
||||||
|
"catppuccin.accentColor" = "${accent-lower}";
|
||||||
|
"catppuccin.customUIColors"."${flavor-lower}"."statusBar.foreground" = "accent";
|
||||||
|
"editor.fontFamily" = "'${mono-font}', 'monospace', monospace";
|
||||||
|
"editor.fontLigatures" = true;
|
||||||
|
"editor.fontSize" = 18;
|
||||||
|
"glassit.alpha" = 210;
|
||||||
|
"terminal.integrated.fontFamily" = "${mono-font}";
|
||||||
|
"terminal.integrated.fontSize" = 14;
|
||||||
|
"terminal.integrated.fontWeight" = "normal";
|
||||||
|
"workbench.colorTheme" = "Catppuccin ${flavor-upper}";
|
||||||
|
"workbench.iconTheme" = "catppuccin-${flavor-lower}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
flatpak = {
|
||||||
|
overrides = {
|
||||||
|
"com.fightcade.Fightcade" = {
|
||||||
|
Environment = {
|
||||||
|
GTK_THEME = "${GTK-THEME}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"app.zen_browser.zen" = {
|
||||||
|
Environment = {
|
||||||
|
GTK_THEME = "${GTK-THEME}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xsettingsd = {
|
||||||
|
settings = {
|
||||||
|
"Gtk/CursorThemeSize" = 24;
|
||||||
|
"Gtk/CursorThemeName" = "${cursor-theme}";
|
||||||
|
"Gtk/FontName" = "${sans-font}, 12";
|
||||||
|
"Net/IconThemeName" = "Papirus-Dark";
|
||||||
|
"Net/ThemeName" = "${GTK-THEME}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xresources = {
|
||||||
|
properties = {
|
||||||
|
"Xcursor.size" = 24;
|
||||||
|
"Xcursor.theme" = "${cursor-theme}";
|
||||||
|
"Xft.autohint" = 1;
|
||||||
|
"Xft.lcdfilter" = "lcddefault";
|
||||||
|
"Xft.hintstyle" = "hintfull";
|
||||||
|
"Xft.hinting" = 1;
|
||||||
|
"Xft.antialias" = 1;
|
||||||
|
"Xft.rgba" = "rgb";
|
||||||
|
# Catppuccin
|
||||||
|
"*background" = "#1E1E2E";
|
||||||
|
"*foreground" = "#CDD6F4";
|
||||||
|
"*color0" = "#45475A";
|
||||||
|
"*color8" = "#585B70";
|
||||||
|
"*color1" = "#F38BA8";
|
||||||
|
"*color9" = "#F38BA8";
|
||||||
|
"*color2" = "#A6E3A1";
|
||||||
|
"*color10" = "#A6E3A1";
|
||||||
|
"*color3" = "#F9E2AF";
|
||||||
|
"*color11" = "#F9E2AF";
|
||||||
|
"*color4" = "#89B4FA";
|
||||||
|
"*color12" = "#89B4FA";
|
||||||
|
"*color5" = "#F5C2E7";
|
||||||
|
"*color13" = "#F5C2E7";
|
||||||
|
"*color6" = "#94E2D5";
|
||||||
|
"*color14" = "#94E2D5";
|
||||||
|
"*color7" = "#BAC2DE";
|
||||||
|
"*color15" = "#A6ADC8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
16
modules/default.nix
Normal file
16
modules/default.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# Programs
|
||||||
|
./apps
|
||||||
|
|
||||||
|
# # System
|
||||||
|
./components
|
||||||
|
# ./desktop-environments
|
||||||
|
|
||||||
|
# Profiles
|
||||||
|
./profiles
|
||||||
|
|
||||||
|
# Secrets
|
||||||
|
# ../secrets
|
||||||
|
];
|
||||||
|
}
|
||||||
134
modules/profiles/base.nix
Normal file
134
modules/profiles/base.nix
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
vars,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.base;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
base = {
|
||||||
|
enable = lib.mkEnableOption "Enable base in NixOS";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Custom modules
|
||||||
|
# Apps
|
||||||
|
# atuin.enable = true;
|
||||||
|
# bash.enable = true;
|
||||||
|
# bat.enable = true;
|
||||||
|
# boxxy.enable = true;
|
||||||
|
# btop.enable = true;
|
||||||
|
direnv.enable = true;
|
||||||
|
# distrobox.enable = true;
|
||||||
|
# envfs.enable = true;
|
||||||
|
# fastfetch.enable = true;
|
||||||
|
# fd.enable = true;
|
||||||
|
# fzf.enable = true;
|
||||||
|
git.enable = true;
|
||||||
|
# gpg.enable = true;
|
||||||
|
# helix.enable = true;
|
||||||
|
# home-managerConfig.enable = true;
|
||||||
|
# jujutsu.enable = true;
|
||||||
|
# keyd.enable = false;
|
||||||
|
# lazygit.enable = true;
|
||||||
|
# lsd.enable = true;
|
||||||
|
# mullvad.enable = true;
|
||||||
|
# navi.enable = true;
|
||||||
|
# nh.enable = true;
|
||||||
|
# nix-ld.enable = true;
|
||||||
|
# nix-index.enable = true;
|
||||||
|
# nushell.enable = true;
|
||||||
|
# nvim.enable = true;
|
||||||
|
# pay-respects.enable = true;
|
||||||
|
# ripgrep.enable = true;
|
||||||
|
# ssh.enable = true;
|
||||||
|
# starship.enable = true;
|
||||||
|
# tailscale.enable = true;
|
||||||
|
# tealdeer.enable = true;
|
||||||
|
# topgrade.enable = true;
|
||||||
|
# yazi.enable = true;
|
||||||
|
# yt-dlp.enable = true;
|
||||||
|
# zen-browser.enable = true;
|
||||||
|
# zoxide.enable = true;
|
||||||
|
# zsh.enable = true;
|
||||||
|
|
||||||
|
# System
|
||||||
|
# flatpak.enable = true;
|
||||||
|
# fonts.enable = true;
|
||||||
|
# hardening.enable = true;
|
||||||
|
# mounts.enable = true;
|
||||||
|
# networking.enable = true;
|
||||||
|
nixConfig.enable = true;
|
||||||
|
packages.enable = true;
|
||||||
|
# pipewire.enable = true;
|
||||||
|
# secrets.enable = true;
|
||||||
|
# users.enable = true;
|
||||||
|
# virtualization.enable = true;
|
||||||
|
|
||||||
|
console = {
|
||||||
|
earlySetup = true;
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
homeBinInPath = true;
|
||||||
|
localBinInPath = true;
|
||||||
|
shells = with pkgs; [
|
||||||
|
bashInteractive
|
||||||
|
zsh
|
||||||
|
];
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
lm_sensors
|
||||||
|
pciutils
|
||||||
|
sops
|
||||||
|
ssh-to-age
|
||||||
|
xdg-dbus-proxy
|
||||||
|
xdg-user-dirs
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = config.i18n.defaultLocale;
|
||||||
|
LC_IDENTIFICATION = config.i18n.defaultLocale;
|
||||||
|
LC_MEASUREMENT = config.i18n.defaultLocale;
|
||||||
|
LC_MONETARY = config.i18n.defaultLocale;
|
||||||
|
LC_NAME = config.i18n.defaultLocale;
|
||||||
|
LC_NUMERIC = config.i18n.defaultLocale;
|
||||||
|
LC_PAPER = config.i18n.defaultLocale;
|
||||||
|
LC_TELEPHONE = config.i18n.defaultLocale;
|
||||||
|
LC_TIME = config.i18n.defaultLocale;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
cron.enable = true;
|
||||||
|
dbus.implementation = "broker";
|
||||||
|
earlyoom = {
|
||||||
|
enable = true;
|
||||||
|
freeMemThreshold = 5;
|
||||||
|
enableNotifications = if vars.desktop then true else false;
|
||||||
|
};
|
||||||
|
fstrim.enable = true;
|
||||||
|
journald = {
|
||||||
|
extraConfig = ''
|
||||||
|
SystemMaxUse=50M
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
logrotate.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
extraConfig = ''
|
||||||
|
DefaultTimeoutStartSec=15s
|
||||||
|
DefaultTimeoutStopSec=10s
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
12
modules/profiles/default.nix
Normal file
12
modules/profiles/default.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./base.nix
|
||||||
|
./desktop.nix
|
||||||
|
# ./gaming.nix
|
||||||
|
# ./hardening.nix
|
||||||
|
./unfree.nix
|
||||||
|
# ./office.nix
|
||||||
|
./packages.nix
|
||||||
|
# ./server.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
214
modules/profiles/desktop.nix
Normal file
214
modules/profiles/desktop.nix
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
host,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./base.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
desktop = {
|
||||||
|
enable = lib.mkEnableOption "Enable desktop in NixOS";
|
||||||
|
hostMonitorSettings = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "hostMonitorSettings";
|
||||||
|
};
|
||||||
|
browser = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "firefox";
|
||||||
|
};
|
||||||
|
terminal = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "kitty";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Custom modules
|
||||||
|
base.enable = true;
|
||||||
|
catppuccinTheming.enable = true;
|
||||||
|
# floorp.enable = true;
|
||||||
|
# kde.enable = true;
|
||||||
|
# mumble.enable = true;
|
||||||
|
# office.enable = true;
|
||||||
|
vscode.enable = true;
|
||||||
|
# wezterm.enable = true;
|
||||||
|
# wireshark.enable = true;
|
||||||
|
# zed.enable = false;
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
AutoEnable = false;
|
||||||
|
ControllerMode = "bredr";
|
||||||
|
Experimental = "true";
|
||||||
|
}; # https://reddit.com/r/NixOS/comments/1aoteqb/keychron_k1_pro_bluetooth_nixos_wkde_install/kq49q9r/?context=3
|
||||||
|
};
|
||||||
|
};
|
||||||
|
enableAllFirmware = true;
|
||||||
|
i2c.enable = true;
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
services = {
|
||||||
|
# btrfs = {
|
||||||
|
# autoScrub = {
|
||||||
|
# enable = true;
|
||||||
|
# interval = "weekly";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
devmon.enable = true;
|
||||||
|
fwupd.enable = true;
|
||||||
|
geoclue2 = {
|
||||||
|
enable = true;
|
||||||
|
geoProviderUrl = "https://beacondb.net/v1/geolocate";
|
||||||
|
};
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
|
udev.packages = with pkgs; [ android-udev-rules ];
|
||||||
|
udisks2 = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.${username} =
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
vars,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
kitty
|
||||||
|
firefox
|
||||||
|
filezilla
|
||||||
|
];
|
||||||
|
xdg = {
|
||||||
|
mimeApps =
|
||||||
|
let
|
||||||
|
audioPlayer = "org.fooyin.fooyin.desktop";
|
||||||
|
browser = "app.zen_browser.zen.desktop";
|
||||||
|
editor = "org.kde.kate.desktop";
|
||||||
|
imageViewer = "org.kde.gwenview.desktop";
|
||||||
|
pdfViewer = "org.kde.okular.desktop";
|
||||||
|
videoPlayer = "org.kde.haruna.desktop";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
defaultApplications =
|
||||||
|
{
|
||||||
|
"audio/*" = audioPlayer;
|
||||||
|
"image/*" = imageViewer;
|
||||||
|
"video/*" = videoPlayer;
|
||||||
|
"text/*" = editor;
|
||||||
|
"text/html" = browser;
|
||||||
|
"text/plain" = editor;
|
||||||
|
"application/json" = editor;
|
||||||
|
"application/pdf" = pdfViewer;
|
||||||
|
"application/toml" = editor;
|
||||||
|
"application/x-bat" = editor;
|
||||||
|
"application/xhtml+xml" = browser;
|
||||||
|
"application/xml" = editor;
|
||||||
|
"application/x-shellscript" = editor;
|
||||||
|
"application/x-yaml" = editor;
|
||||||
|
"inode/directory" = "org.kde.dolphin.desktop";
|
||||||
|
"x-scheme-handler/bottles" = "com.usebottles.bottles.desktop";
|
||||||
|
"x-scheme-handler/http" = browser;
|
||||||
|
"x-scheme-handler/https" = browser;
|
||||||
|
"x-scheme-handler/terminal" = "org.wezfurlong.wezterm.desktop";
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs vars.gaming {
|
||||||
|
"application/x-cue" = "cdemu-client.desktop";
|
||||||
|
"application/x-msdownload" = "wine.desktop";
|
||||||
|
"x-scheme-handler/ror2mm" = "r2modman.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
portal = {
|
||||||
|
enable = true;
|
||||||
|
config.common.default = "*";
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
xdg-desktop-portal
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
configPackages = with pkgs; [
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
|
xdg-desktop-portal
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Services to start
|
||||||
|
services = {
|
||||||
|
xserver = {
|
||||||
|
enable = false;
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
greetd = {
|
||||||
|
enable = true;
|
||||||
|
vt = 1;
|
||||||
|
settings = rec {
|
||||||
|
initial_session = {
|
||||||
|
user = username;
|
||||||
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland"; # st>
|
||||||
|
};
|
||||||
|
default_session = initial_session;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
smartd = {
|
||||||
|
enable = false;
|
||||||
|
autodetect = true;
|
||||||
|
};
|
||||||
|
libinput.enable = true;
|
||||||
|
fstrim.enable = true;
|
||||||
|
gvfs.enable = true;
|
||||||
|
openssh.enable = true;
|
||||||
|
flatpak.enable = false;
|
||||||
|
printing = {
|
||||||
|
enable = true;
|
||||||
|
drivers = [
|
||||||
|
# pkgs.hplipWithPlugin
|
||||||
|
];
|
||||||
|
};
|
||||||
|
gnome.gnome-keyring.enable = true;
|
||||||
|
avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
ipp-usb.enable = true;
|
||||||
|
syncthing = {
|
||||||
|
enable = true;
|
||||||
|
user = "${username}";
|
||||||
|
dataDir = "/home/${username}";
|
||||||
|
configDir = "/home/${username}/.config/syncthing";
|
||||||
|
};
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
rpcbind.enable = false;
|
||||||
|
nfs.server.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
209
modules/profiles/packages.nix
Normal file
209
modules/profiles/packages.nix
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.packages;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
packages = {
|
||||||
|
enable = lib.mkEnableOption "Enable packages in home-manager";
|
||||||
|
dev = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
misc = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
system = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment = {
|
||||||
|
etc."packages".text =
|
||||||
|
let
|
||||||
|
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
|
||||||
|
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||||
|
formatted = builtins.concatStringsSep "\n" sortedUnique;
|
||||||
|
in
|
||||||
|
formatted;
|
||||||
|
};
|
||||||
|
programs.appimage = {
|
||||||
|
enable = true;
|
||||||
|
binfmt = true;
|
||||||
|
};
|
||||||
|
home-manager.users.${username} =
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.file = {
|
||||||
|
current-packages = {
|
||||||
|
enable = true;
|
||||||
|
text =
|
||||||
|
let
|
||||||
|
packages = builtins.map (p: "${p.name}") config.home.packages;
|
||||||
|
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||||
|
formatted-hm = builtins.concatStringsSep "\n" sortedUnique;
|
||||||
|
in
|
||||||
|
formatted-hm;
|
||||||
|
target = "${config.xdg.configHome}/packages-hm";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.packages =
|
||||||
|
with pkgs;
|
||||||
|
[ ]
|
||||||
|
++ lib.optionals cfg.dev [
|
||||||
|
# devbox
|
||||||
|
just
|
||||||
|
powershell
|
||||||
|
### Ansible ###
|
||||||
|
# ansible
|
||||||
|
# ansible-language-server
|
||||||
|
# ansible-lint
|
||||||
|
## Bash ###
|
||||||
|
bash-language-server
|
||||||
|
shellcheck
|
||||||
|
### C ###
|
||||||
|
clang-tools
|
||||||
|
cmake-language-server
|
||||||
|
### Docker ###
|
||||||
|
docker-compose-language-service
|
||||||
|
dockerfile-language-server-nodejs
|
||||||
|
### Go ###
|
||||||
|
gofumpt
|
||||||
|
gopls
|
||||||
|
gotools
|
||||||
|
#go
|
||||||
|
delve
|
||||||
|
### HTML / CSS / JSON ###
|
||||||
|
vscode-langservers-extracted
|
||||||
|
### Javascript ###
|
||||||
|
nodePackages.typescript-language-server
|
||||||
|
#nodePackages.vscode-json-languageserver
|
||||||
|
### Lua ###
|
||||||
|
lua-language-server
|
||||||
|
### Python ###
|
||||||
|
black
|
||||||
|
#python3
|
||||||
|
#python311Packages.python-lsp-server
|
||||||
|
ruff
|
||||||
|
ruff-lsp
|
||||||
|
### Rust ###
|
||||||
|
rustup
|
||||||
|
### Markdown ###
|
||||||
|
marksman
|
||||||
|
### Terraform ###
|
||||||
|
terraform-ls
|
||||||
|
### TOML ###
|
||||||
|
taplo-lsp
|
||||||
|
### YAML ###
|
||||||
|
nodePackages.yaml-language-server
|
||||||
|
yamllint
|
||||||
|
### XML ###
|
||||||
|
lemminx
|
||||||
|
]
|
||||||
|
++ lib.optionals cfg.misc [
|
||||||
|
angle-grinder
|
||||||
|
bandwhich
|
||||||
|
binsider
|
||||||
|
csvlens
|
||||||
|
flawz
|
||||||
|
glow
|
||||||
|
gping
|
||||||
|
hexyl
|
||||||
|
hyperfine
|
||||||
|
impala
|
||||||
|
jiq
|
||||||
|
jq
|
||||||
|
lazydocker
|
||||||
|
mkvtoolnix-cli
|
||||||
|
streamrip
|
||||||
|
systemctl-tui
|
||||||
|
television
|
||||||
|
termscp
|
||||||
|
ttysvr
|
||||||
|
wikiman
|
||||||
|
yq
|
||||||
|
## unix alts ##
|
||||||
|
choose # cut
|
||||||
|
dogdns # dig
|
||||||
|
dua # du
|
||||||
|
duf # df
|
||||||
|
#fuc # cp / rm
|
||||||
|
ouch # compression
|
||||||
|
pigz # gz
|
||||||
|
procs # ps
|
||||||
|
rclone # rsync
|
||||||
|
sd # sed
|
||||||
|
writedisk # dd
|
||||||
|
xh # curl
|
||||||
|
## Nix ##
|
||||||
|
comma
|
||||||
|
inputs.nsearch.packages.${pkgs.system}.default
|
||||||
|
manix
|
||||||
|
nixd
|
||||||
|
nix-init
|
||||||
|
nix-update
|
||||||
|
nixfmt-rfc-style
|
||||||
|
nixpkgs-review
|
||||||
|
nixos-shell
|
||||||
|
(writeShellApplication {
|
||||||
|
name = "nos";
|
||||||
|
runtimeInputs = [
|
||||||
|
coreutils
|
||||||
|
fzf
|
||||||
|
optinix
|
||||||
|
ripgrep
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
optinix get --no-tui | rg 'Name: ' | cut -d' ' -f2 | fzf --preview='optinix get --no-tui "{}"'
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
(writeShellApplication {
|
||||||
|
name = "nps";
|
||||||
|
runtimeInputs = [
|
||||||
|
fzf
|
||||||
|
inputs.nsearch.packages.${pkgs.system}.default
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
export NSEARCH_FZF_CMD="fzf --multi --bind=ctrl-space:select --bind=alt-space:deselect"
|
||||||
|
nsearch
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
nvd
|
||||||
|
optinix
|
||||||
|
statix
|
||||||
|
]
|
||||||
|
++ lib.optionals cfg.system [
|
||||||
|
(_7zz.override { enableUnfree = true; })
|
||||||
|
aspell
|
||||||
|
aspellDicts.en
|
||||||
|
killall
|
||||||
|
libnotify
|
||||||
|
kmon
|
||||||
|
p7zip
|
||||||
|
repgrep
|
||||||
|
unrar
|
||||||
|
unzip
|
||||||
|
usbutils
|
||||||
|
viu
|
||||||
|
wget
|
||||||
|
xclip
|
||||||
|
zip
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
20
modules/profiles/unfree.nix
Normal file
20
modules/profiles/unfree.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
vars,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.unfree;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
unfree = {
|
||||||
|
enable = lib.mkEnableOption "Enable unfree in NixOS";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
13
packages/overlay.nix
Normal file
13
packages/overlay.nix
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
(final: prev: {
|
||||||
|
plymouth = prev.plymouth.overrideAttrs (
|
||||||
|
{ src, ... }:
|
||||||
|
{
|
||||||
|
version = "24.004.60-unstable-2024-12-15";
|
||||||
|
|
||||||
|
src = src.override {
|
||||||
|
rev = "a0e8b6cf50114482e8b5d17ac2e99ff0f274d4c5";
|
||||||
|
hash = "sha256-XRSWdmGnckIGdsX7ihXK0RV3X9OphtGZcKQ6IW9FUBo=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
BIN
thalia-dev.qcow2
Normal file
BIN
thalia-dev.qcow2
Normal file
Binary file not shown.
7
users/default.nix
Normal file
7
users/default.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./ryan
|
||||||
|
# ./ai
|
||||||
|
./pvi
|
||||||
|
];
|
||||||
|
}
|
||||||
29
users/pvi/default.nix
Normal file
29
users/pvi/default.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.pvi;
|
||||||
|
username = "pvi";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
${username} = {
|
||||||
|
enable = lib.mkEnableOption "Enable porn account in NixOS & home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
users.users = {
|
||||||
|
${username} = {
|
||||||
|
initialPassword = "'";
|
||||||
|
isNormalUser = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home-manager.users.${username} =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
34
users/ryan/default.nix
Normal file
34
users/ryan/default.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
createUserScaffold = import ../scaffold.nix;
|
||||||
|
cfg = config.ryan;
|
||||||
|
username = "ryan";
|
||||||
|
fullname = "Ryan Pandya";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
${username} = {
|
||||||
|
enable = lib.mkEnableOption "Enable ${fullname} account in NixOS & home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
users.users = {
|
||||||
|
${username} = {
|
||||||
|
initialPassword = "'";
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home-manager.users.${username} =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user