first commit
This commit is contained in:
commit
0576c29135
13 changed files with 479 additions and 0 deletions
175
configuration.nix
Normal file
175
configuration.nix
Normal file
|
@ -0,0 +1,175 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./modules/programs.nix
|
||||
./modules/fonts.nix
|
||||
./modules/gnome.nix
|
||||
./modules/intel-gpu.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.grub.configurationLimit = 10;
|
||||
|
||||
boot.initrd.luks.devices."luks-cb531ab6-d47e-4246-a923-55bbda22d697".device = "/dev/disk/by-uuid/cb531ab6-d47e-4246-a923-55bbda22d697";
|
||||
|
||||
# Clear /tmp during boot
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
|
||||
# Housekeeping: Garbage collection
|
||||
nix.optimise.automatic = true;
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
# Increase buffer size
|
||||
nix.settings.download-buffer-size = "4G";
|
||||
|
||||
# Networking
|
||||
networking.hostName = "greynix"; # Define your hostname.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Disable sudo password for the wheel group
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Asia/Taipei";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "zh_TW.UTF-8";
|
||||
LC_IDENTIFICATION = "zh_TW.UTF-8";
|
||||
LC_MEASUREMENT = "zh_TW.UTF-8";
|
||||
LC_MONETARY = "zh_TW.UTF-8";
|
||||
LC_NAME = "zh_TW.UTF-8";
|
||||
LC_NUMERIC = "zh_TW.UTF-8";
|
||||
LC_PAPER = "zh_TW.UTF-8";
|
||||
LC_TELEPHONE = "zh_TW.UTF-8";
|
||||
LC_TIME = "zh_TW.UTF-8";
|
||||
};
|
||||
|
||||
# Traditional Chinese input
|
||||
i18n.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-chewing
|
||||
fcitx5-chinese-addons
|
||||
fcitx5-table-extra
|
||||
];
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
# Remove Xterm program
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
services.xserver.desktopManager.xterm.enable = false;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = false;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.elias = {
|
||||
isNormalUser = true;
|
||||
description = "Elias Gasparis";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
# thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.displayManager.autoLogin.enable = true;
|
||||
services.displayManager.autoLogin.user = "elias";
|
||||
|
||||
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
|
||||
# Programs
|
||||
# =====================
|
||||
# Most programs installed in modules/programs.nix
|
||||
|
||||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Services
|
||||
# =====================
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable OpenSSH daemon
|
||||
services.openssh.enable = false;
|
||||
|
||||
# Enable Flatpak
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Enable Tailscale
|
||||
services.tailscale.enable = true;
|
||||
|
||||
# Enable Podman
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
|
||||
# Enable Firmware Updater
|
||||
services.fwupd.enable = true;
|
||||
# fwupdmgr refresh
|
||||
# fwupdmgr get-updates
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
}
|
BIN
files/tootbrute.png
Normal file
BIN
files/tootbrute.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 75 KiB |
BIN
files/wallpaper.png
Normal file
BIN
files/wallpaper.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.1 MiB |
42
hardware-configuration.nix
Normal file
42
hardware-configuration.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/67519a81-c750-4cab-9e25-1f709b0b90de";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-900b6217-47c2-40e5-b14d-de4874ade307".device = "/dev/disk/by-uuid/900b6217-47c2-40e5-b14d-de4874ade307";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B738-2CA0";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/5eec28f1-ee73-4e9f-a6ae-9234f5dbb0fd"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
32
modules/fonts.nix
Normal file
32
modules/fonts.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Fonts
|
||||
fonts.packages = with pkgs; [
|
||||
corefonts
|
||||
vistafonts
|
||||
noto-fonts
|
||||
|
||||
# cjk fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
vistafonts-cht
|
||||
source-han-serif
|
||||
source-han-sans-vf-otf
|
||||
source-han-sans-vf-ttf
|
||||
source-han-mono
|
||||
|
||||
# coding/terminal fonts
|
||||
liberation_ttf
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
mplus-outline-fonts.githubRelease
|
||||
dina-font
|
||||
proggyfonts
|
||||
iosevka
|
||||
nerdfonts
|
||||
];
|
||||
|
||||
fonts.fontDir.enable = true;
|
||||
}
|
61
modules/gnome.nix
Normal file
61
modules/gnome.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Auto unlock gnome keyring
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
security.pam.services.sddm.enableGnomeKeyring = true;
|
||||
|
||||
# Remove default packages from GNOME
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
baobab # disk usage analyzer
|
||||
cheese # photo booth
|
||||
eog # image viewer
|
||||
epiphany # web browser
|
||||
#gedit # text editor
|
||||
simple-scan # document scanner
|
||||
totem # video player
|
||||
yelp # help viewer
|
||||
file-roller # archive manager
|
||||
geary # email client
|
||||
seahorse # password manager
|
||||
gnome-contacts
|
||||
gnome-weather
|
||||
gnome-maps
|
||||
gnome-music
|
||||
gnome-software
|
||||
gnome-extension-manager
|
||||
gnome-shell-extensions
|
||||
gnome-photos
|
||||
gnome-connections
|
||||
snapshot
|
||||
gnome-logs
|
||||
gnome-system-monitor
|
||||
gnome-calculator
|
||||
gnome-tour
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
#Gnome tweak tools
|
||||
gnome-tweaks
|
||||
gnomeExtensions.appindicator
|
||||
gnomeExtensions.caffeine
|
||||
gnomeExtensions.gsconnect
|
||||
gnomeExtensions.hot-edge
|
||||
gnomeExtensions.alphabetical-app-grid
|
||||
gnomeExtensions.kimpanel
|
||||
];
|
||||
|
||||
# Set User 'elias' icon to tootbrute.png image
|
||||
system.activationScripts.script.text = ''
|
||||
mkdir -p /var/lib/AccountsService/{icons,users}
|
||||
cp /home/elias/nixos-config/files/tootbrute.png /var/lib/AccountsService/icons/elias
|
||||
echo -e "[User]\nIcon=/var/lib/AccountsService/icons/elias\n" > /var/lib/AccountsService/users/elias
|
||||
|
||||
chown root:root /var/lib/AccountsService/users/elias
|
||||
chmod 0600 /var/lib/AccountsService/users/elias
|
||||
|
||||
chown root:root /var/lib/AccountsService/icons/elias
|
||||
chmod 0444 /var/lib/AccountsService/icons/elias
|
||||
'';
|
||||
|
||||
}
|
15
modules/intel-gpu.nix
Normal file
15
modules/intel-gpu.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
# for Accelerated Video Playback
|
||||
# https://wiki.nixos.org/wiki/Accelerated_Video_Playback
|
||||
{
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD
|
||||
intel-vaapi-driver # For older processors. LIBVA_DRIVER_NAME=i965, works better for firefox/chromium?
|
||||
vpl-gpu-rt # For Quick Sync Video
|
||||
];
|
||||
};
|
||||
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Optionally, set the environment variable
|
||||
}
|
99
modules/programs.nix
Normal file
99
modules/programs.nix
Normal file
|
@ -0,0 +1,99 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
{
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
# terminal apps
|
||||
wget
|
||||
curl
|
||||
fastfetch
|
||||
git
|
||||
btop
|
||||
htop
|
||||
tree
|
||||
restic # backup program
|
||||
wiper # A TUI disk analyser and cleanup tool
|
||||
curl
|
||||
|
||||
# emulation
|
||||
quickemu
|
||||
|
||||
#emulation
|
||||
distrobox
|
||||
|
||||
# terminal editors
|
||||
neovim
|
||||
xclip # for nvim clipboard
|
||||
ptyxis
|
||||
|
||||
# nix helper apps
|
||||
nh
|
||||
|
||||
# core apps
|
||||
iotas # nextcloud compatible notes app
|
||||
keepassxc # password client
|
||||
nextcloud-client
|
||||
calibre # ebook program
|
||||
libreoffice-fresh # word docs
|
||||
hunspell # dictionaries for libreoffice
|
||||
hunspellDicts.en_CA
|
||||
hunspellDicts.en_US
|
||||
xreader # pdf viewer
|
||||
|
||||
# creative apps
|
||||
kdePackages.kdenlive
|
||||
audacity
|
||||
gimp
|
||||
pkgs.krita
|
||||
element-desktop
|
||||
|
||||
#gaming
|
||||
dosbox
|
||||
|
||||
#gpu tools
|
||||
intel-gpu-tools
|
||||
#nvtopPackages.full not working right now
|
||||
|
||||
# archive programs
|
||||
zip
|
||||
xz
|
||||
unzip
|
||||
p7zip
|
||||
|
||||
# utils
|
||||
ripgrep # recursively searches directories for a regex >
|
||||
#jq # A lightweight and flexible command-line JSON proc>
|
||||
#yq-go # yaml processor https://github.com/mikefarah/yq
|
||||
eza # A modern replacement for ‘ls’
|
||||
#fzf # A command-line fuzzy finder
|
||||
nnn # terminal file manager
|
||||
|
||||
# networking tools
|
||||
mtr # A network diagnostic tool
|
||||
iperf3
|
||||
dnsutils # `dig` + `nslookup`
|
||||
#ldns # replacement of `dig`, it provide the command `drill`
|
||||
#aria2 # A lightweight multi-protocol & multi-source command-line download utility
|
||||
#socat # replacement of openbsd-netcat
|
||||
nmap # A utility for network discovery and security auditing
|
||||
#ipcalc # it is a calculator for the IPv4/v6 addresses
|
||||
|
||||
# system tools
|
||||
sysstat
|
||||
lm_sensors # for `sensors` command
|
||||
ethtool
|
||||
pciutils # lspci
|
||||
usbutils # lsusb
|
||||
|
||||
# system call monitoring
|
||||
strace # system call monitoring
|
||||
ltrace # library call monitoring
|
||||
lsof # list open files
|
||||
|
||||
iotop # io monitoring
|
||||
iftop # network monitoring
|
||||
|
||||
];
|
||||
|
||||
}
|
1
nix-upgrade.sh
Executable file
1
nix-upgrade.sh
Executable file
|
@ -0,0 +1 @@
|
|||
sudo nix-channel --update
|
14
pull.sh
Executable file
14
pull.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
# pull new stuff down
|
||||
echo "pulling nixos config from git repo"
|
||||
git pull origin main
|
||||
|
||||
# update nixos
|
||||
# sudo nixos-rebuild switch --flake .#HOST
|
||||
#sudo nixos-rebuild switch --flake '.#greynix'
|
||||
#sudo nixos-rebuild switch --flake '.#bluenix'
|
||||
|
||||
# flake update
|
||||
# sudo nix flake update
|
||||
|
||||
# check on things
|
||||
# git status
|
2
rebuild.sh
Executable file
2
rebuild.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
nixos-rebuild switch -I nixos-config=/home/elias/nixos-greynix/configuration.nix
|
||||
sudo nixos-rebuild switch
|
29
scripts/flatpak-install.sh
Executable file
29
scripts/flatpak-install.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/run/current-system/sw/bin/bash
|
||||
# flatpak list --columns=application
|
||||
# find flatpaks that are important
|
||||
# add them to this variable
|
||||
|
||||
MY_FLATPAKS="
|
||||
md.obsidian.Obsidian
|
||||
org.localsend.localsend_app
|
||||
org.torproject.torbrowser-launcher
|
||||
org.videolan.VLC
|
||||
chat.simplex.simplex
|
||||
io.github.flattool.Warehouse
|
||||
io.missioncenter.MissionCenter
|
||||
io.github.celluloid_player.Celluloid
|
||||
io.github.dweymouth.supersonic
|
||||
com.github.tchx84.Flatseal
|
||||
com.brave.Browser
|
||||
com.mattjakeman.ExtensionManager
|
||||
io.github.ungoogled_software.ungoogled_chromium
|
||||
io.gitlab.librewolf-community
|
||||
com.valvesoftware.Steam
|
||||
"
|
||||
|
||||
#MY_FLATPAKS=(
|
||||
# org.gimp.GIMP
|
||||
# md.obsidian.Obsidian
|
||||
# )
|
||||
|
||||
flatpak install --assumeyes $MY_FLATPAKS
|
9
update.sh
Executable file
9
update.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
# add things to git
|
||||
COMMIT_MSG="Update NixOS config."
|
||||
echo "Commit message?"
|
||||
read COMMIT_MSG
|
||||
echo "OK!"
|
||||
|
||||
git add .
|
||||
git commit -m "$COMMIT_MSG"
|
||||
git push origin main
|
Loading…
Add table
Add a link
Reference in a new issue