massive rearchitecture
This commit is contained in:
@@ -5,34 +5,20 @@
|
|||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
./nix-settings.nix
|
||||||
|
./fonts.nix
|
||||||
|
./kde.nix
|
||||||
|
./virtualisation.nix
|
||||||
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
nix.settings.auto-optimise-store = true;
|
|
||||||
nix.gc.automatic = true;
|
|
||||||
nix.gc.options = "--delete-older-than 30d";
|
|
||||||
|
|
||||||
services.fstrim.enable = true;
|
|
||||||
|
|
||||||
hardware.graphics.enable32Bit = true; # For 32 bit applications
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.steam-hardware.enable = true;
|
|
||||||
|
|
||||||
# Enable common container config files in /etc/containers
|
|
||||||
virtualisation.containers.enable = true;
|
|
||||||
virtualisation = {
|
|
||||||
podman = {
|
|
||||||
enable = true;
|
|
||||||
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
|
||||||
dockerCompat = true;
|
|
||||||
# Required for containers under podman-compose to be able to talk to each other.
|
|
||||||
defaultNetwork.settings.dns_enabled = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# networking.hostName = "nixos"; # Define your hostname.
|
# networking.hostName = "nixos"; # Define your hostname.
|
||||||
# Pick only one of the below networking options.
|
# Pick only one of the below networking options.
|
||||||
@@ -43,12 +29,6 @@
|
|||||||
wifi.powersave = false;
|
wifi.powersave = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.resolved.enable = true;
|
|
||||||
services.mullvad-vpn = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.mullvad-vpn;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/London";
|
time.timeZone = "Europe/London";
|
||||||
|
|
||||||
@@ -56,45 +36,6 @@
|
|||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
fonts.enableDefaultPackages = true;
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk-sans
|
|
||||||
noto-fonts-cjk-serif
|
|
||||||
];
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n = {
|
|
||||||
defaultLocale = "en_GB.UTF-8";
|
|
||||||
supportedLocales = [
|
|
||||||
"en_GB.UTF-8/UTF-8"
|
|
||||||
"en_US.UTF-8/UTF-8"
|
|
||||||
"ja_JP.UTF-8/UTF-8"
|
|
||||||
];
|
|
||||||
inputMethod = {
|
|
||||||
enable = true;
|
|
||||||
type = "fcitx5";
|
|
||||||
fcitx5 = {
|
|
||||||
waylandFrontend = true;
|
|
||||||
addons = with pkgs; [ fcitx5-mozc ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
console = {
|
|
||||||
# font = "Lat2-Terminus16";
|
|
||||||
keyMap = "uk";
|
|
||||||
# useXkbConfig = true; # use xkb.options in tty.
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
# services.xserver.enable = true;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
# services.xserver.xkb.layout = "us";
|
|
||||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
# services.printing.enable = true;
|
# services.printing.enable = true;
|
||||||
|
|
||||||
@@ -106,68 +47,38 @@
|
|||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.power-profiles-daemon.enable = false;
|
services.fstrim.enable = true;
|
||||||
services.tlp = {
|
# services.resolved.enable = true;
|
||||||
|
services.mullvad-vpn = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
package = pkgs.mullvad-vpn;
|
||||||
RESTORE_DEVICE_STATE_ON_STARTUP = 1;
|
|
||||||
USB_AUTOSUSPEND = 0;
|
|
||||||
PLATFORM_PROFILE_ON_AC = "performance";
|
|
||||||
PLATFORM_PROFILE_ON_BAT = "low-power";
|
|
||||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
|
||||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
|
||||||
CPU_BOOST_ON_AC = 1;
|
|
||||||
CPU_BOOST_ON_BAT = 0;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
services.libinput.enable = true;
|
|
||||||
|
|
||||||
services.xserver.enable = true; # optional
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.displayManager.sddm.wayland.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
|
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
services.geoclue2.enable = true;
|
services.geoclue2.enable = true;
|
||||||
|
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
|
||||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
|
||||||
#gamescopeSession.enable = true;
|
|
||||||
};
|
|
||||||
programs.gamemode.enable = true;
|
|
||||||
|
|
||||||
programs.cdemu.enable = true;
|
|
||||||
|
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs;
|
environment.systemPackages = with pkgs;
|
||||||
[
|
[
|
||||||
|
nixpkgs-fmt
|
||||||
|
|
||||||
|
gcc
|
||||||
|
|
||||||
vim
|
vim
|
||||||
curl
|
curl
|
||||||
wget
|
wget
|
||||||
inetutils
|
inetutils
|
||||||
|
rar
|
||||||
|
|
||||||
nuspell
|
nuspell
|
||||||
hunspellDicts.en-gb-ise
|
hunspellDicts.en-gb-ise
|
||||||
gcc
|
|
||||||
libva-utils
|
libva-utils
|
||||||
kdePackages.sddm-kcm
|
|
||||||
smartmontools
|
smartmontools
|
||||||
kdePackages.plasma-disks
|
|
||||||
kdePackages.partitionmanager
|
|
||||||
kdePackages.filelight
|
|
||||||
kdePackages.ffmpegthumbs
|
|
||||||
kdePackages.kcalc
|
|
||||||
rar
|
|
||||||
nixpkgs-fmt
|
|
||||||
distrobox
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
35
configuration/fonts.nix
Normal file
35
configuration/fonts.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
fonts.enableDefaultPackages = true;
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts-cjk-serif
|
||||||
|
];
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "en_GB.UTF-8";
|
||||||
|
supportedLocales = [
|
||||||
|
"en_GB.UTF-8/UTF-8"
|
||||||
|
"en_US.UTF-8/UTF-8"
|
||||||
|
"ja_JP.UTF-8/UTF-8"
|
||||||
|
];
|
||||||
|
inputMethod = {
|
||||||
|
enable = true;
|
||||||
|
type = "fcitx5";
|
||||||
|
fcitx5 = {
|
||||||
|
waylandFrontend = true;
|
||||||
|
addons = with pkgs; [ fcitx5-mozc ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
console = {
|
||||||
|
# font = "Lat2-Terminus16";
|
||||||
|
keyMap = "uk";
|
||||||
|
# useXkbConfig = true; # use xkb.options in tty.
|
||||||
|
};
|
||||||
|
}
|
||||||
23
configuration/kde.nix
Normal file
23
configuration/kde.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.xserver.enable = true; # optional
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
# services.xserver.xkb.layout = "us";
|
||||||
|
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||||
|
|
||||||
|
services.displayManager.sddm.enable = true;
|
||||||
|
services.displayManager.sddm.wayland.enable = true;
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs;
|
||||||
|
[ ] ++ (with kdePackages; [
|
||||||
|
sddm-kcm
|
||||||
|
plasma-disks
|
||||||
|
partitionmanager
|
||||||
|
filelight
|
||||||
|
ffmpegthumbs
|
||||||
|
kcalc
|
||||||
|
]);
|
||||||
|
}
|
||||||
10
configuration/nix-settings.nix
Normal file
10
configuration/nix-settings.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
nix.gc.automatic = true;
|
||||||
|
nix.gc.options = "--delete-older-than 30d";
|
||||||
|
}
|
||||||
|
|
||||||
22
configuration/virtualisation.nix
Normal file
22
configuration/virtualisation.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
virtualisation = {
|
||||||
|
containers = {
|
||||||
|
# Enable common container config files in /etc/containers
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
podman = {
|
||||||
|
enable = true;
|
||||||
|
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
||||||
|
dockerCompat = true;
|
||||||
|
# Required for containers under podman-compose to be able to talk to each other.
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
nixosConfigurations.tuxedo = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.tuxedo = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration/base.nix
|
||||||
./tuxedo/configuration.nix
|
./tuxedo/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
15
home-manager/development/tools.nix
Normal file
15
home-manager/development/tools.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ inputs, config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs;[
|
||||||
|
git-credential-manager
|
||||||
|
(with dotnetCorePackages; combinePackages [
|
||||||
|
sdk_8_0
|
||||||
|
sdk_9_0
|
||||||
|
])
|
||||||
|
jetbrains.rider
|
||||||
|
azure-cli
|
||||||
|
azuredatastudio
|
||||||
|
rustup
|
||||||
|
];
|
||||||
|
}
|
||||||
19
home-manager/fonts.nix
Normal file
19
home-manager/fonts.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ inputs, config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs;[
|
||||||
|
liberation_ttf
|
||||||
|
ubuntu-sans
|
||||||
|
ubuntu-sans-mono
|
||||||
|
(nerdfonts.override { fonts = [ "SpaceMono" ]; })
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fontconfig = {
|
||||||
|
enable = true;
|
||||||
|
defaultFonts = {
|
||||||
|
monospace = [ "Ubuntu Sans Mono" ];
|
||||||
|
sansSerif = [ "Ubuntu Sans" ];
|
||||||
|
serif = [ "Liberation Serif" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
home-manager/gaming.nix
Normal file
11
home-manager/gaming.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ inputs, config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs;[
|
||||||
|
steamguard-cli
|
||||||
|
bottles
|
||||||
|
protontricks
|
||||||
|
gamescope
|
||||||
|
inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".ryujinx-greemdev
|
||||||
|
];
|
||||||
|
}
|
||||||
17
modules/gaming.nix
Normal file
17
modules/gaming.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
hardware.graphics.enable32Bit = true; # For 32 bit applications
|
||||||
|
hardware.steam-hardware.enable = true;
|
||||||
|
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||||
|
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||||
|
#gamescopeSession.enable = true;
|
||||||
|
};
|
||||||
|
programs.gamemode.enable = true;
|
||||||
|
|
||||||
|
# ensure users who need access to this have `cdrom` as `extraGroups`
|
||||||
|
programs.cdemu.enable = true;
|
||||||
|
}
|
||||||
21
modules/laptop.nix
Normal file
21
modules/laptop.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.power-profiles-daemon.enable = false;
|
||||||
|
services.tlp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
RESTORE_DEVICE_STATE_ON_STARTUP = 1;
|
||||||
|
USB_AUTOSUSPEND = 0;
|
||||||
|
PLATFORM_PROFILE_ON_AC = "performance";
|
||||||
|
PLATFORM_PROFILE_ON_BAT = "low-power";
|
||||||
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||||
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||||
|
CPU_BOOST_ON_AC = 1;
|
||||||
|
CPU_BOOST_ON_BAT = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
services.libinput.enable = true;
|
||||||
|
}
|
||||||
@@ -12,6 +12,8 @@
|
|||||||
inputs.disko.nixosModules.default
|
inputs.disko.nixosModules.default
|
||||||
./disk-config.nix
|
./disk-config.nix
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
|
../modules/laptop.nix
|
||||||
|
../modules/gaming.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
fileSystems."/mnt/HDD1" = {
|
fileSystems."/mnt/HDD1" = {
|
||||||
@@ -29,8 +31,8 @@
|
|||||||
|
|
||||||
hardware.tuxedo-drivers.enable = true;
|
hardware.tuxedo-drivers.enable = true;
|
||||||
programs.gpu-screen-recorder.enable = true;
|
programs.gpu-screen-recorder.enable = true;
|
||||||
virtualisation.libvirtd.enable = true;
|
|
||||||
programs.virt-manager.enable = true;
|
# ......omit many configurations
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.worble = {
|
users.users.worble = {
|
||||||
|
|||||||
@@ -2,9 +2,12 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../../home-manager/fonts.nix
|
||||||
../../home-manager/terminal.nix
|
../../home-manager/terminal.nix
|
||||||
../../home-manager/firefox/firefox.nix
|
../../home-manager/firefox/firefox.nix
|
||||||
../../home-manager/vscode.nix
|
../../home-manager/development/tools.nix
|
||||||
|
../../home-manager/development/vscode.nix
|
||||||
|
../../home-manager/gaming.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
terminal.nixUpdateLocation = "/home/worble/Projects/nixos#tuxedo";
|
terminal.nixUpdateLocation = "/home/worble/Projects/nixos#tuxedo";
|
||||||
@@ -43,55 +46,28 @@
|
|||||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||||
# echo "Hello, ${config.home.username}!"
|
# echo "Hello, ${config.home.username}!"
|
||||||
# '')
|
# '')
|
||||||
|
thunderbird
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
ubuntu-sans
|
|
||||||
ubuntu-sans-mono
|
|
||||||
(nerdfonts.override { fonts = [ "SpaceMono" ]; })
|
|
||||||
keepassxc
|
keepassxc
|
||||||
bottles
|
|
||||||
rustup
|
|
||||||
strawberry-qt6
|
strawberry-qt6
|
||||||
rclone
|
rclone
|
||||||
qbittorrent
|
qbittorrent
|
||||||
teamspeak_client
|
|
||||||
thunderbird
|
|
||||||
git-credential-manager
|
|
||||||
(with dotnetCorePackages; combinePackages [
|
|
||||||
sdk_8_0
|
|
||||||
sdk_9_0
|
|
||||||
])
|
|
||||||
gimp-with-plugins
|
gimp-with-plugins
|
||||||
ffmpeg-full
|
ffmpeg-full
|
||||||
protonup-qt
|
|
||||||
protontricks
|
|
||||||
gamescope
|
|
||||||
yt-dlp
|
yt-dlp
|
||||||
joplin-desktop
|
joplin-desktop
|
||||||
obsidian
|
obsidian
|
||||||
|
teamspeak_client
|
||||||
webcord
|
webcord
|
||||||
libreoffice-qt
|
libreoffice-qt
|
||||||
azure-cli
|
|
||||||
jetbrains.rider
|
|
||||||
steamguard-cli
|
|
||||||
jellyfin-media-player
|
jellyfin-media-player
|
||||||
haruna
|
haruna
|
||||||
azuredatastudio
|
|
||||||
inotify-tools
|
inotify-tools
|
||||||
libnotify
|
libnotify
|
||||||
electrum
|
electrum
|
||||||
gpu-screen-recorder-gtk
|
gpu-screen-recorder-gtk
|
||||||
inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".ryujinx-greemdev
|
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fontconfig = {
|
|
||||||
enable = true;
|
|
||||||
defaultFonts = {
|
|
||||||
monospace = [ "Ubuntu Sans Mono" ];
|
|
||||||
sansSerif = [ "Ubuntu Sans" ];
|
|
||||||
serif = [ "Liberation Serif" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
# plain files is through 'home.file'.
|
# plain files is through 'home.file'.
|
||||||
home.file = {
|
home.file = {
|
||||||
@@ -127,9 +103,9 @@
|
|||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionPath = [
|
# home.sessionPath = [
|
||||||
"$HOME/.local/bin"
|
# "$HOME/.local/bin"
|
||||||
];
|
# ];
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs = {
|
programs = {
|
||||||
|
|||||||
Reference in New Issue
Block a user