Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
d0798ae82b |
7 changed files with 61 additions and 90 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,3 +2,4 @@
|
||||||
*.swp
|
*.swp
|
||||||
result
|
result
|
||||||
result-*
|
result-*
|
||||||
|
hardware-configuration.nix
|
||||||
|
|
|
||||||
3
README
3
README
|
|
@ -1,3 +0,0 @@
|
||||||
`chitin' is asnev's simple, flake-enabled NixOS configuration.
|
|
||||||
|
|
||||||
See `flake.nix' for general information & licensing.
|
|
||||||
|
|
@ -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
|
||||||
Help is available in the configuration.nix(5) man page, on
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
https://search.nixos.org/options and in the NixOS manual (`nixos-help').
|
|
||||||
*/
|
|
||||||
|
|
||||||
{ inputs, pkgs, ... }:
|
{ inputs, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# ----- Module imports ----- #
|
# Module imports -----
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
# ----- Nix ----- #
|
# Nix -----
|
||||||
nix = {
|
nix = {
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
|
|
||||||
|
|
@ -31,12 +29,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ----- nixpkgs ----- #
|
# nixpkgs -----
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
|
||||||
|
# `pkgs.unstable.<name>` overlay
|
||||||
overlays = [
|
overlays = [
|
||||||
# `pkgs.unstable.<name>' overlay
|
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
unstable = import inputs.unstable {
|
unstable = import inputs.unstable {
|
||||||
inherit (final) config;
|
inherit (final) config;
|
||||||
|
|
@ -47,7 +45,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ----- Boot ----- #
|
# Boot -----
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
|
@ -59,7 +57,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ----- Hardware ----- #
|
# Hardware -----
|
||||||
hardware = {
|
hardware = {
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
|
|
||||||
|
|
@ -72,45 +70,46 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ----- Networking ----- #
|
# Networking -----
|
||||||
networking = {
|
networking = {
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
firewall.enable = true;
|
firewall.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ----- Locale ----- #
|
# Locale -----
|
||||||
time.timeZone = "Asia/Jakarta";
|
time.timeZone = "Asia/Jakarta";
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
console.font = "Lat2-Terminus16";
|
console.font = "Lat2-Terminus16";
|
||||||
console.useXkbConfig = true;
|
console.useXkbConfig = true;
|
||||||
|
|
||||||
|
|
||||||
# ----- Services ----- #
|
# Services -----
|
||||||
services = {
|
services = {
|
||||||
xserver.enable = true;
|
xserver.enable = true;
|
||||||
xserver.xkb.layout = "us";
|
xserver.xkb.layout = "us";
|
||||||
|
|
||||||
libinput.enable = true; # additional touchpad support
|
|
||||||
|
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
printing.drivers = [ pkgs.epson-escpr ];
|
printing.drivers = [ pkgs.epson-escpr ];
|
||||||
|
|
||||||
fwupd.enable = true;
|
fwupd.enable = true;
|
||||||
locate.enable = true;
|
locate.enable = true;
|
||||||
openssh.enable = false;
|
openssh.enable = false;
|
||||||
|
|
||||||
# Audio -----
|
# Audio ---
|
||||||
pipewire.enable = true;
|
pipewire.enable = true;
|
||||||
pipewire = {
|
pipewire = {
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Touchpad ---
|
||||||
|
libinput.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ----- Security ----- #
|
# Security -----
|
||||||
security = {
|
security = {
|
||||||
sudo.enable = false;
|
sudo.enable = false;
|
||||||
doas.enable = true;
|
doas.enable = true;
|
||||||
|
|
@ -122,15 +121,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ----- Environment ----- #
|
# Environment -----
|
||||||
environment = {
|
environment = {
|
||||||
# System packages -----
|
# System packages -----
|
||||||
systemPackages = let
|
systemPackages = let
|
||||||
stablePackages = with pkgs; [
|
stablePackages = with pkgs; [
|
||||||
# Utilities
|
# Utilities
|
||||||
nh wget stow tmux file mc mtr gnupg ddate testdisk tree htop fastfetch
|
nh wget stow tmux file mc mtr gnupg ddate testdisk tree htop fastfetch
|
||||||
plocate traceroute rlwrap xclip wl-clipboard entr unzip ffmpeg
|
plocate traceroute rlwrap wl-clipboard entr unzip ffmpeg imagemagick
|
||||||
imagemagick
|
|
||||||
# Utilities (oxidised)
|
# Utilities (oxidised)
|
||||||
fd tlrc dysk dust hyperfine fzf
|
fd tlrc dysk dust hyperfine fzf
|
||||||
# Utilities (GUI)
|
# Utilities (GUI)
|
||||||
|
|
@ -138,7 +136,6 @@
|
||||||
# Development
|
# Development
|
||||||
python315
|
python315
|
||||||
];
|
];
|
||||||
|
|
||||||
unstablePackages = with pkgs.unstable; [
|
unstablePackages = with pkgs.unstable; [
|
||||||
# Text editors
|
# Text editors
|
||||||
nano vim-classic emacs-nox
|
nano vim-classic emacs-nox
|
||||||
|
|
@ -152,17 +149,15 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ----- Fonts ----- #
|
# Fonts -----
|
||||||
fonts = {
|
fonts = {
|
||||||
packages = let
|
packages = let
|
||||||
coreFonts = with pkgs; [ cantarell-fonts roboto corefonts ];
|
coreFonts = with pkgs; [ cantarell-fonts roboto corefonts ];
|
||||||
|
|
||||||
i18nFonts = with pkgs; [
|
i18nFonts = with pkgs; [
|
||||||
noto-fonts noto-fonts-cjk-sans noto-fonts-cjk-serif
|
noto-fonts noto-fonts-cjk-sans noto-fonts-cjk-serif
|
||||||
noto-fonts-color-emoji noto-fonts-monochrome-emoji
|
noto-fonts-color-emoji noto-fonts-monochrome-emoji
|
||||||
unifont unifont_upper unifont-csur
|
unifont unifont_upper unifont-csur
|
||||||
];
|
];
|
||||||
|
|
||||||
nerdFonts = with pkgs.nerd-fonts; [ iosevka fira-code ];
|
nerdFonts = with pkgs.nerd-fonts; [ iosevka fira-code ];
|
||||||
in coreFonts ++ i18nFonts ++ nerdFonts;
|
in coreFonts ++ i18nFonts ++ nerdFonts;
|
||||||
|
|
||||||
|
|
@ -180,7 +175,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ----- Users ----- #
|
# Users -----
|
||||||
users = {
|
users = {
|
||||||
mutableUsers = true;
|
mutableUsers = true;
|
||||||
defaultUserShell = pkgs.fish;
|
defaultUserShell = pkgs.fish;
|
||||||
|
|
@ -197,7 +192,7 @@
|
||||||
"video" "render" "input" "audio" "kvm"
|
"video" "render" "input" "audio" "kvm"
|
||||||
];
|
];
|
||||||
|
|
||||||
# User packages -----
|
# User packages ---
|
||||||
packages = let
|
packages = let
|
||||||
stablePackages = with pkgs; [
|
stablePackages = with pkgs; [
|
||||||
# Productivity
|
# Productivity
|
||||||
|
|
@ -211,7 +206,6 @@
|
||||||
# Wine
|
# Wine
|
||||||
(bottles.override {removeWarningPopup = true;})
|
(bottles.override {removeWarningPopup = true;})
|
||||||
];
|
];
|
||||||
|
|
||||||
unstablePackages = with pkgs.unstable; [
|
unstablePackages = with pkgs.unstable; [
|
||||||
# Internet
|
# Internet
|
||||||
vivaldi proton-vpn yt-dlp
|
vivaldi proton-vpn yt-dlp
|
||||||
|
|
@ -221,7 +215,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ----- System programs ----- #
|
# Programs -----
|
||||||
programs = {
|
programs = {
|
||||||
nix-ld = {
|
nix-ld = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -233,12 +227,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
direnv = {
|
direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
obs-studio = {
|
obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableVirtualCamera = true;
|
enableVirtualCamera = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -22,13 +22,13 @@
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 315532800,
|
"lastModified": 315532800,
|
||||||
"narHash": "sha256-tFvjrdir1xJuUxdmsv+yK9PiZ4IMnFCeT8z0iayTlso=",
|
"narHash": "sha256-JiTUXdoNJNvdD+fjVlftWiLKJfHut3cIi8j2HXL9kT4=",
|
||||||
"type": "tarball",
|
"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": {
|
"original": {
|
||||||
"type": "tarball",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
45
flake.nix
45
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.
|
MIT Licence Notice --- Copyright 2026 asnev
|
||||||
|
|
||||||
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the “Software”), to deal
|
of this software and associated documentation files (the “Software”), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
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
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|
@ -47,4 +22,18 @@
|
||||||
SOFTWARE.
|
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
|
# end of flake.nix file
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
/etc/nixos/hardware-configuration.nix
|
|
||||||
31
phostron.nix
31
phostron.nix
|
|
@ -1,47 +1,38 @@
|
||||||
## phostron.nix --- Configuration module for `phostron' ##
|
# phostron.nix --- Configuration module for `phostron`
|
||||||
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# ----- Module imports ----- #
|
# Module imports -----
|
||||||
imports = [ ./configuration.nix ];
|
imports = [ ./configuration.nix ];
|
||||||
|
|
||||||
|
|
||||||
# ----- Hardware ----- #
|
# Hardware -----
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
|
|
||||||
# ----- Networking ----- #
|
# Networking -----
|
||||||
networking.hostName = "phostron";
|
networking.hostName = "phostron";
|
||||||
|
|
||||||
|
|
||||||
# ----- Services ----- #
|
# Services -----
|
||||||
services = {
|
services = {
|
||||||
fstrim.enable = true;
|
fstrim.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# ----- Display manager ----- #
|
# Display manager ---
|
||||||
services.displayManager.sddm.enable = true;
|
services.displayManager.sddm.enable = true;
|
||||||
|
|
||||||
# ----- Desktop manager ----- #
|
# Desktop manager ---
|
||||||
# KDE Plasma -----
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
environment.plasma6.excludePackages = [ pkgs.kdePackages.discover ];
|
environment.plasma6.excludePackages = [ pkgs.kdePackages.discover ];
|
||||||
environment.systemPackages = with pkgs.kdePackages; [
|
environment.systemPackages = with pkgs.kdePackages; [
|
||||||
kate elisa bluez-qt kalk filelight kamoso konversation kmail ktorrent
|
kate elisa bluez-qt kalk filelight kamoso konversation kmail ktorrent
|
||||||
kclock
|
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";
|
system.stateVersion = "26.05";
|
||||||
}
|
}
|
||||||
# end of phostron.nix file
|
# end of phostron.nix file
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue