This commit is contained in:
joy 2024-06-19 13:10:38 +02:00
parent 4633813247
commit 9794be4a17
7 changed files with 16 additions and 98 deletions

View file

@ -27,7 +27,6 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./hosts/pc ./hosts/pc
# inputs.stylix.nixosModules.stylix
]; ];
}; };
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem { nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {

View file

@ -11,7 +11,6 @@
ls = "ls -a"; ls = "ls -a";
sp = "sudo nixos-rebuild switch --flake ~/nix/#pc"; sp = "sudo nixos-rebuild switch --flake ~/nix/#pc";
sl = "sudo nixos-rebuild switch --flake ~/nix/#laptop"; sl = "sudo nixos-rebuild switch --flake ~/nix/#laptop";
sc = "sudo nixos-rebuild switch --flake ~/nix/#craptop";
up = "sudo nix flake update ~/nix"; up = "sudo nix flake update ~/nix";
fr = "sudo systemctl reboot --firmware"; fr = "sudo systemctl reboot --firmware";
hy = "vim ~/nix/home/hyprland/default.nix"; hy = "vim ~/nix/home/hyprland/default.nix";
@ -20,13 +19,13 @@
v = "vim"; v = "vim";
ser = "ssh root@joygnu.org"; ser = "ssh root@joygnu.org";
zs = "vim ~/nix/home/zsh/default.nix"; zs = "vim ~/nix/home/zsh/default.nix";
ep = "vim ~/nix/modules/packages/default.nix"; epa = "vim ~/nix/modules/packages/default.nix";
del = "sudo nix-collect-garbage -d"; del = "sudo nix-collect-garbage -d";
push = "git push origin main && git push berg main"; push = "git push origin main && git push berg main";
ec = "vim ~/nix/hosts/pc/default.nix"; ec = "vim ~/nix/hosts/pc/default.nix";
el = "vim ~/nix/hosts/laptop/default.nix"; el = "vim ~/nix/hosts/laptop/default.nix";
ef = "vim ~/nix/flake.nix"; ef = "vim ~/nix/flake.nix";
epc = "vim ~/nix/hosts/pc/default.nix"; ep = "vim ~/nix/hosts/pc/default.nix";
em = "vim ~/nix/modules/misc/default.nix"; em = "vim ~/nix/modules/misc/default.nix";
es = "vim ~/nix/modules/stylix/default.nix"; es = "vim ~/nix/modules/stylix/default.nix";
}; };

View file

@ -2,10 +2,19 @@
{ {
networking.hostName = "laptop"; networking.hostName = "laptop";
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
hardware.nvidia.nvidiaSettings = true; #boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.enable = true; #boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi"; # ← use the same mount point here.
};
grub = {
efiSupport = true;
#efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work for your system
device = "nodev";
};
};
imports = [ imports = [
../../modules ../../modules
./hardware.nix ./hardware.nix

View file

@ -1,14 +1,12 @@
{ {
imports = [ imports = [
./fonts ./fonts
./gpu
./yazi ./yazi
./sound ./sound
# ./vm ./vm
./retro ./retro
./packages ./packages
./misc ./misc
./gdm ./gdm
# ./stylix
]; ];
} }

View file

@ -1,54 +0,0 @@
{ pkgs, config, ... }:
let
# Change this to your username.
user = "joy";
# Change this to match your system's CPU.
platform = "amd";
# Change this to specify the IOMMU ids you wrote down earlier.
vfioIds = [ "10de:249c" "10de:228b" ];
in {
# Configure kernel options to make sure IOMMU & KVM support is on.
boot = {
kernelModules = [ "kvm-${platform}" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
kernelParams = [ "${platform}_iommu=on" "${platform}_iommu=pt" "kvm.ignore_msrs=1" ];
extraModprobeConfig = "options vfio-pci ids=${builtins.concatStringsSep "," vfioIds}";
};
# Add a file for looking-glass to use later. This will allow for viewing the guest VM's screen in a
# performant way.
systemd.tmpfiles.rules = [
"f /dev/shm/looking-glass 0660 ${user} qemu-libvirtd -"
];
# Add virt-manager and looking-glass to use later.
environment.systemPackages = with pkgs; [
virt-manager
looking-glass-client
];
# Enable virtualisation programs. These will be used by virt-manager to run your VM.
virtualisation = {
libvirtd = {
enable = true;
extraConfig = ''
user="${user}"
'';
# Don't start any VMs automatically on boot.
onBoot = "ignore";
# Stop all running VMs on shutdown.
onShutdown = "shutdown";
qemu = {
package = pkgs.qemu_kvm;
ovmf = enabled;
verbatimConfig = ''
namespaces = []
user = "+${builtins.toString config.users.users.${user}.uid}"
'';
};
};
};
users.users.${user}.extraGroups = [ "qemu-libvirtd" "libvirtd" "disk" ];
}

View file

@ -1,33 +0,0 @@
{ config, inputs, pkgs, ... }:
{
stylix.image = ./image.png;
stylix.override= {
base00 = "282828";
base01 = "3c3836";
base02 = "504945";
base03 = "665c54";
base04 = "bdae93";
base05 = "d5c4a1";
base06 = "ebdbb2";
base07 = "fbf1c7";
base08 = "fb4934";
base09 = "fe8019";
base0A = "fabd2f";
base0B = "b8bb26";
base0C = "8ec07c";
base0D = "83a598";
base0E = "d3869b";
base0F = "d65d0e";
};
stylix.cursor.package = pkgs.bibata-cursors;
stylix.cursor.name = "Bibata-Modern-Ice";
stylix.cursor.size = 24;
stylix.targets.chromium.enable = false;
#stylix.homeManagerIntegration.autoImport = false;
stylix.targets.waybar.enable = false;
stylix.targets.rofi.enable = false;
#stylix.targets.alaritty.enable = false;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 KiB