Update config

This commit is contained in:
thiloho
2024-08-07 11:31:13 +02:00
parent 46c1c783ec
commit 117c9c188b
7 changed files with 238 additions and 158 deletions

View File

@@ -10,12 +10,18 @@
}; };
}; };
outputs = inputs@{ nixpkgs, home-manager, ... }: { outputs =
nixosConfigurations = let inputs@{ nixpkgs, home-manager, ... }:
mkSystem = entrypoint: {
nixosConfigurations =
let
mkSystem =
entrypoint:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = {
inherit inputs;
};
modules = [ modules = [
entrypoint entrypoint
{ nix.registry.nixpkgs.flake = nixpkgs; } { nix.registry.nixpkgs.flake = nixpkgs; }
@@ -28,7 +34,8 @@
} }
]; ];
}; };
in { in
{
pc = mkSystem ./nixos-configurations/pc; pc = mkSystem ./nixos-configurations/pc;
laptop = mkSystem ./nixos-configurations/laptop; laptop = mkSystem ./nixos-configurations/laptop;
}; };

View File

@@ -15,9 +15,13 @@
package = pkgs.mariadb; package = pkgs.mariadb;
}; };
home-manager.users.thiloho = { pkgs, ... }: { home-manager.users.thiloho =
{ pkgs, ... }:
{
programs.git.signing.key = "5CF074CA31DD6686"; programs.git.signing.key = "5CF074CA31DD6686";
home = { stateVersion = "23.05"; }; home = {
stateVersion = "23.05";
};
}; };
system.stateVersion = "23.05"; system.stateVersion = "23.05";
} }

View File

@@ -1,32 +1,42 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/fb24df9f-cd78-47ad-ad14-39cf9befa557"; device = "/dev/disk/by-uuid/fb24df9f-cd78-47ad-ad14-39cf9befa557";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/EBB7-9D7A"; device = "/dev/disk/by-uuid/EBB7-9D7A";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [
"fmask=0022"
"dmask=0022"
];
}; };
swapDevices = swapDevices = [ { device = "/dev/disk/by-uuid/8f51c241-0b76-4a7c-88e3-5cbde2d4237a"; } ];
[ { device = "/dev/disk/by-uuid/8f51c241-0b76-4a7c-88e3-5cbde2d4237a"; }
];
# 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

View File

@@ -12,8 +12,14 @@
networking = { networking = {
hostName = "pc"; hostName = "pc";
firewall = { firewall = {
allowedTCPPorts = [ 5173 8081 ]; allowedTCPPorts = [
allowedUDPPorts = [ 5173 8081 ]; 5173
8081
];
allowedUDPPorts = [
5173
8081
];
}; };
}; };
@@ -55,13 +61,17 @@
''}" ''}"
]; ];
home-manager.users.thiloho = { pkgs, lib, ... }: { home-manager.users.thiloho =
programs.git.signing.key = "5ECD00BDC15A987E"; { pkgs, lib, ... }:
{
programs.git.signing.key = "5FED02C109365F87";
home = { home = {
packages = with pkgs; [ blender inkscape ]; packages = with pkgs; [
blender
inkscape
];
stateVersion = "23.05"; stateVersion = "23.05";
}; };
}; };
system.stateVersion = "23.05"; system.stateVersion = "23.05";
} }

View File

@@ -1,32 +1,44 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/9e4f1090-bb46-4fd8-9a2d-e053c08af7d0"; device = "/dev/disk/by-uuid/9e4f1090-bb46-4fd8-9a2d-e053c08af7d0";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/D4D5-F5A5"; device = "/dev/disk/by-uuid/D4D5-F5A5";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
"fmask=0077"
"dmask=0077"
];
}; };
swapDevices = swapDevices = [ { device = "/dev/disk/by-uuid/54590048-bdf2-4faa-8176-f6e1d582c357"; } ];
[ { device = "/dev/disk/by-uuid/54590048-bdf2-4faa-8176-f6e1d582c357"; }
];
# 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

View File

@@ -40,19 +40,39 @@
}; };
}; };
environment.gnome.excludePackages = with pkgs; [
# for packages that are pkgs.*
gnome-tour
gnome-connections
epiphany
geary
evince
gnome-calendar
gnome.gnome-contacts
gnome.gnome-weather
gnome.gnome-maps
gnome.gnome-clocks
gnome.gnome-music
snapshot
simple-scan
];
users = { users = {
mutableUsers = false; mutableUsers = false;
users = { users = {
root.hashedPassword = "$y$j9T$BfX6ErL64B97Ug1ZrH1GN.$cK/3FlWSDJ99wpbbwu3hBAPX0jGew/zfJhQKf7/OQ12"; root.hashedPassword = "$y$j9T$BfX6ErL64B97Ug1ZrH1GN.$cK/3FlWSDJ99wpbbwu3hBAPX0jGew/zfJhQKf7/OQ12";
thiloho = { thiloho = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker" ]; extraGroups = [
"wheel"
"networkmanager"
"docker"
];
hashedPassword = "$y$j9T$PmPi.Ji1jDw5rBaKCRepp/$LJLuvnFXiG/8jomOPVwv31R/tKgUmp.W2mKdo08FUK3"; hashedPassword = "$y$j9T$PmPi.Ji1jDw5rBaKCRepp/$LJLuvnFXiG/8jomOPVwv31R/tKgUmp.W2mKdo08FUK3";
}; };
}; };
}; };
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ 53317 ]; allowedTCPPorts = [ 53317 ];
allowedUDPPorts = [ 53317 ]; allowedUDPPorts = [ 53317 ];
@@ -78,7 +98,14 @@
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
home-manager.users.thiloho = { pkgs, lib, config, ... }: { home-manager.users.thiloho =
{
pkgs,
lib,
config,
...
}:
{
programs = { programs = {
yt-dlp = { yt-dlp = {
enable = true; enable = true;
@@ -86,7 +113,9 @@
firefox = { firefox = {
enable = true; enable = true;
package = pkgs.firefox-devedition.override { package = pkgs.firefox-devedition.override {
cfg = { speechSynthesisSupport = true; }; cfg = {
speechSynthesisSupport = true;
};
}; };
}; };
chromium = { chromium = {
@@ -97,7 +126,9 @@
enable = true; enable = true;
package = pkgs.vscodium; package = pkgs.vscodium;
mutableExtensionsDir = false; mutableExtensionsDir = false;
extensions = with pkgs.vscode-extensions; [ extensions =
with pkgs.vscode-extensions;
[
# svelte.svelte-vscode # svelte.svelte-vscode
jnoortheen.nix-ide jnoortheen.nix-ide
ritwickdey.liveserver ritwickdey.liveserver
@@ -112,8 +143,6 @@
} }
]; ];
userSettings = { userSettings = {
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nil";
"editor.indentSize" = 2; "editor.indentSize" = 2;
"editor.tabSize" = 2; "editor.tabSize" = 2;
"typescript.preferences.importModuleSpecifier" = "relative"; "typescript.preferences.importModuleSpecifier" = "relative";
@@ -129,7 +158,9 @@
enable = true; enable = true;
userName = "thiloho"; userName = "thiloho";
userEmail = "123883702+thiloho@users.noreply.github.com"; userEmail = "123883702+thiloho@users.noreply.github.com";
signing = { signByDefault = true; }; signing = {
signByDefault = true;
};
}; };
direnv = { direnv = {
enable = true; enable = true;
@@ -139,13 +170,14 @@
obs-studio.enable = true; obs-studio.enable = true;
}; };
home = { home = {
sessionVariables = { NIXOS_OZONE_WL = 1; }; sessionVariables = {
NIXOS_OZONE_WL = 1;
};
packages = with pkgs; [ packages = with pkgs; [
tldr tldr
prismlauncher prismlauncher
ventoy-full ventoy-full
psensor psensor
nil
zoom-us zoom-us
qbittorrent qbittorrent
neofetch neofetch
@@ -155,6 +187,7 @@
gnome-tweaks gnome-tweaks
gnome-themes-extra gnome-themes-extra
melonDS melonDS
amberol
]; ];
}; };
}; };

View File

@@ -9,7 +9,10 @@
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
}; };
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
time.timeZone = "Europe/Amsterdam"; time.timeZone = "Europe/Amsterdam";
@@ -19,14 +22,15 @@
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
home-manager.users.thiloho = { ... }: { home-manager.users.thiloho =
{ ... }:
{
programs = { programs = {
bash = { bash = {
enable = true; enable = true;
shellAliases = { shellAliases = {
rbs = "sudo nixos-rebuild switch --flake ."; rbs = "sudo nixos-rebuild switch --flake .";
cleanup = cleanup = "nix store optimise && nix-collect-garbage -d && sudo nix store optimise && sudo nix-collect-garbage -d";
"nix store optimise && nix-collect-garbage -d && sudo nix store optimise && sudo nix-collect-garbage -d";
}; };
}; };
helix = { helix = {