add zsh config, gnome extensions, zoom, fprintd

This commit is contained in:
Lukas Heiligenbrunner 2023-11-08 22:09:04 +01:00
parent d94c80295f
commit baeec4b172
7 changed files with 1843 additions and 25 deletions

View File

@ -12,10 +12,6 @@
]; ];
# Bootloader. # Bootloader.
#boot.loader.grub.enable = true;
#boot.loader.grub.device = "/dev/sda";
#boot.loader.grub.useOSProber = true;
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
@ -102,6 +98,8 @@
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
users.defaultUserShell = pkgs.zsh;
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
# programs.mtr.enable = true; # programs.mtr.enable = true;

View File

@ -4,14 +4,13 @@
inputs = { inputs = {
# import nixos packages # import nixos packages
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
#nixpkgs.url = "github:NixOS/nixpkgs/gnome";
# import homemanager # import homemanager
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
gnomeNixpkgs.url = "github:NixOS/nixpkgs/gnome";
}; };
outputs = { self, nixpkgs, home-manager, gnomeNixpkgs }: outputs = { self, nixpkgs, home-manager }:
let let
system="x86_64-linux"; system="x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
@ -24,13 +23,6 @@
main = lib.nixosSystem { main = lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
# {
# nixpkgs.overlays = [
# (self: super: {
# gnome = gnomeNixpkgs.legacyPackages.x86_64-linux.gnome;
# })
# ];
# }
./configuration.nix ./configuration.nix
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {
@ -39,6 +31,9 @@
home-manager.users.lukas = { home-manager.users.lukas = {
imports = [ ./home.nix ]; imports = [ ./home.nix ];
}; };
home-manager.users.root = {
imports = [ ./home-root.nix ];
};
} }
]; ];
}; };

View File

@ -8,35 +8,31 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/104ae3e3-9095-4fcd-a916-6c64a3280e36"; { device = "/dev/disk/by-uuid/c4b4ecd9-d7bb-4888-9652-a57aea10e8cd";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/CBB7-1A0B"; { device = "/dev/disk/by-uuid/6F72-E139";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [ ];
[ { device = "/dev/disk/by-uuid/de9c4a47-281d-4846-94fc-38d90b627f29"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (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 # 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`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.eth0.useDHCP = lib.mkDefault true; # networking.interfaces.eth0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true; # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

39
home-root.nix Normal file
View File

@ -0,0 +1,39 @@
{ config, pkgs, ... }:
{
imports =
[];
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "23.11";
# set git names
programs.git = {
enable = true;
userName = "Lukas Heiligenbrunner";
userEmail = "lukas.heiligenbrunner@gmail.com";
};
programs.zsh = {
enable = true;
shellAliases = {
ll = "ls -l";
};
history = {
path = "${config.xdg.dataHome}/zsh/history";
size = 10000;
};
initExtra = ''
source /home/lukas/.p10k.zsh
'';
plugins = [
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
];
};
}

View File

@ -15,6 +15,7 @@
enable-hot-corners = true; enable-hot-corners = true;
clock-show-seconds = true; clock-show-seconds = true;
show-battery-percentage = true; show-battery-percentage = true;
scaling-factor = 1.25;
}; };
"org/gnome/mutter" = { "org/gnome/mutter" = {
dynamic-workspaces = true; dynamic-workspaces = true;
@ -22,9 +23,25 @@
}; };
"org/gnome/shell" = { "org/gnome/shell" = {
favorite-apps = ["org.gnome.Nautilus.desktop" "gnome-system-monitor.desktop" "firefox.desktop" "org.gnome.Console.desktop"]; favorite-apps = ["org.gnome.Nautilus.desktop" "gnome-system-monitor.desktop" "firefox.desktop" "org.gnome.Console.desktop"];
# set extensions
disable-user-extensions = false;
# `gnome-extensions list` for a list
enabled-extensions = [
"Vitals@CoreCoding.com"
"tiling-assistant@leleat-on-github"
];
};
"org/gnome/shell/extensions/tiling-assistant" = {
enable-tiling-popup = false;
}; };
}; };
#sound #sound
dconf.settings = { dconf.settings = {
"org/gnome/settings-daemon/plugins/media-keys" = { "org/gnome/settings-daemon/plugins/media-keys" = {
@ -80,4 +97,37 @@
show-grid = true; show-grid = true;
}; };
}; };
# gnome extensions
home.packages = with pkgs; [
gnomeExtensions.vitals
gnomeExtensions.tiling-assistant
];
programs.zsh = {
enable = true;
shellAliases = {
ll = "ls -l";
};
history = {
path = "${config.xdg.dataHome}/zsh/history";
size = 10000;
};
initExtra = ''
source .p10k.zsh
'';
plugins = [
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
];
};
home.file.".p10k.zsh" = {
source = ./resources/.p10k.zsh;
};
} }

View File

@ -22,6 +22,11 @@
# disable xterm # disable xterm
services.xserver.excludePackages = [ pkgs.xterm ]; services.xserver.excludePackages = [ pkgs.xterm ];
services.fwupd.enable = true;
# For fingerprint support
services.fprintd.enable = lib.mkDefault true;
programs.steam.enable = true;
programs.zsh.enable = true;
# packages in global env # packages in global env
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -29,6 +34,8 @@
wget wget
scrcpy scrcpy
cmake cmake
lm_sensors
smartmontools
# web # web
firefox firefox
@ -48,6 +55,7 @@
# multimedia # multimedia
vlc vlc
gimp gimp
zoom-us
# file transfer # file transfer
warp warp

1732
resources/.p10k.zsh Normal file

File diff suppressed because it is too large Load Diff