summaryrefslogtreecommitdiff
path: root/configuration
diff options
context:
space:
mode:
authorcoasteen <coasteen@proton.me>2026-07-09 10:46:52 +0330
committercoasteen <coasteen@proton.me>2026-07-09 10:46:52 +0330
commita3008666c6c75ff61b1fc329b4d962a6c367d5f0 (patch)
treea203a54b3c61884ea13957cf18284f6c83f8e64d /configuration
init nixHEADmaster
Diffstat (limited to 'configuration')
-rw-r--r--configuration/default.nix107
-rw-r--r--configuration/desktop/default.nix17
-rw-r--r--configuration/hardware.nix25
-rw-r--r--configuration/services/jellyfin/default.nix14
4 files changed, 163 insertions, 0 deletions
diff --git a/configuration/default.nix b/configuration/default.nix
new file mode 100644
index 0000000..1e5cefd
--- /dev/null
+++ b/configuration/default.nix
@@ -0,0 +1,107 @@
+{ lib, pkgs, ... }: {
+
+ imports = [
+ ./hardware.nix
+ ./services/jellyfin
+ ./desktop
+ ];
+
+ nixpkgs.overlays = [
+ (final: prev: {
+ inherit (prev.lixPackageSets.stable) nixpkgs-review nix-eval-jobs nix-fast-build colmena;
+ })
+ ];
+
+ nix.package = pkgs.lixPackageSets.stable.lix;
+
+ boot.kernelPackages = pkgs.linuxPackages_latest;
+ boot.initrd.compressor = "zstd";
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.systemd-boot.editor = false;
+ boot.loader.systemd-boot.configurationLimit = 25;
+ boot.loader.efi.canTouchEfiVariables = true;
+
+ fileSystems."/media/drive".device = "/dev/disk/by-uuid/facf5a78-8872-437c-4345-50a28c894aca";
+ fileSystems."/media/drive".fsType = "btrfs";
+
+ hardware.graphics.enable = true;
+ hardware.graphics.enable32Bit = true;
+
+ networking.hostName = "unix";
+ networking.networkmanager.enable = true;
+ networking.wireguard.enable = true;
+ networking.firewall.enable = false;
+ networking.firewall.allowedTCPPorts = [ 2080 ];
+
+ time.timeZone = "Asia/Tehran";
+
+ services.printing.enable = false;
+ services.pipewire.enable = true;
+ services.pipewire.pulse.enable = true;
+ services.libinput.enable = true;
+ services.flatpak.enable = true;
+ services.openssh.enable = true;
+
+ xdg.portal.enable = true;
+ programs.nano.enable = false;
+ programs.firefox.enable = true;
+ programs.throne.enable = true;
+ programs.throne.tunMode.enable = true;
+ programs.nix-ld.enable = true;
+ programs.appimage.enable = true;
+ programs.nm-applet.enable = true;
+ programs.neovim.enable = true;
+ programs.neovim.viAlias = true;
+ programs.neovim.vimAlias = true;
+ programs.steam.enable = true;
+ programs.git.enable = true;
+ programs.zsh.enable = true;
+ programs.zsh.autosuggestions.enable = true;
+ programs.zsh.interactiveShellInit = ''
+ zmodload zsh/zprof
+ autoload -Uz compinit
+ if [[ -n ~/.zcompdump(#qN.mh+24) ]]; then
+ compinit
+ else
+ compinit -C
+ fi
+ source ${pkgs.zsh-fast-syntax-highlighting}/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
+ '';
+
+ virtualisation.waydroid.enable = true;
+ virtualisation.waydroid.package = pkgs.waydroid-nftables;
+ virtualisation.docker.enable = true;
+
+ environment.shells = with pkgs; [ zsh ];
+ environment.systemPackages = with pkgs; [
+ wineWow64Packages.stable
+ wget
+ adwaita-icon-theme
+ rofi
+ iptables
+ mesa-demos
+ wl-clipboard
+ wireguard-tools
+ ];
+
+ users.users.coast.isNormalUser = true;
+ users.users.coast.extraGroups = [ "wheel" "docker" "input" "video" "audio" "usb" ];
+ users.users.coast.shell = pkgs.zsh;
+
+ fonts.packages = builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
+
+ security.sudo.enable = false;
+ security.doas.enable = true;
+ security.doas.extraRules = [
+ {
+ users = [ "coast" ];
+ keepEnv = true;
+ persist = true;
+ }
+ ];
+ security.polkit.enable = true;
+
+ system.stateVersion = "25.11";
+ nix.settings.experimental-features = [ "nix-command" "flakes" ];
+ nixpkgs.config.allowUnfree = true;
+}
diff --git a/configuration/desktop/default.nix b/configuration/desktop/default.nix
new file mode 100644
index 0000000..34a5160
--- /dev/null
+++ b/configuration/desktop/default.nix
@@ -0,0 +1,17 @@
+{ pkgs, ... }:
+{
+ services.desktopManager.plasma6.enable = true;
+ services.displayManager.plasma-login-manager.enable = true;
+
+ #x11
+ services.xserver.enable = true;
+ services.xserver.xkb.layout = "us";
+ services.xserver.xkb.options = "eurosign:e,caps:escape";
+ services.xserver.displayManager.lightdm.enable = true;
+ services.xserver.displayManager.lightdm.greeters.gtk.enable = true;
+
+ #niriwm
+ programs.niri.enable = false;
+ programs.niri.useNautilus = true;
+ programs.niri.package = pkgs.niri;
+}
diff --git a/configuration/hardware.nix b/configuration/hardware.nix
new file mode 100644
index 0000000..7de8fe9
--- /dev/null
+++ b/configuration/hardware.nix
@@ -0,0 +1,25 @@
+{ config, lib, modulesPath, ... }:
+
+{
+ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelParams = [ "kvm-amd" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/".device = "/dev/disk/by-label/nixos";
+ fileSystems."/".fsType = "ext4";
+
+ fileSystems."/boot".device = "/dev/disk/by-label/boot";
+ fileSystems."/boot".fsType = "vfat";
+ fileSystems."/boot".options = [ "fmask=0022" "dmask=0022" ];
+
+ fileSystems."/media/drive".device = "/dev/disk/by-uuid/facf5a78-8872-437c-4345-50a28c894aca";
+ fileSystems."/media/drive".fsType = "btrfs";
+
+ swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/configuration/services/jellyfin/default.nix b/configuration/services/jellyfin/default.nix
new file mode 100644
index 0000000..dad9e6d
--- /dev/null
+++ b/configuration/services/jellyfin/default.nix
@@ -0,0 +1,14 @@
+{ pkgs, ... }:
+{
+ services.jellyfin.enable = true;
+ services.jellyfin.package = pkgs.jellyfin;
+ services.jellyfin.user = "coast";
+ services.jellyfin.hardwareAcceleration.enable = true;
+ services.jellyfin.hardwareAcceleration.device = "/dev/dri/renderD128";
+ services.jellyfin.hardwareAcceleration.type = "vaapi";
+
+ systemd.services.jellyfin.environment = {
+ http_proxy = "socks5://127.0.0.1:2080";
+ https_proxy = "socks5://127.0.0.1:2080";
+ };
+}