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 = config,
[ # Include the results of the hardware scan. inputs,
./hardware-configuration.nix lib,
]; pkgs,
...
}: {
imports = [
./hardware-configuration.nix
];
# Allow unfree packages nixpkgs = {
nixpkgs.config.allowUnfree = true; 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. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader = {
boot.loader.efi.canTouchEfiVariables = true; systemd-boot.enable = true;
programs.silentSDDM = { 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; enable = true;
theme = "rei"; wayland.enable = ! config.services.xserver.enable; # experimental
settings = { };
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" = { "LoginScreen.LoginArea.Avatar" = {
shape = "circle"; shape = "circle";
active-border-color = "#ffcfce"; active-border-color = "#ffcfce";
}; };
"LoginScreen" = { "LoginScreen" = {
background = "hana.jpg"; background = "hana.jpg";
}; };
"LockScreen" = { "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; enable = true;
remotePlay.openFirewall = true; # optional powerOnBoot = true;
dedicatedServer.openFirewall = true; # optional };
localNetworkGameTransfers.openFirewall = true; # optional
gamescopeSession.enable = true; # optional graphics = {
enable = true;
enable32Bit = true;
}; };
# nvidia drivers # nvidia drivers
hardware.graphics.enable = true; nvidia = {
hardware.graphics.enable32Bit = true; package = config.boot.kernelPackages.nvidiaPackages.stable;
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;
powerManagement.finegrained = false; # WARNING: whether to use open-source or proprietary kernel modules
# open = true; # open = lib.mkOverride 990 (package ? open && package ? firmware);
open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware); open = true;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`. nvidiaSettings = true;
nvidiaSettings = true; modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.stable; # 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, # 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. # 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", "hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner", "hyprwayland-scanner": "hyprwayland-scanner",
"hyprwire": "hyprwire", "hyprwire": "hyprwire",
"nixpkgs": "nixpkgs", "nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"systems": "systems", "systems": "systems",
"xdph": "xdph" "xdph": "xdph"
@ -428,22 +430,6 @@
} }
}, },
"nixpkgs": { "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": { "locked": {
"lastModified": 1771369470, "lastModified": 1771369470,
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
@ -487,7 +473,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland-git": "hyprland-git", "hyprland-git": "hyprland-git",
"nixcats": "nixcats", "nixcats": "nixcats",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs",
"silentSDDM": "silentSDDM" "silentSDDM": "silentSDDM"
} }
}, },

View file

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

View file

@ -1,30 +1,34 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
]; pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usbhid" ]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci" "usbhid"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/10c61ccc-e175-4cfd-bd6a-08a57dbdb0b5"; device = "/dev/disk/by-uuid/10c61ccc-e175-4cfd-bd6a-08a57dbdb0b5";
fsType = "btrfs"; fsType = "btrfs";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/24E3-BA29"; device = "/dev/disk/by-uuid/24E3-BA29";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = ["fmask=0077" "dmask=0077"];
}; };
swapDevices = [ ]; swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,5 +1,8 @@
{ inputs, pkgs, ... }:
{ {
inputs,
pkgs,
...
}: {
imports = [ imports = [
./modules/neovim/nixcats.nix ./modules/neovim/nixcats.nix
./modules/waybar/default.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"; home.stateVersion = "25.11";
} }

View file

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