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,27 +10,34 @@
}; };
}; };
outputs = inputs@{ nixpkgs, home-manager, ... }: { outputs =
nixosConfigurations = let inputs@{ nixpkgs, home-manager, ... }:
mkSystem = entrypoint: {
nixpkgs.lib.nixosSystem { nixosConfigurations =
system = "x86_64-linux"; let
specialArgs = { inherit inputs; }; mkSystem =
modules = [ entrypoint:
entrypoint nixpkgs.lib.nixosSystem {
{ nix.registry.nixpkgs.flake = nixpkgs; } system = "x86_64-linux";
home-manager.nixosModules.home-manager specialArgs = {
{ inherit inputs;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
}; };
} modules = [
]; entrypoint
{ nix.registry.nixpkgs.flake = nixpkgs; }
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
};
}
];
};
in
{
pc = mkSystem ./nixos-configurations/pc;
laptop = mkSystem ./nixos-configurations/laptop;
}; };
in {
pc = mkSystem ./nixos-configurations/pc;
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 =
programs.git.signing.key = "5CF074CA31DD6686"; { pkgs, ... }:
home = { stateVersion = "23.05"; }; {
}; programs.git.signing.key = "5CF074CA31DD6686";
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 =
[ { device = "/dev/disk/by-uuid/8f51c241-0b76-4a7c-88e3-5cbde2d4237a"; }
]; ];
};
swapDevices = [ { 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, ... }:
home = { {
packages = with pkgs; [ blender inkscape ]; programs.git.signing.key = "5FED02C109365F87";
stateVersion = "23.05"; home = {
packages = with pkgs; [
blender
inkscape
];
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 =
[ { device = "/dev/disk/by-uuid/54590048-bdf2-4faa-8176-f6e1d582c357"; }
]; ];
};
swapDevices = [ { 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,84 +98,97 @@
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
home-manager.users.thiloho = { pkgs, lib, config, ... }: { home-manager.users.thiloho =
programs = { {
yt-dlp = { pkgs,
enable = true; lib,
}; config,
firefox = { ...
enable = true; }:
package = pkgs.firefox-devedition.override { {
cfg = { speechSynthesisSupport = true; }; programs = {
yt-dlp = {
enable = true;
}; };
}; firefox = {
chromium = { enable = true;
enable = true; package = pkgs.firefox-devedition.override {
package = pkgs.ungoogled-chromium; cfg = {
}; speechSynthesisSupport = true;
vscode = { };
enable = true;
package = pkgs.vscodium;
mutableExtensionsDir = false;
extensions = with pkgs.vscode-extensions; [
# svelte.svelte-vscode
jnoortheen.nix-ide
ritwickdey.liveserver
esbenp.prettier-vscode
]
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "svelte-vscode";
publisher = "svelte";
version = "108.5.4";
sha256 = "0sjq5ifnz08pkxslzz2qnrc76gvl6lkygcr3042safbvfral4xm1";
}
];
userSettings = {
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nil";
"editor.indentSize" = 2;
"editor.tabSize" = 2;
"typescript.preferences.importModuleSpecifier" = "relative";
"[svelte]" = {
"editor.defaultFormatter" = "svelte.svelte-vscode";
}; };
"svelte.enable-ts-plugin" = true;
"svelte.plugin.svelte.defaultScriptLanguage" = "ts";
"svelte.plugin.svelte.format.config.svelteStrictMode" = true;
}; };
chromium = {
enable = true;
package = pkgs.ungoogled-chromium;
};
vscode = {
enable = true;
package = pkgs.vscodium;
mutableExtensionsDir = false;
extensions =
with pkgs.vscode-extensions;
[
# svelte.svelte-vscode
jnoortheen.nix-ide
ritwickdey.liveserver
esbenp.prettier-vscode
]
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "svelte-vscode";
publisher = "svelte";
version = "108.5.4";
sha256 = "0sjq5ifnz08pkxslzz2qnrc76gvl6lkygcr3042safbvfral4xm1";
}
];
userSettings = {
"editor.indentSize" = 2;
"editor.tabSize" = 2;
"typescript.preferences.importModuleSpecifier" = "relative";
"[svelte]" = {
"editor.defaultFormatter" = "svelte.svelte-vscode";
};
"svelte.enable-ts-plugin" = true;
"svelte.plugin.svelte.defaultScriptLanguage" = "ts";
"svelte.plugin.svelte.format.config.svelteStrictMode" = true;
};
};
git = {
enable = true;
userName = "thiloho";
userEmail = "123883702+thiloho@users.noreply.github.com";
signing = {
signByDefault = true;
};
};
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
obs-studio.enable = true;
}; };
git = { home = {
enable = true; sessionVariables = {
userName = "thiloho"; NIXOS_OZONE_WL = 1;
userEmail = "123883702+thiloho@users.noreply.github.com"; };
signing = { signByDefault = true; }; packages = with pkgs; [
tldr
prismlauncher
ventoy-full
psensor
zoom-us
qbittorrent
neofetch
backblaze-b2
localsend
postman
gnome-tweaks
gnome-themes-extra
melonDS
amberol
];
}; };
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
obs-studio.enable = true;
}; };
home = {
sessionVariables = { NIXOS_OZONE_WL = 1; };
packages = with pkgs; [
tldr
prismlauncher
ventoy-full
psensor
nil
zoom-us
qbittorrent
neofetch
backblaze-b2
localsend
postman
gnome-tweaks
gnome-themes-extra
melonDS
];
};
};
} }

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,21 +22,22 @@
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
home-manager.users.thiloho = { ... }: { home-manager.users.thiloho =
programs = { { ... }:
bash = { {
enable = true; programs = {
shellAliases = { bash = {
rbs = "sudo nixos-rebuild switch --flake ."; enable = true;
cleanup = shellAliases = {
"nix store optimise && nix-collect-garbage -d && sudo nix store optimise && sudo nix-collect-garbage -d"; rbs = "sudo nixos-rebuild switch --flake .";
cleanup = "nix store optimise && nix-collect-garbage -d && sudo nix store optimise && sudo nix-collect-garbage -d";
};
};
helix = {
enable = true;
defaultEditor = true;
settings.theme = "ayu_dark";
}; };
}; };
helix = {
enable = true;
defaultEditor = true;
settings.theme = "ayu_dark";
};
}; };
};
} }