diff --git a/.gitignore b/.gitignore index 2b00143..959d2eb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.swp result result-* +hardware-configuration.nix diff --git a/README b/README deleted file mode 100644 index 2ee8238..0000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ -`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 a2950b9..0c63811 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,20 +1,18 @@ -## 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; @@ -31,12 +29,12 @@ }; - # ----- nixpkgs ----- # + # nixpkgs ----- nixpkgs = { config.allowUnfree = true; + # `pkgs.unstable.` overlay overlays = [ - # `pkgs.unstable.' overlay (final: prev: { unstable = import inputs.unstable { inherit (final) config; @@ -47,7 +45,7 @@ }; - # ----- Boot ----- # + # Boot ----- boot = { kernelPackages = pkgs.linuxPackages_latest; @@ -59,7 +57,7 @@ }; - # ----- Hardware ----- # + # Hardware ----- hardware = { bluetooth.enable = true; @@ -72,45 +70,46 @@ }; - # ----- 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; @@ -122,15 +121,14 @@ }; - # ----- 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 xclip wl-clipboard entr unzip ffmpeg - imagemagick + plocate traceroute rlwrap wl-clipboard entr unzip ffmpeg imagemagick # Utilities (oxidised) fd tlrc dysk dust hyperfine fzf # Utilities (GUI) @@ -138,7 +136,6 @@ # Development python315 ]; - unstablePackages = with pkgs.unstable; [ # Text editors nano vim-classic emacs-nox @@ -152,17 +149,15 @@ }; - # ----- 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; @@ -180,7 +175,7 @@ }; - # ----- Users ----- # + # Users ----- users = { mutableUsers = true; defaultUserShell = pkgs.fish; @@ -197,7 +192,7 @@ "video" "render" "input" "audio" "kvm" ]; - # User packages ----- + # User packages --- packages = let stablePackages = with pkgs; [ # Productivity @@ -211,7 +206,6 @@ # Wine (bottles.override {removeWarningPopup = true;}) ]; - unstablePackages = with pkgs.unstable; [ # Internet vivaldi proton-vpn yt-dlp @@ -221,7 +215,7 @@ }; - # ----- System programs ----- # + # Programs ----- programs = { nix-ld = { enable = true; @@ -233,12 +227,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 8106691..3f6e761 100644 --- a/flake.lock +++ b/flake.lock @@ -22,13 +22,13 @@ "unstable": { "locked": { "lastModified": 315532800, - "narHash": "sha256-tFvjrdir1xJuUxdmsv+yK9PiZ4IMnFCeT8z0iayTlso=", + "narHash": "sha256-JiTUXdoNJNvdD+fjVlftWiLKJfHut3cIi8j2HXL9kT4=", "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1125912.93a9ed0a8660/nixexprs.tar.zst" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1108556.6dadaf4375be/nixexprs.tar.zst" }, "original": { "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1125912.93a9ed0a8660/nixexprs.tar.zst" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1108556.6dadaf4375be/nixexprs.tar.zst" } } }, diff --git a/flake.nix b/flake.nix index 1b9e7ad..df63899 100644 --- a/flake.nix +++ b/flake.nix @@ -1,37 +1,12 @@ -## flake.nix --- Nix flake entry file ## +# flake.nix --- Nix flake entry file /* - 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 + MIT Licence Notice --- Copyright 2026 asnev 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, sublicence, and/or sell + to use, copy, modify, merge, publish, distribute, sublicense, 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: @@ -47,4 +22,18 @@ 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 deleted file mode 120000 index 4dde6be..0000000 --- a/hardware-configuration.nix +++ /dev/null @@ -1 +0,0 @@ -/etc/nixos/hardware-configuration.nix \ No newline at end of file diff --git a/phostron.nix b/phostron.nix index efc2064..c381eb8 100644 --- a/phostron.nix +++ b/phostron.nix @@ -1,47 +1,38 @@ -## 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 ----- # - # KDE Plasma ----- + # Desktop manager --- 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 - ]; - - # 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; + kate elisa bluez-qt kalk filelight kamoso konversation kmail ktorrent + kclock + ]; - # ----- DO NOT TOUCH ----- # + # DO NOT TOUCH ----- system.stateVersion = "26.05"; } # end of phostron.nix file