Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c35b0dd9c0 |
|||
|
d26b64ef18 |
7 changed files with 90 additions and 61 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,4 +2,3 @@
|
|||
*.swp
|
||||
result
|
||||
result-*
|
||||
hardware-configuration.nix
|
||||
|
|
|
|||
3
README
Normal file
3
README
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
`chitin' is asnev's simple, flake-enabled NixOS configuration.
|
||||
|
||||
See `flake.nix' for general information & licensing.
|
||||
|
|
@ -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.<name>` overlay
|
||||
overlays = [
|
||||
# `pkgs.unstable.<name>' 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,25 +72,27 @@
|
|||
};
|
||||
|
||||
|
||||
# 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 ];
|
||||
|
||||
|
|
@ -96,20 +100,17 @@
|
|||
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;
|
||||
|
|
|
|||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
45
flake.nix
45
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
|
||||
|
|
|
|||
1
hardware-configuration.nix
Symbolic link
1
hardware-configuration.nix
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/etc/nixos/hardware-configuration.nix
|
||||
25
phostron.nix
25
phostron.nix
|
|
@ -1,29 +1,30 @@
|
|||
# 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; [
|
||||
|
|
@ -31,8 +32,16 @@
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue