diff --git a/.gitignore b/.gitignore index 959d2eb..2b00143 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ *.swp result result-* -hardware-configuration.nix diff --git a/README b/README new file mode 100644 index 0000000..2ee8238 --- /dev/null +++ b/README @@ -0,0 +1,3 @@ +`chitin' is asnev's simple, flake-enabled NixOS configuration. + +See `flake.nix' for general information & licensing. diff --git a/configuration.nix b/configuration.nix index 0c63811..a2950b9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,18 +1,20 @@ -# configuration.nix --- common NixOS configuration module +## configuration.nix --- common NixOS configuration module ## -# Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). +/* + Help is available in the configuration.nix(5) man page, on + https://search.nixos.org/options and in the NixOS manual (`nixos-help'). +*/ { inputs, pkgs, ... }: { - # Module imports ----- + # ----- Module imports ----- # imports = [ ./hardware-configuration.nix ]; - # Nix ----- + # ----- Nix ----- # nix = { optimise.automatic = true; @@ -29,12 +31,12 @@ }; - # nixpkgs ----- + # ----- nixpkgs ----- # nixpkgs = { config.allowUnfree = true; - # `pkgs.unstable.` overlay overlays = [ + # `pkgs.unstable.' overlay (final: prev: { unstable = import inputs.unstable { inherit (final) config; @@ -45,7 +47,7 @@ }; - # Boot ----- + # ----- Boot ----- # boot = { kernelPackages = pkgs.linuxPackages_latest; @@ -57,7 +59,7 @@ }; - # Hardware ----- + # ----- Hardware ----- # hardware = { bluetooth.enable = true; @@ -70,46 +72,45 @@ }; - # Networking ----- + # ----- Networking ----- # networking = { networkmanager.enable = true; firewall.enable = true; }; - # Locale ----- + # ----- Locale ----- # time.timeZone = "Asia/Jakarta"; i18n.defaultLocale = "en_GB.UTF-8"; console.font = "Lat2-Terminus16"; console.useXkbConfig = true; - # Services ----- + # ----- Services ----- # services = { xserver.enable = true; xserver.xkb.layout = "us"; + libinput.enable = true; # additional touchpad support + printing.enable = true; printing.drivers = [ pkgs.epson-escpr ]; - fwupd.enable = true; - locate.enable = true; - openssh.enable = false; + fwupd.enable = true; + locate.enable = true; + openssh.enable = false; - # Audio --- + # Audio ----- pipewire.enable = true; pipewire = { alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; }; - - # Touchpad --- - libinput.enable = true; }; - # Security ----- + # ----- Security ----- # security = { sudo.enable = false; doas.enable = true; @@ -121,14 +122,15 @@ }; - # Environment ----- + # ----- Environment ----- # environment = { # System packages ----- systemPackages = let stablePackages = with pkgs; [ # Utilities nh wget stow tmux file mc mtr gnupg ddate testdisk tree htop fastfetch - plocate traceroute rlwrap wl-clipboard entr unzip ffmpeg imagemagick + plocate traceroute rlwrap xclip wl-clipboard entr unzip ffmpeg + imagemagick # Utilities (oxidised) fd tlrc dysk dust hyperfine fzf # Utilities (GUI) @@ -136,6 +138,7 @@ # Development python315 ]; + unstablePackages = with pkgs.unstable; [ # Text editors nano vim-classic emacs-nox @@ -149,15 +152,17 @@ }; - # Fonts ----- + # ----- Fonts ----- # fonts = { packages = let coreFonts = with pkgs; [ cantarell-fonts roboto corefonts ]; + i18nFonts = with pkgs; [ noto-fonts noto-fonts-cjk-sans noto-fonts-cjk-serif noto-fonts-color-emoji noto-fonts-monochrome-emoji unifont unifont_upper unifont-csur ]; + nerdFonts = with pkgs.nerd-fonts; [ iosevka fira-code ]; in coreFonts ++ i18nFonts ++ nerdFonts; @@ -175,7 +180,7 @@ }; - # Users ----- + # ----- Users ----- # users = { mutableUsers = true; defaultUserShell = pkgs.fish; @@ -192,7 +197,7 @@ "video" "render" "input" "audio" "kvm" ]; - # User packages --- + # User packages ----- packages = let stablePackages = with pkgs; [ # Productivity @@ -206,6 +211,7 @@ # Wine (bottles.override {removeWarningPopup = true;}) ]; + unstablePackages = with pkgs.unstable; [ # Internet vivaldi proton-vpn yt-dlp @@ -215,7 +221,7 @@ }; - # Programs ----- + # ----- System programs ----- # programs = { nix-ld = { enable = true; @@ -227,12 +233,12 @@ }; direnv = { - enable = true; + enable = true; nix-direnv.enable = true; }; - + obs-studio = { - enable = true; + enable = true; enableVirtualCamera = true; }; }; diff --git a/flake.lock b/flake.lock index 3f6e761..8106691 100644 --- a/flake.lock +++ b/flake.lock @@ -22,13 +22,13 @@ "unstable": { "locked": { "lastModified": 315532800, - "narHash": "sha256-JiTUXdoNJNvdD+fjVlftWiLKJfHut3cIi8j2HXL9kT4=", + "narHash": "sha256-tFvjrdir1xJuUxdmsv+yK9PiZ4IMnFCeT8z0iayTlso=", "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1108556.6dadaf4375be/nixexprs.tar.zst" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1125912.93a9ed0a8660/nixexprs.tar.zst" }, "original": { "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1108556.6dadaf4375be/nixexprs.tar.zst" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1125912.93a9ed0a8660/nixexprs.tar.zst" } } }, diff --git a/flake.nix b/flake.nix index df63899..1b9e7ad 100644 --- a/flake.nix +++ b/flake.nix @@ -1,12 +1,37 @@ -# flake.nix --- Nix flake entry file +## flake.nix --- Nix flake entry file ## /* - MIT Licence Notice --- Copyright 2026 asnev + chitin is asnev's simple configuration for a flake-enabled NixOS setup. + + this configuration source code is distributed under the MIT Licence, a copy + of which is included at the end of this flake file. +*/ + +{ + description = "chitin"; + + inputs = { + nixpkgs.url = "https://channels.nixos.org/nixos-26.05/nixexprs.tar.zst"; + unstable.url = "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1125912.93a9ed0a8660/nixexprs.tar.zst"; # last updated: 2026-11-23 07:54 UTC + }; + + outputs = { nixpkgs, ... } @ inputs: { + nixosConfigurations."phostron" = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ ./phostron.nix ]; + }; + }; +} + +/* + Copyright (c) 2026 asnev + + MIT Licence Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -22,18 +47,4 @@ SOFTWARE. */ -{ - inputs = { - nixpkgs.url = "https://channels.nixos.org/nixos-26.05/nixexprs.tar.zst"; - # last updated: 2026-11-23 07:54 UTC - unstable.url = "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1125912.93a9ed0a8660/nixexprs.tar.zst"; - }; - - outputs = { self, nixpkgs, unstable, ... } @ inputs: { - nixosConfigurations."phostron" = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - modules = [ ./phostron.nix ]; - }; - }; -} # end of flake.nix file diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 120000 index 0000000..4dde6be --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1 @@ +/etc/nixos/hardware-configuration.nix \ No newline at end of file diff --git a/phostron.nix b/phostron.nix index c381eb8..efc2064 100644 --- a/phostron.nix +++ b/phostron.nix @@ -1,38 +1,47 @@ -# phostron.nix --- Configuration module for `phostron` +## phostron.nix --- Configuration module for `phostron' ## { pkgs, ... }: { - # Module imports ----- + # ----- Module imports ----- # imports = [ ./configuration.nix ]; - # Hardware ----- + # ----- Hardware ----- # zramSwap.enable = true; - # Networking ----- + # ----- Networking ----- # networking.hostName = "phostron"; - # Services ----- + # ----- Services ----- # services = { fstrim.enable = true; }; - # Display manager --- + # ----- Display manager ----- # services.displayManager.sddm.enable = true; - # Desktop manager --- + # ----- Desktop manager ----- # + # KDE Plasma ----- services.desktopManager.plasma6.enable = true; environment.plasma6.excludePackages = [ pkgs.kdePackages.discover ]; environment.systemPackages = with pkgs.kdePackages; [ - kate elisa bluez-qt kalk filelight kamoso konversation kmail ktorrent - kclock - ]; + kate elisa bluez-qt kalk filelight kamoso konversation kmail ktorrent + kclock + ]; + + # i3 ----- + services.xserver.windowManager.i3.enable = true; + services.xserver.windowManager.i3 = { + package = pkgs.unstable.i3; + extraPackages = with pkgs.unstable; [ dmenu i3status ]; + }; + programs.i3lock.enable = true; - # DO NOT TOUCH ----- + # ----- DO NOT TOUCH ----- # system.stateVersion = "26.05"; } # end of phostron.nix file