Compare commits
10 Commits
2c947ed70c
...
d760271aeb
| Author | SHA1 | Date | |
|---|---|---|---|
| d760271aeb | |||
| 618bb4a596 | |||
| 95257c8816 | |||
| 6a459813e9 | |||
| 9236159267 | |||
| 6786bc15ca | |||
| 527bd076d0 | |||
| f9b1d348b4 | |||
| a6c2119c78 | |||
| d69647975d |
@@ -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,65 +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 = {
|
programs.nix-ld.enable = true;
|
||||||
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:
|
# 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
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
@@ -181,8 +95,9 @@
|
|||||||
# services.openssh.enable = true;
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall.allowedTCPPorts = [ ];
|
# 443 Helldivers crashes internet otherwise
|
||||||
networking.firewall.allowedUDPPorts = [ ];
|
networking.firewall.allowedTCPPorts = [ 443 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 443 ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
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;
|
||||||
|
}
|
||||||
|
|
||||||
46
flake.lock
generated
46
flake.lock
generated
@@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735048446,
|
"lastModified": 1736437680,
|
||||||
"narHash": "sha256-Tc35Y8H+krA6rZeOIczsaGAtobSSBPqR32AfNTeHDRc=",
|
"narHash": "sha256-9Sy17XguKdEU9M5peTrkWSlI/O5IAqjHzdzxbXnc30g=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "3a4de9fa3a78ba7b7170dda6bd8b4cdab87c0b21",
|
"rev": "4d5d07d37ff773338e40a92088f45f4f88e509c8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -61,15 +61,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735053786,
|
"lastModified": 1736373539,
|
||||||
"narHash": "sha256-Gm+0DcbUS338vvkwyYWms5jsWlx8z8MeQBzcnIDuIkw=",
|
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "35b98d20ca8f4ca1f6a2c30b8a2c8bb305a36d84",
|
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -81,11 +82,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735177600,
|
"lastModified": 1736388880,
|
||||||
"narHash": "sha256-I51oo2juXWvbBHBwuisXlDelwPzSBghDc3hI/feRDk0=",
|
"narHash": "sha256-lA+4MhhcdoanbMnFLjZW+jPdEKcsLs9st2GAst1iuVU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-vscode-extensions",
|
"repo": "nix-vscode-extensions",
|
||||||
"rev": "abc6bc047bffc62632c043708ee23091bc500611",
|
"rev": "2a84ca07753e3ec608c96ed2907606361979467a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -110,13 +111,13 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734649271,
|
"lastModified": 1736344531,
|
||||||
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
|
"narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
|
"rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -126,12 +127,29 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1736200483,
|
||||||
|
"narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-vscode-extensions": "nix-vscode-extensions",
|
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||||
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager/release-24.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
disko = {
|
disko = {
|
||||||
@@ -16,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
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs;[
|
home.packages = with pkgs;[
|
||||||
nerd-fonts.space-mono
|
(nerdfonts.override { fonts = [ "SpaceMono" ]; })
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
@@ -23,6 +23,7 @@ in
|
|||||||
vs-extensions.jnoortheen.nix-ide
|
vs-extensions.jnoortheen.nix-ide
|
||||||
vs-extensions.esbenp.prettier-vscode
|
vs-extensions.esbenp.prettier-vscode
|
||||||
vs-extensions.bradlc.vscode-tailwindcss
|
vs-extensions.bradlc.vscode-tailwindcss
|
||||||
|
vs-extensions.humao.rest-client
|
||||||
];
|
];
|
||||||
userSettings = {
|
userSettings = {
|
||||||
"workbench.iconTheme" = "material-icon-theme";
|
"workbench.iconTheme" = "material-icon-theme";
|
||||||
@@ -39,6 +40,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
"typescript.preferences.preferTypeOnlyAutoImports" = true;
|
"typescript.preferences.preferTypeOnlyAutoImports" = true;
|
||||||
|
"chat.commandCenter.enabled" = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
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
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -18,7 +18,7 @@ in
|
|||||||
config = {
|
config = {
|
||||||
home.packages = with pkgs;[
|
home.packages = with pkgs;[
|
||||||
blesh
|
blesh
|
||||||
nerd-fonts.space-mono
|
(nerdfonts.override { fonts = [ "SpaceMono" ]; })
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|||||||
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" = {
|
||||||
@@ -28,6 +30,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
hardware.tuxedo-drivers.enable = true;
|
hardware.tuxedo-drivers.enable = true;
|
||||||
|
programs.gpu-screen-recorder.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 = {
|
||||||
@@ -44,11 +49,4 @@
|
|||||||
"worble" = import ./home-manager/home.nix;
|
"worble" = import ./home-manager/home.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# 443 Helldivers crashes internet otherwise
|
|
||||||
# 1900 UPNP discovery
|
|
||||||
# 5001 Universal Media Server
|
|
||||||
networking.firewall.allowedTCPPorts = [ 443 1900 5001 ];
|
|
||||||
networking.firewall.allowedUDPPorts = [ 443 1900 ];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,53 +46,27 @@
|
|||||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||||
# echo "Hello, ${config.home.username}!"
|
# echo "Hello, ${config.home.username}!"
|
||||||
# '')
|
# '')
|
||||||
nextcloud-client
|
thunderbird
|
||||||
ubuntu-sans
|
|
||||||
ubuntu-sans-mono
|
|
||||||
nerd-fonts.space-mono
|
|
||||||
keepassxc
|
keepassxc
|
||||||
bottles
|
|
||||||
rustup
|
|
||||||
strawberry-qt6
|
strawberry-qt6
|
||||||
rclone
|
rclone
|
||||||
qbittorrent
|
qbittorrent
|
||||||
teamspeak_client
|
|
||||||
thunderbird
|
|
||||||
git-credential-manager
|
|
||||||
# dotnetCorePackages.sdk_8_0_4xx
|
|
||||||
(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
|
||||||
|
gpu-screen-recorder-gtk
|
||||||
];
|
];
|
||||||
|
|
||||||
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 = {
|
||||||
@@ -125,6 +102,15 @@
|
|||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# home.sessionPath = [
|
||||||
|
# "$HOME/.local/bin"
|
||||||
|
# ];
|
||||||
|
|
||||||
|
services.nextcloud-client = {
|
||||||
|
enable = true;
|
||||||
|
startInBackground = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
@@ -156,7 +142,7 @@
|
|||||||
vo = "gpu-next";
|
vo = "gpu-next";
|
||||||
gpu-api = "vulkan";
|
gpu-api = "vulkan";
|
||||||
hwdec = "vulkan";
|
hwdec = "vulkan";
|
||||||
screenshot-directory = "~/Pictures/";
|
screenshot-directory = "/mnt/HDD1/Pictures/";
|
||||||
screenshot-template = "%F/%F_snapshot_%P";
|
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";
|
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";
|
||||||
};
|
};
|
||||||
@@ -172,23 +158,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
systemd.user = {
|
systemd.user = {
|
||||||
# enable = true;
|
|
||||||
# paths = {
|
|
||||||
# rclone-media = {
|
|
||||||
# Unit = {
|
|
||||||
# Description = "rclone unit path for /mnt/HDD1/Videos/";
|
|
||||||
# After = [ "network.target" "mnt-HDD1.mount" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Path = {
|
|
||||||
# PathChanged = "/mnt/HDD1/Videos/";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Install = {
|
|
||||||
# WantedBy = [ "default.target" ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
services = {
|
services = {
|
||||||
rclone-media = {
|
rclone-media = {
|
||||||
Unit = {
|
Unit = {
|
||||||
@@ -203,24 +172,29 @@
|
|||||||
Service = {
|
Service = {
|
||||||
Type = "exec";
|
Type = "exec";
|
||||||
ExecStart = "${pkgs.writeShellApplication {
|
ExecStart = "${pkgs.writeShellApplication {
|
||||||
name = "rclone-media";
|
name = "rclone-media";
|
||||||
runtimeInputs = [ pkgs.inotify-tools pkgs.libnotify pkgs.rclone ];
|
runtimeInputs = [ pkgs.inotify-tools pkgs.libnotify pkgs.rclone ];
|
||||||
text = ''
|
text = ''
|
||||||
|
function rclonecopy {
|
||||||
|
file=$1
|
||||||
|
changed_rel=''${file#"/mnt/HDD1/Videos"}
|
||||||
|
notify-send -a "rclone-media" "rclone for $file triggered"
|
||||||
|
if rclone copyto "$file" media:"media-7gM2gcrxRjXqfj$changed_rel" ; then
|
||||||
|
notify-send -a "rclone-media" "rclone complete for $file"
|
||||||
|
else
|
||||||
|
notify-send -u critical -a "rclone-media" "rclone failed for $file"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
inotifywait -mr \
|
inotifywait -mr \
|
||||||
--format '%w%f' \
|
--format '%w%f' \
|
||||||
-e close_write \
|
-e close_write \
|
||||||
/mnt/HDD1/Videos/ |
|
/mnt/HDD1/Videos/ |
|
||||||
while read -r file; do
|
while read -r file; do
|
||||||
changed_rel=''${file#"/mnt/HDD1/Videos"}
|
rclonecopy "$file"
|
||||||
notify-send -a "rclone-media" "rclone for $file triggered"
|
|
||||||
if rclone copyto "$file" media:"media-7gM2gcrxRjXqfj$changed_rel" ; then
|
|
||||||
notify-send -a "rclone-media" "rclone for $file complete"
|
|
||||||
else
|
|
||||||
notify-send -a "rclone-media" "rclone for $file failed"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
}}/bin/rclone-media";
|
}}/bin/rclone-media";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user