complete rework

This commit is contained in:
Nickolaj Jepsen 2025-01-31 15:13:22 +01:00
parent d68c699a7a
commit 16813aeef9
89 changed files with 2888 additions and 1658 deletions

View file

@ -0,0 +1,15 @@
{
username,
stateVersion,
...
}: {
imports = [
../../targets/graphical.nix
../../targets/shell.nix
];
config = {
user.username = username;
system.stateVersion = stateVersion;
};
}

View file

@ -1,52 +0,0 @@
# 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
./nvidia.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";
NIXOS_OZONE_WL = "1";
};
programs.hyprland.enable = true;
programs.hyprland.xwayland.enable = true;
services.automatic-timezoned.enable = true;
virtualisation.docker.enable = true;
fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "Hack" ]; })
];
home-manager.users.${username}.imports = [
./home-manager.nix
];
environment.systemPackages = [
pkgs.gtk3
];
networking.wireless.enable = true;
networking.wireless.networks = {
Brother = {
psk = "fireproof";
};
"Drakenvej12-5G-1" = {
psk = "Eg9928nt.";
};
};
}

View file

@ -1,35 +0,0 @@
# 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;
}

View file

@ -1,152 +0,0 @@
{
pkgs,
config,
...
}: {
nixpkgs.config.permittedInsecurePackages = [
"electron-25.9.0" # Obsidian
];
home.packages = with pkgs; [
kitty
wofi
xfce.thunar
xterm
firefox
obsidian
# Dev
nodejs_20
supabase-cli
vscode
jetbrains.pycharm-professional
jetbrains.rust-rover
sublime-merge
];
programs.kitty = {
enable = true;
};
programs.vscode = {
enable = true;
enableUpdateCheck = true;
enableExtensionUpdateCheck = true;
extensions = with pkgs.vscode-extensions; [
github.copilot
ms-python.python
ms-vscode-remote.remote-ssh
# ms-vscode-remote.remote-ssh-edit
];
userSettings = {
"window.titleBarStyle" = "custom";
"remote.SSH.useLocalServer" = false;
"github.copilot.enable" = {
"*" = true;
};
};
};
wayland.windowManager.hyprland = {
enable = true;
package = pkgs.hyprland;
systemd.enable = true;
settings = {
"monitor" = ",preferred,auto,1";
"exec-once" = "eww daemon & eww open primary";
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 = true;
};
sensitivity = "0"; # -1.0 - 1.0, 0 means no modification.
accel_profile = "flat";
};
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 2;
"col.inactive_border" = "rgb(2f2f2f)";
"col.active_border" = "rgb(cf6a4c)";
layout = "dwindle";
};
cursor = {
no_warps = true;
};
dwindle = {
pseudotile = true;
preserve_split = true;
force_split = 2;
use_active_for_splits = true;
};
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 --show drun"
"$mod, q, workspace, 1"
"$mod, w, workspace, 2"
"$mod, e, workspace, 3"
"$mod, r, workspace, 4"
"$mod, t, workspace, 5"
"SUPER_SHIFT, q, movetoworkspace, 1"
"SUPER_SHIFT, w, movetoworkspace, 2"
"SUPER_SHIFT, e, movetoworkspace, 3"
"SUPER_SHIFT, r, movetoworkspace, 4"
"SUPER_SHIFT, t, movetoworkspace, 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"
];
};
};
}

View file

@ -1,23 +0,0 @@
{ config, lib, pkgs, ... }:
{
# Enable OpenGL
hardware.opengl = {
enable = true;
};
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
boot = {
blacklistedKernelModules = lib.mkDefault [ "nouveau" ];
kernelParams = [ "nvidia-drm.fbdev=1" ];
kernelModules = [ "kvm-intel" "nvidia" "i915" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
};
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable;
nvidiaSettings = true;
modesetting.enable = true;
};
}

18
machines/qemu/default.nix Normal file
View file

@ -0,0 +1,18 @@
{
username,
stateVersion,
...
}: {
imports = [
../../targets/graphical.nix
../../targets/shell.nix
];
config = {
user.username = username;
system.stateVersion = stateVersion;
monitor.primary.resolution = "1920x1080";
services.qemuGuest.enable = true;
services.spice-vdagentd.enable = true;
};
}

View file

@ -1,58 +0,0 @@
# 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, username, inputs, ... }:
{
imports = [ ];
environment.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
};
#services.xserver.enable = true;
#services.xserver.displayManager.gdm = {
# enable = true;
#};
programs.hyprland.enable = true;
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland;
programs.hyprland.xwayland.enable = true;
# programs.hyprland.enableNvidiaPatches = true;
home-manager.users.${username}.imports = [
./home-manager.nix
];
environment.systemPackages = [
pkgs.gtk3
];
hardware.opengl = {
enable = true;
driSupport = true;
#extraPackages = with pkgs; [
# vaapiVdpau
# libvdpau-va-gl
#];
};
boot.initrd.availableKernelModules = [ "ohci_pci" "ehci_pci" "ahci" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.loader.grub.device = "nodev";
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f222513b-ded1-49fa-b591-20ce86a2fe7f";
fsType = "ext4";
};
swapDevices = [ ];
# 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.enp0s3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
virtualisation.virtualbox.guest.enable = true;
}

View file

@ -1,31 +0,0 @@
{
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 = {
"$mod" = "SUPER";
bind = [
"$mod, RETURN, exec, kitty"
"$mod, SPACE, exec, wofi --show drun"
];
};
};
}

View file

@ -1,26 +0,0 @@
{
username,
pkgs,
...
}: {
programs.nix-ld = {
enable = true;
};
wsl = {
enable = true;
defaultUser = username;
};
home-manager.users.${username}.imports = [
./home-manager.nix
];
# Hacks to enable vscode
services.vscode-server.enable = true;
wsl.extraBin = with pkgs; [
{ src = "${coreutils}/bin/uname"; }
{ src = "${coreutils}/bin/dirname"; }
{ src = "${coreutils}/bin/readlink"; }
];
}