Init
This commit is contained in:
210
configuration.nix
Normal file
210
configuration.nix
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
nix.gc.automatic = true;
|
||||||
|
nix.gc.options = "--delete-older-than 7d";
|
||||||
|
|
||||||
|
services.fstrim.enable = true;
|
||||||
|
|
||||||
|
hardware.graphics.enable32Bit = true; # For 32 bit applications
|
||||||
|
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.
|
||||||
|
# Pick only one of the below networking options.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/London";
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# 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.
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound.
|
||||||
|
# hardware.pulseaudio.enable = true;
|
||||||
|
# OR
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
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.geoclue2.enable = true;
|
||||||
|
|
||||||
|
services.resolved.enable = true;
|
||||||
|
services.mullvad-vpn = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mullvad-vpn;
|
||||||
|
};
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = 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;
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = with pkgs;
|
||||||
|
[
|
||||||
|
vim
|
||||||
|
curl
|
||||||
|
wget
|
||||||
|
inetutils
|
||||||
|
nuspell
|
||||||
|
hunspellDicts.en-gb-ise
|
||||||
|
gcc
|
||||||
|
libva-utils
|
||||||
|
kdePackages.sddm-kcm
|
||||||
|
smartmontools
|
||||||
|
kdePackages.plasma-disks
|
||||||
|
kdePackages.partitionmanager
|
||||||
|
kdePackages.filelight
|
||||||
|
kdePackages.ffmpegthumbs
|
||||||
|
kdePackages.kcalc
|
||||||
|
rar
|
||||||
|
nixpkgs-fmt
|
||||||
|
inotify-tools
|
||||||
|
];
|
||||||
|
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# programs.mtr.enable = true;
|
||||||
|
# programs.gnupg.agent = {
|
||||||
|
# enable = true;
|
||||||
|
# enableSSHSupport = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
|
# accidentally delete configuration.nix.
|
||||||
|
# system.copySystemConfiguration = true;
|
||||||
|
|
||||||
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
#
|
||||||
|
# Most users should NEVER change this value after the initial install, for any reason,
|
||||||
|
# even if you've upgraded your system to a new NixOS release.
|
||||||
|
#
|
||||||
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||||
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||||
|
# to actually do that.
|
||||||
|
#
|
||||||
|
# This value being lower than the current NixOS release does NOT mean your system is
|
||||||
|
# out of date, out of support, or vulnerable.
|
||||||
|
#
|
||||||
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||||
|
# and migrated your data accordingly.
|
||||||
|
#
|
||||||
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
|
system.stateVersion = "24.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
}
|
||||||
155
flake.lock
generated
Normal file
155
flake.lock
generated
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"disko": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734343412,
|
||||||
|
"narHash": "sha256-b7G8oFp0Nj01BYUJ6ENC9Qf/HsYAIZvN9k/p0Kg/PFU=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"rev": "a08bfe06b39e94eec98dd089a2c1b18af01fef19",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734344598,
|
||||||
|
"narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "83ecd50915a09dca928971139d3a102377a8d242",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-vscode-extensions": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734314392,
|
||||||
|
"narHash": "sha256-EydUadS7omV3SO/4TLeMkLT2JUugvPEtvBoAF43ggWU=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-vscode-extensions",
|
||||||
|
"rev": "4ef033412f0732794077fcc25af4f79f097ad1e1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-vscode-extensions",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713805509,
|
||||||
|
"narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1e1dc66fe68972a76679644a5577828b6a7e8be4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734119587,
|
||||||
|
"narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"disko": "disko",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
24
flake.nix
Normal file
24
flake.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
disko = {
|
||||||
|
url = "github:nix-community/disko";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, ... }@inputs: {
|
||||||
|
nixosConfigurations.tuxedo = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
./tuxedo/configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
58
tuxedo/configuration.nix
Normal file
58
tuxedo/configuration.nix
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
# Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
inputs.disko.nixosModules.default
|
||||||
|
./disk-config.nix
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
];
|
||||||
|
|
||||||
|
fileSystems."/mnt/HDD1" = {
|
||||||
|
#device = "/dev/disk/by-uuid/35763dc3-c736-4714-ade7-40bf49ad50dd";
|
||||||
|
fsType = "ext4";
|
||||||
|
label = "HDD1";
|
||||||
|
options = [
|
||||||
|
# If you don't have this options attribute, it'll default to "defaults"
|
||||||
|
# boot options for fstab. Search up fstab mount options you can use
|
||||||
|
"users" # Allows any user to mount and unmount
|
||||||
|
"nofail" # Prevent system from failing if this drive doesn't mount
|
||||||
|
"exec" # Permit execution of binaries and other executable files
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.tuxedo-drivers.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.worble = {
|
||||||
|
initialPassword = "password";
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" "gamemode" "podman" "cdrom" ]; # Enable ‘sudo’ for the user.
|
||||||
|
linger = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
users = {
|
||||||
|
"worble" = import ./home-manager/home.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# systemd.user.services.my-cool-user-service = {
|
||||||
|
# enable = true;
|
||||||
|
# after = [ "network.target" "mnt-HDD1.mount" ];
|
||||||
|
# wantedBy = [ "multi-user.target" ];
|
||||||
|
# description = "rclone copy media";
|
||||||
|
# serviceConfig = {
|
||||||
|
# Type = "simple";
|
||||||
|
# ExecStart = ''/my/cool/user/service'';
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
}
|
||||||
38
tuxedo/disk-config.nix
Normal file
38
tuxedo/disk-config.nix
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
main = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = {
|
||||||
|
priority = 1;
|
||||||
|
name = "ESP";
|
||||||
|
start = "1M";
|
||||||
|
end = "128M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ]; # Override existing partition
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
27
tuxedo/hardware-configuration.nix
Normal file
27
tuxedo/hardware-configuration.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# 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 = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
# 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.enp4s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
BIN
tuxedo/home-manager/anime4k/GLSL_Mac_Linux_High-end.zip
Normal file
BIN
tuxedo/home-manager/anime4k/GLSL_Mac_Linux_High-end.zip
Normal file
Binary file not shown.
BIN
tuxedo/home-manager/anime4k/GLSL_Mac_Linux_Low-end.zip
Normal file
BIN
tuxedo/home-manager/anime4k/GLSL_Mac_Linux_Low-end.zip
Normal file
Binary file not shown.
72
tuxedo/home-manager/firefox-profile.nix
Normal file
72
tuxedo/home-manager/firefox-profile.nix
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
settings = {
|
||||||
|
# data privacy
|
||||||
|
"browser.contentblocking.category" = "strict";
|
||||||
|
"browser.discovery.enabled" = false;
|
||||||
|
"datareporting.healthreport.uploadEnabled" = false;
|
||||||
|
"dom.security.https_only_mode" = true;
|
||||||
|
# no autofill
|
||||||
|
"extensions.formautofill.addresses.enabled" = false;
|
||||||
|
"extensions.formautofill.creditCards.enabled" = false;
|
||||||
|
# stop fonts
|
||||||
|
"browser.display.use_document_fonts" = 0;
|
||||||
|
# dont show about:config warning
|
||||||
|
"browser.aboutConfig.showWarning" = false;
|
||||||
|
# dont offer to save passwords
|
||||||
|
"signon.rememberSignons" = false;
|
||||||
|
# home page
|
||||||
|
"browser.startup.homepage" = "chrome://browser/content/blanktab.html";
|
||||||
|
# blank new tab
|
||||||
|
"browser.newtabpage.enabled" = false;
|
||||||
|
# compact density
|
||||||
|
"browser.uidensity" = 1;
|
||||||
|
# dont draw tabs in titlebar
|
||||||
|
"browser.tabs.drawInTitlebar" = false;
|
||||||
|
# autoscroll middleclick
|
||||||
|
"general.autoScroll" = true;
|
||||||
|
# dont paste on middlemouse
|
||||||
|
"middlemouse.paste" = false;
|
||||||
|
# userChrome
|
||||||
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||||
|
# menu bar
|
||||||
|
"ui.key.menuAccessKeyFocuses" = false;
|
||||||
|
# use kde file picker
|
||||||
|
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||||
|
# sidebar at right
|
||||||
|
"sidebar.position_start" = false;
|
||||||
|
# disable pocket
|
||||||
|
"extensions.pocket.enabled" = false;
|
||||||
|
# browser links should be new tab
|
||||||
|
"browser.link.open_newwindow.restriction" = 0;
|
||||||
|
# allow custom search enginers
|
||||||
|
"browser.urlbar.update2.engineAliasRefresh" = true;
|
||||||
|
# force enable hardware accel
|
||||||
|
"media.hardware-video-decoding.force-enabled" = true;
|
||||||
|
# vaapi
|
||||||
|
"media.ffmpeg.vaapi.enabled" = true;
|
||||||
|
# downloads ask to save or open
|
||||||
|
"browser.download.always_ask_before_handling_new_types" = true;
|
||||||
|
# downloads always ask download location
|
||||||
|
"browser.download.useDownloadDir" = false;
|
||||||
|
# download to tmp dir, NOT Downloads (seriously Mozilla?)
|
||||||
|
"browser.download.start_downloads_in_tmp_dir" = true;
|
||||||
|
# widevine
|
||||||
|
"browser.eme.ui.enabled" = false;
|
||||||
|
"media.eme.enabled" = false;
|
||||||
|
# media control keys
|
||||||
|
"media.hardwaremediakeys.enabled" = false;
|
||||||
|
};
|
||||||
|
userChrome = ''
|
||||||
|
/* Hide tab bar in FF Quantum */
|
||||||
|
@-moz-document url(chrome://browser/content/browser.xul), url(chrome://browser/content/browser.xhtml) {
|
||||||
|
#TabsToolbar {
|
||||||
|
visibility: collapse !important;
|
||||||
|
margin-bottom: 21px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
|
||||||
|
visibility: collapse !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
||||||
288
tuxedo/home-manager/home.nix
Normal file
288
tuxedo/home-manager/home.nix
Normal file
@@ -0,0 +1,288 @@
|
|||||||
|
{ inputs, config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
vs-extensions = inputs.nix-vscode-extensions.extensions.x86_64-linux.open-vsx;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
|
# manage.
|
||||||
|
home.username = "worble";
|
||||||
|
home.homeDirectory = "/home/worble";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your configuration is
|
||||||
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||||
|
# introduces backwards incompatible changes.
|
||||||
|
#
|
||||||
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
|
# release notes.
|
||||||
|
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
# The home.packages option allows you to install Nix packages into your
|
||||||
|
# environment.
|
||||||
|
home.packages = with pkgs;[
|
||||||
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
|
# # "Hello, world!" when run.
|
||||||
|
# pkgs.hello
|
||||||
|
|
||||||
|
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||||
|
# # overrides. You can do that directly here, just don't forget the
|
||||||
|
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||||
|
# # fonts?
|
||||||
|
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||||
|
|
||||||
|
# # You can also create simple shell scripts directly inside your
|
||||||
|
# # configuration. For example, this adds a command 'my-hello' to your
|
||||||
|
# # environment:
|
||||||
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||||
|
# echo "Hello, ${config.home.username}!"
|
||||||
|
# '')
|
||||||
|
blesh
|
||||||
|
nextcloud-client
|
||||||
|
ubuntu-sans
|
||||||
|
ubuntu-sans-mono
|
||||||
|
nerd-fonts.space-mono
|
||||||
|
keepassxc
|
||||||
|
bottles
|
||||||
|
rustup
|
||||||
|
strawberry-qt6
|
||||||
|
rclone
|
||||||
|
qbittorrent
|
||||||
|
teamspeak_client
|
||||||
|
thunderbird
|
||||||
|
git-credential-manager
|
||||||
|
# dotnetCorePackages.sdk_8_0_4xx
|
||||||
|
dotnetCorePackages.dotnet_9.sdk
|
||||||
|
gimp-with-plugins
|
||||||
|
ffmpeg-full
|
||||||
|
protonup-qt
|
||||||
|
protontricks
|
||||||
|
gamescope
|
||||||
|
yt-dlp
|
||||||
|
joplin-desktop
|
||||||
|
obsidian
|
||||||
|
webcord
|
||||||
|
libreoffice-qt
|
||||||
|
azure-cli
|
||||||
|
jetbrains.rider
|
||||||
|
steamguard-cli
|
||||||
|
jellyfin-media-player
|
||||||
|
haruna
|
||||||
|
];
|
||||||
|
|
||||||
|
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
|
||||||
|
# plain files is through 'home.file'.
|
||||||
|
home.file = {
|
||||||
|
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||||
|
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||||
|
# # symlink to the Nix store copy.
|
||||||
|
# ".screenrc".source = dotfiles/screenrc;
|
||||||
|
|
||||||
|
# # You can also set the file content immediately.
|
||||||
|
# ".gradle/gradle.properties".text = ''
|
||||||
|
# org.gradle.console=verbose
|
||||||
|
# org.gradle.daemon.idletimeout=3600000
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Home Manager can also manage your environment variables through
|
||||||
|
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||||
|
# shell provided by Home Manager. If you don't want to manage your shell
|
||||||
|
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||||
|
# located at either
|
||||||
|
#
|
||||||
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# /etc/profiles/per-user/worble/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
home.sessionVariables = {
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs = {
|
||||||
|
home-manager.enable = true;
|
||||||
|
|
||||||
|
bat = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
eza = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
git = true;
|
||||||
|
extraOptions = [
|
||||||
|
"--color=auto"
|
||||||
|
"--icons=always"
|
||||||
|
"--group-directories-first"
|
||||||
|
"--header"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
delta.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gitui = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
firefox = {
|
||||||
|
enable = true;
|
||||||
|
languagePacks = [
|
||||||
|
"en-GB"
|
||||||
|
];
|
||||||
|
policies = {
|
||||||
|
"DisplayMenuBar" = true;
|
||||||
|
};
|
||||||
|
profiles.default = import ./firefox-profile.nix // {
|
||||||
|
id = 0;
|
||||||
|
name = "default";
|
||||||
|
isDefault = true;
|
||||||
|
};
|
||||||
|
profiles.work = import ./firefox-profile.nix // {
|
||||||
|
id = 1;
|
||||||
|
name = "work";
|
||||||
|
isDefault = false;
|
||||||
|
settings = {
|
||||||
|
# allow fonts
|
||||||
|
"browser.display.use_document_fonts" = 1;
|
||||||
|
# home page
|
||||||
|
"browser.startup.homepage" = "https://outlook.office.com|https://teams.microsoft.com/v2|https://dev.azure.com/binhsps/Connect/_boards/board/t/Development%20Team/Stories";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
chromium = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.brave;
|
||||||
|
};
|
||||||
|
|
||||||
|
bash = {
|
||||||
|
enable = true;
|
||||||
|
bashrcExtra = ''
|
||||||
|
source $(blesh-share)/ble.sh
|
||||||
|
bleopt canvas_winch_action=redraw-prev
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
starship.enable = true;
|
||||||
|
|
||||||
|
atuin.enable = true;
|
||||||
|
|
||||||
|
zellij = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
settings = {
|
||||||
|
theme = "dracula";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
helix.enable = true;
|
||||||
|
|
||||||
|
alacritty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = {
|
||||||
|
normal = {
|
||||||
|
family = "SpaceMono Nerd Font";
|
||||||
|
style = "Regular";
|
||||||
|
};
|
||||||
|
size = 14;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
vscode = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.vscodium;
|
||||||
|
mutableExtensionsDir = false;
|
||||||
|
extensions = [
|
||||||
|
vs-extensions.biomejs.biome
|
||||||
|
vs-extensions.mkhl.direnv
|
||||||
|
vs-extensions.dracula-theme.theme-dracula
|
||||||
|
vs-extensions.dbaeumer.vscode-eslint
|
||||||
|
vs-extensions.eamodio.gitlens
|
||||||
|
vs-extensions.pkief.material-icon-theme
|
||||||
|
vs-extensions.jnoortheen.nix-ide
|
||||||
|
vs-extensions.esbenp.prettier-vscode
|
||||||
|
vs-extensions.bradlc.vscode-tailwindcss
|
||||||
|
];
|
||||||
|
userSettings = {
|
||||||
|
"workbench.iconTheme" = "material-icon-theme";
|
||||||
|
"window.titleBarStyle" = "custom";
|
||||||
|
"workbench.colorTheme" = "Dracula Theme";
|
||||||
|
|
||||||
|
"editor.fontFamily" = "'SpaceMono Nerd Font', 'monospace', monospace";
|
||||||
|
"editor.fontSize" = 16;
|
||||||
|
|
||||||
|
"files.autoSave" = "onWindowChange";
|
||||||
|
"editor.formatOnSave" = true;
|
||||||
|
"editor.codeActionsOnSave" = {
|
||||||
|
"source.organizeImports" = "always";
|
||||||
|
};
|
||||||
|
|
||||||
|
"typescript.preferences.preferTypeOnlyAutoImports" = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
topgrade = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
misc = {
|
||||||
|
assume_yes = true;
|
||||||
|
};
|
||||||
|
linux = {
|
||||||
|
nix_arguments = "--flake /home/worble/Projects/nixos#tuxedo";
|
||||||
|
};
|
||||||
|
pre_commands = {
|
||||||
|
nix-flake-update = "sudo nix flake update --flake /home/worble/Projects/nixos";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# install the shaders from anime4k directory for this to work
|
||||||
|
mpv = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
profile = "gpu-hq";
|
||||||
|
vo = "gpu-next";
|
||||||
|
gpu-api = "vulkan";
|
||||||
|
hwdec = "vulkan";
|
||||||
|
screenshot-directory = "/mnt/HDD1/Pictures/";
|
||||||
|
screenshot-template = "%F/%F_snapshot_%P";
|
||||||
|
glsl-shaders = "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mangohud = {
|
||||||
|
enable = true;
|
||||||
|
enableSessionWide = true;
|
||||||
|
settings = {
|
||||||
|
preset = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user