mirror of
https://github.com/thiloho/nixos-config.git
synced 2025-11-22 03:21:35 +01:00
Organize configuration better
This commit is contained in:
42
modules/core.nix
Normal file
42
modules/core.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 53317 ];
|
||||
allowedUDPPorts = [ 53317 ];
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users = {
|
||||
root.hashedPassword = "$y$j9T$gdQiD91dRc1rEURkntnkh1$9VvI8xhvCMqhSSOeOkiSnjHsQVUOOH/4Sbou.w6P5TC";
|
||||
thiloho = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"docker"
|
||||
];
|
||||
hashedPassword = "$y$j9T$0wgXXBJMy5lzuwmdvx5Lb.$G5JmfDXeXzH7sq66R.clvmlovuh1ZsZMf1SfDsWpNcB";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
46
modules/desktop.nix
Normal file
46
modules/desktop.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
jetbrains-mono
|
||||
];
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
excludePackages = [ pkgs.xterm ];
|
||||
};
|
||||
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
gnome-tour
|
||||
gnome-connections
|
||||
geary
|
||||
evince
|
||||
gnome-contacts
|
||||
gnome-maps
|
||||
gnome-music
|
||||
snapshot
|
||||
simple-scan
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-tweaks
|
||||
gnome-themes-extra
|
||||
];
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
||||
home-manager.users.thiloho.dconf.settings = {
|
||||
"org/gnome/mutter" = {
|
||||
experimental-features = [
|
||||
"scale-monitor-framebuffer"
|
||||
"variable-refresh-rate"
|
||||
"xwayland-native-scaling"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
28
modules/development.nix
Normal file
28
modules/development.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
qemu.swtpm.enable = true;
|
||||
};
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
programs.adb.enable = true;
|
||||
users.users.thiloho.extraGroups = [ "adbusers" ];
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
nodejs
|
||||
nodePackages.pnpm
|
||||
];
|
||||
};
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.java.enable = true;
|
||||
}
|
||||
112
modules/home.nix
Normal file
112
modules/home.nix
Normal file
@@ -0,0 +1,112 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.thiloho = {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
rbs = "sudo nixos-rebuild switch --flake .";
|
||||
cleanup = "nix store optimise && nix-collect-garbage -d && sudo nix store optimise && sudo nix-collect-garbage -d";
|
||||
};
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings.theme = "ayu_dark";
|
||||
};
|
||||
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "thiloho";
|
||||
userEmail = "123883702+thiloho@users.noreply.github.com";
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
mutableExtensionsDir = false;
|
||||
extensions =
|
||||
with pkgs.vscode-extensions;
|
||||
[
|
||||
jnoortheen.nix-ide
|
||||
ritwickdey.liveserver
|
||||
esbenp.prettier-vscode
|
||||
]
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "svelte-vscode";
|
||||
publisher = "svelte";
|
||||
version = "108.5.4";
|
||||
sha256 = "0sjq5ifnz08pkxslzz2qnrc76gvl6lkygcr3042safbvfral4xm1";
|
||||
}
|
||||
{
|
||||
name = "playwright";
|
||||
publisher = "ms-playwright";
|
||||
version = "1.1.10";
|
||||
sha256 = "0y0jlrxpjzd7drdmcr9kfy5g12zax9q4d8cblzzb6ia4c98ipfq0";
|
||||
}
|
||||
];
|
||||
userSettings = {
|
||||
"editor.wordWrap" = "on";
|
||||
"editor.fontFamily" = "JetBrains Mono";
|
||||
"editor.fontLigatures" = true;
|
||||
"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;
|
||||
};
|
||||
};
|
||||
|
||||
firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-devedition.override {
|
||||
cfg = {
|
||||
speechSynthesisSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
yt-dlp.enable = true;
|
||||
|
||||
obs-studio.enable = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
tldr
|
||||
ventoy-full
|
||||
qbittorrent
|
||||
neofetch
|
||||
backblaze-b2
|
||||
localsend
|
||||
postman
|
||||
melonDS
|
||||
prismlauncher
|
||||
papers
|
||||
endeavour
|
||||
gapless
|
||||
mullvad-browser
|
||||
picocrypt-cli
|
||||
tutanota-desktop
|
||||
inkscape
|
||||
];
|
||||
};
|
||||
}
|
||||
22
modules/media.nix
Normal file
22
modules/media.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
services.pulseaudio.enable = false;
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs.mullvad-vpn;
|
||||
};
|
||||
|
||||
services.resolved.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user