mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
first attempt at a legion setup
This commit is contained in:
parent
b5febd4395
commit
c69ed34507
11 changed files with 527 additions and 44 deletions
45
machines/legion/configuration.nix
Normal file
45
machines/legion/configuration.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, username, inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/nvme0n1";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
|
||||
environment.sessionVariables = {
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
};
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
programs.hyprland.xwayland.enable = true;
|
||||
|
||||
home-manager.users.${username}.imports = [
|
||||
./home-manager.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.gtk3
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
};
|
||||
|
||||
networking.wireless.enable = true;
|
||||
networking.wireless.networks = {
|
||||
Brother = {
|
||||
psk = "fireproof";
|
||||
};
|
||||
};
|
||||
}
|
||||
35
machines/legion/hardware-configuration.nix
Normal file
35
machines/legion/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/ba0e4c19-b23f-4099-9107-167e4babe3f2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/61ff6a39-c765-43c4-ae64-09f94478e0aa"; }
|
||||
];
|
||||
|
||||
# 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.enp7s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
104
machines/legion/home-manager.nix
Normal file
104
machines/legion/home-manager.nix
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
nodejs_20
|
||||
kitty
|
||||
alacritty
|
||||
wofi
|
||||
vscode
|
||||
xfce.thunar
|
||||
xterm
|
||||
foot
|
||||
firefox
|
||||
];
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
"monitor" = ",preferred,auto,1";
|
||||
|
||||
workspace = [
|
||||
"1, monitor:eDP-1, default:true"
|
||||
"2, monitor:eDP-1"
|
||||
"3, monitor:eDP-1"
|
||||
"4, monitor:eDP-1"
|
||||
"5, monitor:eDP-1"
|
||||
];
|
||||
|
||||
layerrule = "noanim, wofi";
|
||||
|
||||
input = {
|
||||
kb_layout = "dk";
|
||||
kb_options = "caps:backspace";
|
||||
follow_mouse = "2"; # Cursor focus will be detached from keyboard focus. Clicking on a window will move keyboard focus to that window.
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = "no";
|
||||
};
|
||||
|
||||
sensitivity = "0"; # -1.0 - 1.0, 0 means no modification.
|
||||
accel_profile = "flat";
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
#col.active_border = "rgb(cf6a4c)";
|
||||
no_cursor_warps = true;
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
misc = {
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 5;
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
#col.shadow = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
"$mod" = "SUPER";
|
||||
bind = [
|
||||
"$mod, RETURN, exec, kitty"
|
||||
"$mod, BACKSPACE, killactive"
|
||||
"$mod, SPACE, exec, wofi"
|
||||
|
||||
"$mod, q, workspace, 1"
|
||||
"$mod, w, workspace, 2"
|
||||
"$mod, e, workspace, 3"
|
||||
"$mod, r, workspace, 4"
|
||||
"$mod, t, workspace, 5"
|
||||
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, l, movefocus, r"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, j, movefocus, d"
|
||||
|
||||
"$mod, S, togglefloating,"
|
||||
"$mod, A, pseudo," # dwindle
|
||||
"$mod, D, fullscreen," # dwindle
|
||||
"$mod, BACKSLASH, togglesplit," # dwindle
|
||||
"$mod, M, togglegroup," # dwindle
|
||||
|
||||
];
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue