Compare commits
14 Commits
k3s
...
plasma-man
| Author | SHA1 | Date | |
|---|---|---|---|
| 62a507e703 | |||
| c0d7d934f3 | |||
| cb91f69c49 | |||
| bc6378cb22 | |||
| a13676311a | |||
| ec57592715 | |||
| 051c223eb7 | |||
| 6030f6ea42 | |||
| df77fd5c74 | |||
| 458bcb4cdf | |||
| 40e10bab34 | |||
| 3477a3480f | |||
| d2ae7f8e11 | |||
| ff3a0a4738 |
24
flake.lock
generated
24
flake.lock
generated
@@ -52,10 +52,34 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plasma-manager": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
"home-manager"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728750492,
|
||||
"narHash": "sha256-9IHlIsH4gLqQjS2lFbEnsl/ItdqzBBLWLsyXS0k0jf8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "c6d4b6f3e0138c08f37d66fcfbcbe37dab08f108",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "plasma-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"plasma-manager": "plasma-manager",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
|
||||
29
flake.nix
29
flake.nix
@@ -13,6 +13,12 @@
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
plasma-manager = {
|
||||
url = "github:nix-community/plasma-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... } @ inputs: let
|
||||
@@ -23,6 +29,7 @@
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ];
|
||||
}
|
||||
];
|
||||
in {
|
||||
@@ -55,22 +62,12 @@
|
||||
system = "x86_64-linux";
|
||||
modules = baseModules ++ [
|
||||
./machines/boxy/configuration.nix
|
||||
# inputs.home-manager.nixosModules.home-manager
|
||||
# {
|
||||
# home-manager.users.johno = import ./home/home-default.nix;
|
||||
# home-manager.extraSpecialArgs.customPkgs =
|
||||
# nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
||||
# customPkgs = nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
||||
# }
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations.k3s-nix = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./roles
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./machines/k3s-nix/configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.johno = import ./home/home-default.nix;
|
||||
home-manager.extraSpecialArgs.customPkgs =
|
||||
nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -104,8 +104,9 @@
|
||||
|
||||
imports = [
|
||||
./modules/emacs
|
||||
./modules/lutris
|
||||
./modules/i3+sway
|
||||
./modules/lutris
|
||||
./modules/plasma-manager
|
||||
];
|
||||
|
||||
programs.bash.enable = true;
|
||||
|
||||
@@ -6,13 +6,13 @@ let
|
||||
cfg = config.home.i3_sway;
|
||||
i3_cfg = config.xsession.windowManager.i3.config;
|
||||
|
||||
shared_config = recursiveUpdate {
|
||||
shared_config = recursiveUpdate rec {
|
||||
modifier = "Mod4";
|
||||
terminal = "kitty";
|
||||
defaultWorkspace = "workspace number 1";
|
||||
|
||||
keybindings = {
|
||||
"${shared_config.modifier}+Return" = "exec ${i3_cfg.terminal}";
|
||||
"${shared_config.modifier}+Return" = "exec ${terminal}";
|
||||
"${shared_config.modifier}+Shift+q" = "kill";
|
||||
"${shared_config.modifier}+d" = "exec ${i3_cfg.menu}";
|
||||
|
||||
@@ -129,6 +129,13 @@ in {
|
||||
"type:keyboard" = {
|
||||
xkb_options = "caps:escape";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
tap = "enabled";
|
||||
tap_button_map = "lrm";
|
||||
drag = "enabled";
|
||||
natural_scroll = "disabled";
|
||||
dwt = "enabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
|
||||
150
home/modules/plasma-manager/default.nix
Normal file
150
home/modules/plasma-manager/default.nix
Normal file
@@ -0,0 +1,150 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
|
||||
# The following can be generated with the command:
|
||||
# nix run github:nix-community/plasma-manager
|
||||
#
|
||||
# Plasma-manager options documentation
|
||||
# https://nix-community.github.io/plasma-manager/options.xhtml
|
||||
#
|
||||
# Polonium usage
|
||||
# https://github.com/zeroxoneafour/polonium/blob/master/docs/usage.md
|
||||
#
|
||||
# TODO: Extract this configuration into something that's a bit easier to manage
|
||||
# TODO: Update shortcuts for better window/tiling/desktop management akin to i3wm
|
||||
# TODO(ambitious): Add Kmail support to plasma-manager
|
||||
{
|
||||
programs.plasma = {
|
||||
enable = true;
|
||||
overrideConfig = true;
|
||||
|
||||
kwin = {
|
||||
scripts.polonium.enable = true;
|
||||
};
|
||||
|
||||
hotkeys.commands."launch-konsole" = {
|
||||
name = "Launch Konsole";
|
||||
key = "Meta+Enter";
|
||||
command = "konsole";
|
||||
};
|
||||
|
||||
shortcuts = {
|
||||
kmix = {
|
||||
"decrease_microphone_volume" = "Microphone Volume Down";
|
||||
"decrease_volume" = "Volume Down";
|
||||
"decrease_volume_small" = "Shift+Volume Down";
|
||||
"increase_microphone_volume" = "Microphone Volume Up";
|
||||
"increase_volume" = "Volume Up";
|
||||
"increase_volume_small" = "Shift+Volume Up";
|
||||
"mic_mute" = ["Microphone Mute" "Meta+Volume Mute,Microphone Mute" "Meta+Volume Mute,Mute Microphone"];
|
||||
"mute" = "Volume Mute";
|
||||
};
|
||||
|
||||
mediacontrol = {
|
||||
"mediavolumedown" = "none,,Media volume down";
|
||||
"mediavolumeup" = "none,,Media volume up";
|
||||
"nextmedia" = "Media Next";
|
||||
"pausemedia" = "Media Pause";
|
||||
"playmedia" = "none,,Play media playback";
|
||||
"playpausemedia" = "Media Play";
|
||||
"previousmedia" = "Media Previous";
|
||||
"stopmedia" = "Media Stop";
|
||||
};
|
||||
|
||||
ksmserver = {
|
||||
"Lock Session" = ["Meta+Ctrl+Q" "Screensaver,Meta+L" "Screensaver,Lock Session"];
|
||||
};
|
||||
|
||||
kwin = {
|
||||
"Window Close" = "Meta+Shift+Q";
|
||||
"Kill Window" = "Meta+Ctrl+Esc";
|
||||
"Window Operations Menu" = "Alt+F3";
|
||||
"Window Resize" = "Meta+R,,Resize Window";
|
||||
|
||||
"Overview" = "Meta+W";
|
||||
"Grid View" = "Meta+G";
|
||||
"Edit Tiles" = "Meta+T";
|
||||
|
||||
"Activate Window Demanding Attention" = "Meta+Ctrl+A";
|
||||
|
||||
"PoloniumCycleEngine" = "Meta+|,none,Polonium: Cycle Engine";
|
||||
"PoloniumFocusAbove" = "Meta+K,none,Polonium: Focus Above";
|
||||
"PoloniumFocusBelow" = "Meta+J,none,Polonium: Focus Below";
|
||||
"PoloniumFocusLeft" = "Meta+H,none,Polonium: Focus Left";
|
||||
"PoloniumFocusRight" = "Meta+L,none,Polonium: Focus Right";
|
||||
"PoloniumInsertAbove" = "Meta+Shift+K,none,Polonium: Insert Above";
|
||||
"PoloniumInsertBelow" = "Meta+Shift+J,none,Polonium: Insert Below";
|
||||
"PoloniumInsertLeft" = "Meta+Shift+H,none,Polonium: Insert Left";
|
||||
"PoloniumInsertRight" = "Meta+Shift+L,none,Polonium: Insert Right";
|
||||
"PoloniumOpenSettings" = "Meta+\\\\,none,Polonium: Open Settings Dialog";
|
||||
"PoloniumResizeAbove" = "Meta+Ctrl+K,none,Polonium: Resize Above";
|
||||
"PoloniumResizeBelow" = "Meta+Ctrl+J,none,Polonium: Resize Below";
|
||||
"PoloniumResizeLeft" = "Meta+Ctrl+H,none,Polonium: Resize Left";
|
||||
"PoloniumResizeRight" = "Meta+Ctrl+L,none,Polonium: Resize Right";
|
||||
"PoloniumRetileWindow" = "Meta+Shift+Space,none,Polonium: Retile Window";
|
||||
"PoloniumSwitchBTree" = [ ];
|
||||
"PoloniumSwitchHalf" = [ ];
|
||||
"PoloniumSwitchKwin" = [ ];
|
||||
"PoloniumSwitchMonocle" = [ ];
|
||||
"PoloniumSwitchThreeColumn" = [ ];
|
||||
|
||||
"Show Desktop" = "Meta+D";
|
||||
"Switch to Desktop 1" = "Meta+1,,Switch to Desktop 1";
|
||||
"Switch to Desktop 2" = "Meta+2,,Switch to Desktop 2";
|
||||
"Switch to Desktop 3" = "Meta+3,,Switch to Desktop 3";
|
||||
"Switch to Desktop 4" = "Meta+4,,Switch to Desktop 4";
|
||||
"Switch to Desktop 5" = "Meta+5,,Switch to Desktop 5";
|
||||
"Switch to Desktop 6" = "none,,Switch to Desktop 6";
|
||||
"Switch to Desktop 7" = "none,,Switch to Desktop 7";
|
||||
"Switch to Desktop 8" = "none,,Switch to Desktop 8";
|
||||
"Switch to Desktop 9" = "none,,Switch to Desktop 9";
|
||||
"Window to Desktop 1" = "Meta+!,,Window to Desktop 1";
|
||||
"Window to Desktop 2" = "Meta+@,,Window to Desktop 2";
|
||||
"Window to Desktop 3" = "Meta+#,,Window to Desktop 3";
|
||||
"Window to Desktop 4" = "Meta+$,,Window to Desktop 4";
|
||||
"Window to Desktop 5" = "Meta+%,,Window to Desktop 5";
|
||||
"Window to Desktop 6" = "none,,Window to Desktop 6";
|
||||
"Window to Desktop 7" = "none,,Window to Desktop 7";
|
||||
"Window to Desktop 8" = "none,,Window to Desktop 8";
|
||||
"Window to Desktop 9" = "none,,Window to Desktop 9";
|
||||
|
||||
"Walk Through Windows" = "Alt+Tab";
|
||||
"Walk Through Windows (Reverse)" = "Alt+Shift+Tab";
|
||||
"Walk Through Windows of Current Application" = "Alt+`";
|
||||
"Walk Through Windows of Current Application (Reverse)" = "Alt+~";
|
||||
"Window Fullscreen" = "Meta+Shift+F,,Make Window Fullscreen";
|
||||
|
||||
"Window Quick Tile Bottom" = "Meta+Down";
|
||||
"Window Quick Tile Left" = "Meta+Left";
|
||||
"Window Quick Tile Right" = "Meta+Right";
|
||||
"Window Quick Tile Top" = "Meta+Up";
|
||||
|
||||
"view_actual_size" = "Meta+0";
|
||||
"view_zoom_in" = ["Meta++" "Meta+=,Meta++" "Meta+=,Zoom In"];
|
||||
"view_zoom_out" = "Meta+-";
|
||||
};
|
||||
"org_kde_powerdevil"."Decrease Keyboard Brightness" = "Keyboard Brightness Down";
|
||||
"org_kde_powerdevil"."Decrease Screen Brightness" = "Monitor Brightness Down";
|
||||
"org_kde_powerdevil"."Decrease Screen Brightness Small" = "Shift+Monitor Brightness Down";
|
||||
"org_kde_powerdevil"."Hibernate" = "Hibernate";
|
||||
"org_kde_powerdevil"."Increase Keyboard Brightness" = "Keyboard Brightness Up";
|
||||
"org_kde_powerdevil"."Increase Screen Brightness" = "Monitor Brightness Up";
|
||||
"org_kde_powerdevil"."Increase Screen Brightness Small" = "Shift+Monitor Brightness Up";
|
||||
"org_kde_powerdevil"."PowerDown" = "Power Down";
|
||||
"org_kde_powerdevil"."PowerOff" = "Power Off";
|
||||
"org_kde_powerdevil"."Sleep" = "Sleep";
|
||||
"org_kde_powerdevil"."Toggle Keyboard Backlight" = "Keyboard Light On/Off";
|
||||
"org_kde_powerdevil"."Turn Off Screen" = [ ];
|
||||
"org_kde_powerdevil"."powerProfile" = ["Battery" "Meta+B,Battery" "Meta+B,Switch Power Profile"];
|
||||
|
||||
"plasmashell"."activate application launcher" = ["Meta" "Alt+F1,Meta" "Alt+F1,Activate Application Launcher"];
|
||||
};
|
||||
|
||||
configFile = {
|
||||
kwinrc.Desktops.Number = {
|
||||
value = 9;
|
||||
immutable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -17,8 +17,9 @@ with lib;
|
||||
kodi = {
|
||||
enable = true;
|
||||
autologin = true;
|
||||
wayland = false;
|
||||
wayland = true;
|
||||
};
|
||||
users.enable = true;
|
||||
};
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
@@ -29,7 +30,7 @@ with lib;
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
#services.displayManager.enable = mkForce false;
|
||||
services.displayManager.enable = mkForce false;
|
||||
|
||||
# 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.
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
# 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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
#boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot.loader.grub.enable = true;
|
||||
#boot.loader.grub.device = "/dev/sda3";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
boot.loader.grub.efiSupport = true;
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
||||
# Define on which hard drive you want to install Grub.
|
||||
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
||||
|
||||
networking.hostName = "k3s-nix"; # 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/Amsterdam";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
# i18n.defaultLocale = "en_US.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# 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;
|
||||
# };
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# users.users.alice = {
|
||||
# isNormalUser = true;
|
||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
# packages = with pkgs; [
|
||||
# firefox
|
||||
# tree
|
||||
# ];
|
||||
# };
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
# ];
|
||||
|
||||
# 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?
|
||||
|
||||
}
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
# 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 + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/25d7ede1-7a1e-4fe8-beaa-cddb89253814";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/var" =
|
||||
{ device = "/dev/disk/by-uuid/e1514fa7-b757-4c7c-8d7f-cbd49060eb15";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/1777-E690";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
desktop.enable = true;
|
||||
nfs-mounts.enable = true;
|
||||
printing.enable = true;
|
||||
spotifyd.enable = true;
|
||||
users = {
|
||||
enable = true;
|
||||
extraGroups = [ "video" ];
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
"nvidia_uvm"
|
||||
"nvidia_drm"
|
||||
];
|
||||
boot.kernelParams = [
|
||||
"nvidia_drm.fbdev=1"
|
||||
"nvidia_drm.modeset=1"
|
||||
];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
@@ -48,6 +52,14 @@
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
services.beesd.filesystems = {
|
||||
root = {
|
||||
spec = "LABEL=nixos";
|
||||
hashTableSizeMB = 4096;
|
||||
verbosity = "crit";
|
||||
};
|
||||
};
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ in
|
||||
enable = mkEnableOption "Enable the audio role";
|
||||
};
|
||||
|
||||
config =
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
paprefs
|
||||
|
||||
@@ -10,7 +10,7 @@ in
|
||||
enable = mkEnableOption "Enable the bluetooth role";
|
||||
};
|
||||
|
||||
config =
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.roles;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./audio
|
||||
@@ -19,10 +16,6 @@ in
|
||||
./virtualisation
|
||||
];
|
||||
|
||||
options.roles = {
|
||||
enable = mkEnableOption "Enable roles";
|
||||
};
|
||||
|
||||
config = {
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
@@ -65,9 +58,6 @@ in
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ let
|
||||
|
||||
basePackages = with pkgs; [
|
||||
brightnessctl
|
||||
mangohud # Should probably get refactored with steam/gamescope out to a gaming role
|
||||
polonium # auto tiling kwin addon
|
||||
];
|
||||
|
||||
x11BasePackages = with pkgs; [
|
||||
@@ -71,10 +73,38 @@ in
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.java.enable = true;
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
|
||||
};
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
#capSysNice = true;
|
||||
args = [
|
||||
#"--adaptive-sync"
|
||||
#"--nested-refresh 165"
|
||||
#"--backend wayland"
|
||||
"--hdr-enabled"
|
||||
"--hdr-itm-enable"
|
||||
"--hdr-debug-force-output"
|
||||
"--mangoapp"
|
||||
"--rt"
|
||||
"--steam"
|
||||
#"--xwayland-count 2"
|
||||
];
|
||||
env = {
|
||||
#PROTON_DISABLE_NVAPI = "1";
|
||||
MANGOHUD = "1";
|
||||
#MANGOHUD_CONFIG = "cpu_temp gpu_temp ram vram";
|
||||
};
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession = {
|
||||
enable = true;
|
||||
};
|
||||
#package = pkgs.steam.override {
|
||||
#withJava = true;
|
||||
#withPrimus = true;
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.roles.k3s;
|
||||
in
|
||||
{
|
||||
options.roles.k3s = {
|
||||
enable = mkEnableOption "Enable the k3s role";
|
||||
};
|
||||
|
||||
config =
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
6443 # k3s: required so that pods can reach the API server (running on port 6443 by default)
|
||||
2379 # k3s, etcd clients: required if using a "High Availability Embedded etcd" configuration
|
||||
2380 # k3s, etcd peers: required if using a "High Availability Embedded etcd" configuration
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
8472 # k3s, flannel: required if using multi-node for inter-node networking
|
||||
];
|
||||
services.k3s.enable = true;
|
||||
services.k3s.role = "server";
|
||||
sops.secrets.k3s_cluster_token = {};
|
||||
services.k3s.tokenFile = "/run/secrets/k3s_cluster_token";
|
||||
services.k3s.serverAddr = "https://10.0.0.222:6443";
|
||||
services.k3s.extraFlags = toString [
|
||||
# "--debug" # Optionally add additional args to k3s
|
||||
];
|
||||
services.k3s.gracefulNodeShutdown.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -25,39 +25,47 @@ in
|
||||
steam-library
|
||||
youtube
|
||||
]);
|
||||
in {
|
||||
users.extraUsers.kodi.isNormalUser = true;
|
||||
in mkIf cfg.enable
|
||||
{
|
||||
users.extraUsers.kodi.isNormalUser = true;
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 8080 ];
|
||||
allowedUDPPorts = [ 8080 ];
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 8080 ];
|
||||
allowedUDPPorts = [ 8080 ];
|
||||
};
|
||||
|
||||
services = if cfg.autologin then mkMerge [
|
||||
(mkIf cfg.wayland {
|
||||
cage = mkIf cfg.wayland {
|
||||
user = "kodi";
|
||||
program = "${kodiPkg}/bin/kodi-standalone";
|
||||
enable = true;
|
||||
};
|
||||
xserver = {
|
||||
enable = false;
|
||||
autorun = false;
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf (!cfg.wayland) {
|
||||
xserver = {
|
||||
enable = true;
|
||||
desktopManager.kodi = {
|
||||
enable = true;
|
||||
package = kodiPkg;
|
||||
};
|
||||
displayManager.lightdm = {
|
||||
enable = true;
|
||||
greeter.enable = false;
|
||||
};
|
||||
};
|
||||
displayManager = {
|
||||
autoLogin.enable = true;
|
||||
autoLogin.user = "kodi";
|
||||
defaultSession = "kodi";
|
||||
sessionData.autologinSession = "kodi";
|
||||
};
|
||||
})
|
||||
] else {};
|
||||
};
|
||||
|
||||
services = mkIf cfg.autologin {
|
||||
cage = mkIf cfg.wayland {
|
||||
user = "kodi";
|
||||
program = "${kodiPkg}/bin/kodi-standalone";
|
||||
enable = true;
|
||||
};
|
||||
|
||||
xserver = mkIf (!cfg.wayland) {
|
||||
enable = true;
|
||||
desktopManager.kodi = {
|
||||
enable = true;
|
||||
package = kodiPkg;
|
||||
};
|
||||
displayManager.lightdm = {
|
||||
enable = true;
|
||||
greeter.enable = false;
|
||||
};
|
||||
displayManager.sddm.enable = mkForce false;
|
||||
};
|
||||
displayManager = mkIf (!cfg.wayland) {
|
||||
autoLogin.enable = true;
|
||||
autoLogin.user = "kodi";
|
||||
defaultSession = "kodi";
|
||||
sessionData.autologinSession = "kodi";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,15 +16,16 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
fileSystems."/media" = {
|
||||
device = "10.0.0.43:/media";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"defaults"
|
||||
"nofail"
|
||||
"softreval"
|
||||
];
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
fileSystems."/media" = {
|
||||
device = "10.0.0.43:/media";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"defaults"
|
||||
"nofail"
|
||||
"softreval"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,18 +2,22 @@
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.roles.printing;
|
||||
in
|
||||
{
|
||||
options.roles.printing = {
|
||||
enable = mkEnableOption "Enable default printing setup";
|
||||
};
|
||||
|
||||
config = {
|
||||
services.printing.enable = true;
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
services.printing.enable = true;
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,30 +10,31 @@ in
|
||||
enable = mkEnableOption "Enable the spotifyd role";
|
||||
};
|
||||
|
||||
config = {
|
||||
roles.audio.enable = true;
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
roles.audio.enable = true;
|
||||
|
||||
services.spotifyd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
use_mpris = false;
|
||||
backend = "alsa";
|
||||
device = "sysdefault";
|
||||
bitrate = 320;
|
||||
cache_path = "";
|
||||
zeroconf_port = 1234;
|
||||
autoplay = false;
|
||||
services.spotifyd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
use_mpris = false;
|
||||
backend = "alsa";
|
||||
device = "sysdefault";
|
||||
bitrate = 320;
|
||||
cache_path = "";
|
||||
zeroconf_port = 1234;
|
||||
autoplay = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
1234
|
||||
57621
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
5353
|
||||
];
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
1234
|
||||
57621
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
5353
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ in
|
||||
kidsPackages = with pkgs; [
|
||||
firefox
|
||||
];
|
||||
in {
|
||||
in mkIf cfg.enable {
|
||||
users.users.johno = {
|
||||
isNormalUser = true;
|
||||
description = "John Ogle";
|
||||
|
||||
@@ -2,13 +2,17 @@
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.roles.virtualisation;
|
||||
in
|
||||
{
|
||||
options.roles.virtualisation = {
|
||||
enable = mkEnableOption "Enable virtualisation";
|
||||
};
|
||||
|
||||
config = {
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
};
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ example_number: ENC[AES256_GCM,data:jmLoVC+8YIlB2A==,iv:u9GztD/aE9UN5zWq3Am2nhYw
|
||||
example_booleans:
|
||||
- ENC[AES256_GCM,data:ZacILA==,iv:xo+7aFFQXzbJzKDY0mYTeFLf10AlnHkywDRAMHeprEM=,tag:F/OnJdqjrZP02sTLWLmnbg==,type:bool]
|
||||
- ENC[AES256_GCM,data:NaFrvrs=,iv:kKDmGs9u/w5qrZ/379Jlx8AotUVADvH+eHwHCqykmkE=,tag:nD9TsmkXUm4ABaT1ABWmcg==,type:bool]
|
||||
k3s_cluster_token: ENC[AES256_GCM,data:JsfPOT6I1zViyfFkXchFSzCgsB0jRVj3ZxcHQ7GV7xMRfYWkquQcDYy5TWotWXl2YvUM8Fc2sbzHwsoq1kECS47AIbKO+Mz9Y7FbQnZHxTHDfbQTYmmkDGkHGDkBxWB+N1e1bdP5Dkuc3LlN,iv:PdOi6hOFXoaYVuBSuje0lYmUVCsW0f1lS5rL3quiDH8=,tag:3Tb+rLx7j7HE8BCDevfMxw==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
@@ -42,8 +41,8 @@ sops:
|
||||
aU1IQzdTMVhnbHhsNENwMG05dXhOU2MK8fEJea9sL5JLgltVlTI6mRDb+Tl83Iz7
|
||||
4wPYvo68cn8vimXqSk45ldHRrNa3zhYai3CalQaGtDT3fkWGvSq0zQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-10-06T00:23:29Z"
|
||||
mac: ENC[AES256_GCM,data:adzK7q2CJOcurpaZHmNDe8O9EqdCuwopmSS2ysFHDkJ8GtXdFQQBabwwlYz/zi0jIHBBUP4JIqnffg+rsM2R0fAvGMnIZvwbD9Yo6efiEK5kVgbwze6O9SaqOpgXr8R8zxsgm9gJWtjrAqwOdKTqb9tIN24cMKnhFr6UVXZen0U=,iv:MTTavZ9eq9ibWwBFiJ1OHRQswHXwLacc2PBMSztMZ+w=,tag:X8mz2hX1cTKdWPlEQTyzHA==,type:str]
|
||||
lastmodified: "2024-09-28T15:44:39Z"
|
||||
mac: ENC[AES256_GCM,data:YUi+AbS6DQTmrSyOXsbkZWfWaMyKGR8fYm/MHcxmqChi8hng+UWHBZjsLBe6ef/FLH3rnP6bhfwK8KYnVS6fHvHahoqIq/BHydTsqrclnSgRAGl8Lh0yuhwISNRvP1AuW5pd50sdQaS0uGOtzOCharI/pZ9H+cmt2SB5WOCdeLs=,iv:2nBG6it3tNSLSia8hGzCcesuK9QwzB9EzfjWegjQ2kw=,tag:RGGPAPw/rQKhWA2OqLjTJw==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.0
|
||||
|
||||
Reference in New Issue
Block a user