188 current 2025-06-06 18:54:16 25.11.20250605.d3d2d80 6.15.1 *
This commit is contained in:
156
nixos/base.nix
Normal file
156
nixos/base.nix
Normal file
@@ -0,0 +1,156 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Garbage collection
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 1w";
|
||||
};
|
||||
|
||||
# Optimize store
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
# Allow power management
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Firmware updates
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "C.UTF-8";
|
||||
};
|
||||
|
||||
# Catppuccin
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
flavor = "mocha";
|
||||
};
|
||||
|
||||
# Configure keymap
|
||||
console.keyMap = "jp106";
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = lib.mkDefault "jp";
|
||||
model = "jp106";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable Flakes
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Bash config
|
||||
programs.bash = {
|
||||
blesh.enable = true;
|
||||
};
|
||||
|
||||
# Define a user account
|
||||
users.users.chase = {
|
||||
isNormalUser = true;
|
||||
description = "Chase";
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
};
|
||||
|
||||
# Install git and enable cache
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
credential = {
|
||||
helper = "cache --timeout 21600";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Install Neovim
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
configure = {
|
||||
customRC = ''
|
||||
set autoindent
|
||||
set number relativenumber
|
||||
set tabstop=4
|
||||
colorscheme catppuccin-mocha
|
||||
'';
|
||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||
start = [catppuccin-nvim];
|
||||
};
|
||||
};
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
|
||||
# List packages installed in system profile.
|
||||
environment.systemPackages = with pkgs; [
|
||||
alejandra
|
||||
bitwarden-cli
|
||||
cifs-utils
|
||||
flashrom
|
||||
gcc
|
||||
nixd
|
||||
pciutils
|
||||
python3
|
||||
qemu
|
||||
rustup
|
||||
usbutils
|
||||
wget
|
||||
];
|
||||
|
||||
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||
|
||||
# ssh agent
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent.enable = true;
|
||||
|
||||
programs.ssh = {
|
||||
enableAskPassword = false;
|
||||
};
|
||||
|
||||
services.fstrim.enable = lib.mkDefault true;
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
};
|
||||
}
|
299
nixos/configuration.nix
Normal file
299
nixos/configuration.nix
Normal file
@@ -0,0 +1,299 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Garbage collection
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 1w";
|
||||
};
|
||||
|
||||
# Optimize store
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
# Use latest stable kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# Allow power management
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Firmware updates
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Enable Bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "C.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.enable = true;
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
extraPackages = [pkgs.kdePackages.sddm-kcm];
|
||||
wayland.enable = true;
|
||||
enableHidpi = true;
|
||||
};
|
||||
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
elisa
|
||||
kate
|
||||
];
|
||||
|
||||
# Cachix for Hyprland
|
||||
nix.settings = {
|
||||
substituters = ["https://hyprland.cachix.org"];
|
||||
trusted-substituters = ["https://hyprland.cachix.org"];
|
||||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||||
};
|
||||
|
||||
# Hyprland
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
# Catppuccin
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
flavor = "mocha";
|
||||
sddm = {
|
||||
enable = true;
|
||||
background = "/home/chase/nixos-config/home/wallpaper.jpg";
|
||||
flavor = "mocha";
|
||||
font = "IBM Plex Sans";
|
||||
fontSize = "11";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable graphics acceleration and AMDVLK
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
};
|
||||
|
||||
# Configure keymap
|
||||
console.keyMap = "jp106";
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = lib.mkDefault "jp";
|
||||
model = "jp106";
|
||||
};
|
||||
|
||||
i18n.inputMethod = {
|
||||
type = "fcitx5";
|
||||
enable = true;
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
kdePackages.fcitx5-qt
|
||||
];
|
||||
fcitx5.waylandFrontend = true;
|
||||
};
|
||||
|
||||
# Fonts
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
ibm-plex
|
||||
liberation_ttf
|
||||
nerd-fonts.blex-mono
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
];
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
serif = ["IBM Plex Serif"];
|
||||
sansSerif = ["IBM Plex Sans"];
|
||||
monospace = ["BlexMono Nerd Font"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Enable Flakes
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Bash config
|
||||
programs.bash = {
|
||||
blesh.enable = true;
|
||||
};
|
||||
|
||||
# Define a user account
|
||||
users.users.chase = {
|
||||
isNormalUser = true;
|
||||
description = "Chase";
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
};
|
||||
|
||||
# Install firefox
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
nativeMessagingHosts.packages = [pkgs.firefoxpwa];
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Install git and enable cache
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
credential = {
|
||||
helper = "cache --timeout 21600";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Install Neovim
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
configure = {
|
||||
customRC = ''
|
||||
set autoindent
|
||||
set number relativenumber
|
||||
set tabstop=4
|
||||
colorscheme catppuccin-mocha
|
||||
'';
|
||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||
start = [catppuccin-nvim];
|
||||
};
|
||||
};
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
|
||||
# Install Steam
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
};
|
||||
|
||||
# List packages installed in system profile.
|
||||
environment.systemPackages = with pkgs; [
|
||||
alejandra
|
||||
bitwarden-cli
|
||||
bitwarden-desktop
|
||||
(catppuccin-kde.override {
|
||||
flavour = ["mocha"];
|
||||
accents = [
|
||||
"blue"
|
||||
"lavender"
|
||||
"pink"
|
||||
"sapphire"
|
||||
];
|
||||
winDecStyles = ["classic"];
|
||||
})
|
||||
cifs-utils
|
||||
firefoxpwa
|
||||
flashrom
|
||||
gcc
|
||||
nixd
|
||||
pciutils
|
||||
python3
|
||||
qemu
|
||||
rustup
|
||||
usbutils
|
||||
wget
|
||||
];
|
||||
|
||||
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||
|
||||
# ssh agent
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent.enable = true;
|
||||
|
||||
programs.ssh = {
|
||||
enableAskPassword = false;
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
services.fprintd.enable = true;
|
||||
|
||||
# security.polkit.enable = true;
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
# 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?
|
||||
}
|
138
nixos/desktop.nix
Normal file
138
nixos/desktop.nix
Normal file
@@ -0,0 +1,138 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./base.nix
|
||||
];
|
||||
# Use latest stable kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# Enable Bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.enable = true;
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
extraPackages = [pkgs.kdePackages.sddm-kcm];
|
||||
wayland.enable = true;
|
||||
enableHidpi = true;
|
||||
};
|
||||
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
elisa
|
||||
kate
|
||||
];
|
||||
|
||||
# Cachix for Hyprland
|
||||
nix.settings = {
|
||||
substituters = ["https://hyprland.cachix.org"];
|
||||
trusted-substituters = ["https://hyprland.cachix.org"];
|
||||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||||
};
|
||||
|
||||
# Hyprland
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
# Catppuccin
|
||||
catppuccin = {
|
||||
sddm = {
|
||||
enable = true;
|
||||
background = "/home/chase/nixos-config/home/wallpaper.jpg";
|
||||
flavor = "mocha";
|
||||
font = "IBM Plex Sans";
|
||||
fontSize = "11";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable graphics
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
i18n.inputMethod = {
|
||||
type = "fcitx5";
|
||||
enable = true;
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
kdePackages.fcitx5-qt
|
||||
];
|
||||
fcitx5.waylandFrontend = true;
|
||||
};
|
||||
|
||||
# Fonts
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
ibm-plex
|
||||
liberation_ttf
|
||||
nerd-fonts.blex-mono
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
];
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
serif = ["IBM Plex Serif"];
|
||||
sansSerif = ["IBM Plex Sans"];
|
||||
monospace = ["BlexMono Nerd Font"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable sound with pipewire.
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Install firefox
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
nativeMessagingHosts.packages = [pkgs.firefoxpwa];
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Install Steam
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
};
|
||||
|
||||
# List packages installed in system profile.
|
||||
environment.systemPackages = with pkgs; [
|
||||
bitwarden-desktop
|
||||
(catppuccin-kde.override {
|
||||
flavour = ["mocha"];
|
||||
accents = [
|
||||
"blue"
|
||||
"lavender"
|
||||
"pink"
|
||||
"sapphire"
|
||||
];
|
||||
winDecStyles = ["classic"];
|
||||
})
|
||||
firefoxpwa
|
||||
];
|
||||
|
||||
services.fprintd.enable = true;
|
||||
}
|
Reference in New Issue
Block a user