1
0
Fork 0
forked from autowolf/nix

Merge pull request 'i pray this works for you :3' (#1) from cry/flake-autowolf:main into main

Reviewed-on: autowolf/nix#1
This commit is contained in:
do butterflies cry? 2026-02-23 13:22:58 +10:00
commit 0b2f7ccf0e
6 changed files with 240 additions and 159 deletions

View file

@ -1,119 +1,194 @@
{ config, inputs, lib, pkgs, ... }:
let
nvidiaPackage = config.hardware.nvidia.package;
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
config,
inputs,
lib,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nixpkgs = {
config.allowUnfree = true;
overlays = [
(self: super: {
hyprland = inputs.hyprland-git.packages."x86_64-linux".hyprland;
})
];
};
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
download-buffer-size = 524288000; # 500 MiB
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
programs.silentSDDM = {
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
networking = {
hostName = "girlCore";
networkmanager.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [];
allowedUDPPorts = [];
};
};
users.users.ashley = {
isNormalUser = true;
extraGroups = ["wheel"]; # Enable sudo for the user.
packages = with pkgs; [
tree
];
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {inherit inputs;};
users.ashley = import ./home.nix;
};
services = {
displayManager = {
sddm = {
enable = true;
theme = "rei";
settings = {
wayland.enable = ! config.services.xserver.enable; # experimental
};
defaultSession = "hyprland";
};
xserver.videoDrivers = lib.mkDefault ["nvidia"];
# Enable touchpad support (enabled default in most desktopManager).
libinput.enable = true;
# Enable audio
# Multimedia Framework
# With backwards compatability for alsa/pulseaudio/jack
pipewire = {
enable = true;
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
};
security.rtkit.enable = true; # simplifies pipewire's life
programs = {
hyprland = {
enable = true;
withUWSM = true; # Universal Wayland Session Manager
xwayland.enable = true;
};
gamemode.enable = true;
steam = {
enable = true;
gamescopeSession.enable = true; # .desktop entry for gamescope
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
# extraCompatPackages = with pkgs; [
# proton-ge-bin
# ];
};
silentSDDM = {
enable = true;
theme = "rei";
settings = {
"LoginScreen.LoginArea.Avatar" = {
shape = "circle";
active-border-color = "#ffcfce";
};
"LoginScreen" = {
background = "hana.jpg";
background = "hana.jpg";
};
"LockScreen" = {
background = "kokomi96024.png";
};
background = "kokomi96024.png";
};
};
};
};
networking.hostName = "girlCore"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Chicago";
# 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";
};
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
services.displayManager.defaultSession = "hyprland";
programs.hyprland.enable = true;
programs.hyprland.package = inputs.hyprland-git.packages."x86_64-linux".hyprland;
programs.steam = {
hardware = {
bluetooth = {
enable = true;
remotePlay.openFirewall = true; # optional
dedicatedServer.openFirewall = true; # optional
localNetworkGameTransfers.openFirewall = true; # optional
gamescopeSession.enable = true; # optional
powerOnBoot = true;
};
graphics = {
enable = true;
enable32Bit = true;
};
# nvidia drivers
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable;
powerManagement.finegrained = false;
# open = true;
open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware);
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
# WARNING: whether to use open-source or proprietary kernel modules
# open = lib.mkOverride 990 (package ? open && package ? firmware);
open = true;
nvidiaSettings = true;
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement = {
enable = false;
finegrained = false;
};
};
};
environment = {
# NOTE: loaded earlier than `environment.variables`
sessionVariables = {
# Hint Electrons apps to use Wayland
NIXOS_OZONE_WL = "1";
};
variables = {
EDITOR = "nvim";
};
# List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options).
systemPackages = with pkgs; [
git
neovim
wget
steamcmd
];
};
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.ashley = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
tree
];
};
# List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options).
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
git
neovim
wget
];
environment.variables.EDITOR = "nvim";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# List services that you want to enable:
# Enable the OpenSSH daemon.
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ ];
networking.firewall.allowedUDPPorts = [ ];
networking.firewall.enable = 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.
#

22
flake.lock generated
View file

@ -161,7 +161,9 @@
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"hyprwire": "hyprwire",
"nixpkgs": "nixpkgs",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems",
"xdph": "xdph"
@ -428,22 +430,6 @@
}
},
"nixpkgs": {
"locked": {
"lastModified": 1766070988,
"narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c6245e83d836d0433170a16eb185cefe0572f8b8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1771369470,
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
@ -487,7 +473,7 @@
"home-manager": "home-manager",
"hyprland-git": "hyprland-git",
"nixcats": "nixcats",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs",
"silentSDDM": "silentSDDM"
}
},

View file

@ -1,8 +1,9 @@
{
description = "NixOS configuration";
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# home-manager, used for managing user configuration
home-manager = {
url = "github:nix-community/home-manager/master";
@ -12,40 +13,35 @@ description = "NixOS configuration";
# to avoid problems caused by different versions of nixpkgs.
inputs.nixpkgs.follows = "nixpkgs";
};
silentSDDM = {
url = "github:uiriansan/SilentSDDM";
inputs.nixpkgs.follows = "nixpkgs";
};
};
nixcats.url = "github:BirdeeHub/nixCats-nvim";
hyprland-git = {
hyprland-git = {
url = "github:hyprwm/Hyprland/25250527793eb04bb60f103abe7f06370b9f6e1c";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, home-manager, nixcats, ... }: {
outputs = inputs @ {
nixpkgs,
home-manager,
silentSDDM,
...
}: {
nixosConfigurations = {
girlCore = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./configuration.nix
inputs.silentSDDM.nixosModules.default
# make home-manager as a module of nixos
# so that home-manager configuration will be deployed automatically when executing `nixos-rebuild switch`
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.ashley = import ./home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
}
silentSDDM.nixosModules.default
];
};
};

View file

@ -1,30 +1,34 @@
# 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")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci" "usbhid"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/10c61ccc-e175-4cfd-bd6a-08a57dbdb0b5";
fsType = "btrfs";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/10c61ccc-e175-4cfd-bd6a-08a57dbdb0b5";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/24E3-BA29";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/24E3-BA29";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};
swapDevices = [ ];
swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,5 +1,8 @@
{ inputs, pkgs, ... }:
{
inputs,
pkgs,
...
}: {
imports = [
./modules/neovim/nixcats.nix
./modules/waybar/default.nix
@ -36,7 +39,30 @@
};
};
};
services.kanshi = {
enable = true;
systemdTarget = "hyprland-session.target";
settings = [
{
# laptop screen
output.criteria = "eDP-1"; # XXX: TODO
output.mode = "1920x1080@240.00Hz";
output.scale = 1.0;
output.adaptiveSync = false; # Variable Refresh Rate
}
{
profile.name = "girlCore";
profile.outputs = [
{
criteria = "eDP-1"; # laptop screen
position = "0,0";
}
];
}
];
};
home.stateVersion = "25.11";
}

View file

@ -1,16 +1,10 @@
{
inputs,
config,
pkgs,
...
}: let
{inputs, ...}: let
utils = inputs.nixcats.utils;
in {
imports = [
inputs.nixcats.homeModule
];
config = {
# this value, nixCats is the defaultPackageName you pass to mkNixosModules
# it will be the namespace for your options.