Really rough, but hyprland starts

This commit is contained in:
2024-05-09 01:20:06 -07:00
parent 5d6a4e9328
commit 70cc31962b
7 changed files with 179 additions and 81 deletions

View File

@@ -1,34 +0,0 @@
{ config, pkgs, callPackage, ... }:
{
environment.pathsToLink = ["/libexec"];
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
};
displayManager = {
defaultSession = "none+i3";
};
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
extraPackages = with pkgs; [
dmenu
i3status
i3lock
];
};
};
environment.systemPackages = with pkgs; [
htop
firefox-bin
git
];
}

View File

@@ -1,37 +0,0 @@
{ config, pkgs, callPackage, ... }:
{
# Enable nix flakes
nix.settings.experimental-features = ["nix-command", "flakes"];
# For x server/i3
environment.pathsToLink = ["/libexec"];
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
};
displayManager = {
defaultSession = "none+i3";
};
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
extraPackages = with pkgs; [
dmenu
i3status
i3lock
];
};
};
environment.systemPackages = with pkgs; [
htop
firefox-bin
];
}

48
flake.lock generated Normal file
View File

@@ -0,0 +1,48 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1715077503,
"narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6e277d9566de9976f47228dd8c580b97488734d4",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1715087517,
"narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b211b392b8486ee79df6cdfb1157ad2133427a29",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

23
flake.nix Normal file
View File

@@ -0,0 +1,23 @@
{
description = "Nixos config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/cap-nr200p/configuration.nix
./modules/nixos/hyprland.nix
inputs.home-manager.nixosModules.default
];
};
};
}

View File

@@ -8,14 +8,13 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./custom-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
networking.hostName = "cap-nr200p"; # Define your hostname. #-#
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
@@ -25,6 +24,9 @@
# Enable networking
networking.networkmanager.enable = true;
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ]; #-#
# Set your time zone.
time.timeZone = "America/Los_Angeles";
@@ -43,20 +45,57 @@
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Enable the XFCE Desktop Environment.
# services.xserver.displayManager.lightdm.enable = true;
# services.xserver.desktopManager.xfce.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.variant = "";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.caperren = {
isNormalUser = true;
description = "Corwin Perren";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
packages = with pkgs; [
# thunderbird
];
};
# Install firefox.
programs.firefox.enable = true; #-#
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
@@ -65,6 +104,8 @@
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
lf
git
];
# Some programs need SUID wrappers, can be configured further or are
@@ -78,7 +119,7 @@
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.enable = true; #-#
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];

View File

@@ -5,22 +5,23 @@
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "xhci_pci" "ahci" "sd_mod" "sr_mod" ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/8ec06846-5c42-43be-8f68-d85d7e535d4d";
{ device = "/dev/disk/by-uuid/0ffc75db-278d-4d96-99ee-4d17e6b1a9c2";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/78EB-B4C5";
{ device = "/dev/disk/by-uuid/5BDD-941D";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
@@ -30,7 +31,8 @@
# 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.ens3.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -0,0 +1,55 @@
{ pkgs, config, ... }: {
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
environment.sessionVariables = {
# If your cursor becomes invisible
# WLR_NO_HARDWARE_CURSORS = "1";
# Hint electron apps to use wayland
NIXOS_OZONE_WL = "1";
};
services.xserver = {
enable = true;
videoDrivers = [ "nvidia" ];
displayManager.gdm = {
enable = true;
wayland = true;
};
};
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
hardware.nvidia = {
# Enable modesetting for Wayland compositors (hyprland)
modesetting.enable = true;
# Use the open source version of the kernel module (for driver 515.43.04+)
# open = true;
# Enable the Nvidia settings menu
nvidiaSettings = true;
# Select the appropriate driver version for your specific GPU
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
environment.systemPackages = [
pkgs.hyprland
pkgs.kitty
pkgs.waybar
pkgs.dunst
pkgs.libnotify
pkgs.rofi-wayland
#(pkgs.waybar.overrideAttrs (oldAttrs: {
# mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
# })
#)
];
xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
}