Compare commits
7 Commits
plasma-man
...
k3s
| Author | SHA1 | Date | |
|---|---|---|---|
| 02ebbbf543 | |||
| 8efa89138d | |||
| 2644bcd193 | |||
| 4d6450900b | |||
| 446510098b | |||
| 2f5bb19296 | |||
| 65a5eec626 |
24
flake.lock
generated
24
flake.lock
generated
@@ -52,34 +52,10 @@
|
|||||||
"type": "github"
|
"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": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"plasma-manager": "plasma-manager",
|
|
||||||
"sops-nix": "sops-nix"
|
"sops-nix": "sops-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
29
flake.nix
29
flake.nix
@@ -13,12 +13,6 @@
|
|||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
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
|
outputs = { self, nixpkgs, ... } @ inputs: let
|
||||||
@@ -29,7 +23,6 @@
|
|||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ];
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
@@ -62,12 +55,22 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = baseModules ++ [
|
modules = baseModules ++ [
|
||||||
./machines/boxy/configuration.nix
|
./machines/boxy/configuration.nix
|
||||||
inputs.home-manager.nixosModules.home-manager
|
# inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
# {
|
||||||
home-manager.users.johno = import ./home/home-default.nix;
|
# home-manager.users.johno = import ./home/home-default.nix;
|
||||||
home-manager.extraSpecialArgs.customPkgs =
|
# home-manager.extraSpecialArgs.customPkgs =
|
||||||
nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
# 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
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -104,9 +104,8 @@
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./modules/emacs
|
./modules/emacs
|
||||||
./modules/i3+sway
|
|
||||||
./modules/lutris
|
./modules/lutris
|
||||||
./modules/plasma-manager
|
./modules/i3+sway
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.bash.enable = true;
|
programs.bash.enable = true;
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ let
|
|||||||
cfg = config.home.i3_sway;
|
cfg = config.home.i3_sway;
|
||||||
i3_cfg = config.xsession.windowManager.i3.config;
|
i3_cfg = config.xsession.windowManager.i3.config;
|
||||||
|
|
||||||
shared_config = recursiveUpdate rec {
|
shared_config = recursiveUpdate {
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
terminal = "kitty";
|
terminal = "kitty";
|
||||||
defaultWorkspace = "workspace number 1";
|
defaultWorkspace = "workspace number 1";
|
||||||
|
|
||||||
keybindings = {
|
keybindings = {
|
||||||
"${shared_config.modifier}+Return" = "exec ${terminal}";
|
"${shared_config.modifier}+Return" = "exec ${i3_cfg.terminal}";
|
||||||
"${shared_config.modifier}+Shift+q" = "kill";
|
"${shared_config.modifier}+Shift+q" = "kill";
|
||||||
"${shared_config.modifier}+d" = "exec ${i3_cfg.menu}";
|
"${shared_config.modifier}+d" = "exec ${i3_cfg.menu}";
|
||||||
|
|
||||||
@@ -129,13 +129,6 @@ in {
|
|||||||
"type:keyboard" = {
|
"type:keyboard" = {
|
||||||
xkb_options = "caps:escape";
|
xkb_options = "caps:escape";
|
||||||
};
|
};
|
||||||
"type:touchpad" = {
|
|
||||||
tap = "enabled";
|
|
||||||
tap_button_map = "lrm";
|
|
||||||
drag = "enabled";
|
|
||||||
natural_scroll = "disabled";
|
|
||||||
dwt = "enabled";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|||||||
@@ -1,150 +0,0 @@
|
|||||||
{ 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,9 +17,8 @@ with lib;
|
|||||||
kodi = {
|
kodi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autologin = true;
|
autologin = true;
|
||||||
wayland = true;
|
wayland = false;
|
||||||
};
|
};
|
||||||
users.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
@@ -30,7 +29,7 @@ with lib;
|
|||||||
|
|
||||||
hardware.graphics.enable = true;
|
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,
|
# 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.
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
|||||||
131
machines/k3s-nix/configuration.nix
Normal file
131
machines/k3s-nix/configuration.nix
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
# 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?
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
42
machines/k3s-nix/hardware-configuration.nix
Normal file
42
machines/k3s-nix/hardware-configuration.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# 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,7 +15,6 @@
|
|||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
nfs-mounts.enable = true;
|
nfs-mounts.enable = true;
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
spotifyd.enable = true;
|
|
||||||
users = {
|
users = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraGroups = [ "video" ];
|
extraGroups = [ "video" ];
|
||||||
|
|||||||
@@ -15,10 +15,6 @@
|
|||||||
"nvidia_uvm"
|
"nvidia_uvm"
|
||||||
"nvidia_drm"
|
"nvidia_drm"
|
||||||
];
|
];
|
||||||
boot.kernelParams = [
|
|
||||||
"nvidia_drm.fbdev=1"
|
|
||||||
"nvidia_drm.modeset=1"
|
|
||||||
];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
@@ -52,14 +48,6 @@
|
|||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
services.beesd.filesystems = {
|
|
||||||
root = {
|
|
||||||
spec = "LABEL=nixos";
|
|
||||||
hashTableSizeMB = 4096;
|
|
||||||
verbosity = "crit";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ in
|
|||||||
enable = mkEnableOption "Enable the audio role";
|
enable = mkEnableOption "Enable the audio role";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config =
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
paprefs
|
paprefs
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ in
|
|||||||
enable = mkEnableOption "Enable the bluetooth role";
|
enable = mkEnableOption "Enable the bluetooth role";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config =
|
||||||
{
|
{
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./audio
|
./audio
|
||||||
@@ -16,6 +19,10 @@ with lib;
|
|||||||
./virtualisation
|
./virtualisation
|
||||||
];
|
];
|
||||||
|
|
||||||
|
options.roles = {
|
||||||
|
enable = mkEnableOption "Enable roles";
|
||||||
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
i18n.extraLocaleSettings = {
|
i18n.extraLocaleSettings = {
|
||||||
@@ -58,6 +65,9 @@ with lib;
|
|||||||
substituters = [
|
substituters = [
|
||||||
"https://hyprland.cachix.org"
|
"https://hyprland.cachix.org"
|
||||||
];
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ let
|
|||||||
|
|
||||||
basePackages = with pkgs; [
|
basePackages = with pkgs; [
|
||||||
brightnessctl
|
brightnessctl
|
||||||
mangohud # Should probably get refactored with steam/gamescope out to a gaming role
|
|
||||||
polonium # auto tiling kwin addon
|
|
||||||
];
|
];
|
||||||
|
|
||||||
x11BasePackages = with pkgs; [
|
x11BasePackages = with pkgs; [
|
||||||
@@ -73,38 +71,10 @@ in
|
|||||||
|
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
programs.java.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 = {
|
programs.steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
localNetworkGameTransfers.openFirewall = true;
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
gamescopeSession = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
#package = pkgs.steam.override {
|
#package = pkgs.steam.override {
|
||||||
#withJava = true;
|
#withJava = true;
|
||||||
#withPrimus = true;
|
#withPrimus = true;
|
||||||
|
|||||||
33
roles/k3s/default.nix
Normal file
33
roles/k3s/default.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{ 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,8 +25,7 @@ in
|
|||||||
steam-library
|
steam-library
|
||||||
youtube
|
youtube
|
||||||
]);
|
]);
|
||||||
in mkIf cfg.enable
|
in {
|
||||||
{
|
|
||||||
users.extraUsers.kodi.isNormalUser = true;
|
users.extraUsers.kodi.isNormalUser = true;
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
@@ -34,21 +33,14 @@ in
|
|||||||
allowedUDPPorts = [ 8080 ];
|
allowedUDPPorts = [ 8080 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services = if cfg.autologin then mkMerge [
|
services = mkIf cfg.autologin {
|
||||||
(mkIf cfg.wayland {
|
|
||||||
cage = mkIf cfg.wayland {
|
cage = mkIf cfg.wayland {
|
||||||
user = "kodi";
|
user = "kodi";
|
||||||
program = "${kodiPkg}/bin/kodi-standalone";
|
program = "${kodiPkg}/bin/kodi-standalone";
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
xserver = {
|
|
||||||
enable = false;
|
|
||||||
autorun = false;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
(mkIf (!cfg.wayland) {
|
xserver = mkIf (!cfg.wayland) {
|
||||||
xserver = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
desktopManager.kodi = {
|
desktopManager.kodi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -58,14 +50,14 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
greeter.enable = false;
|
greeter.enable = false;
|
||||||
};
|
};
|
||||||
|
displayManager.sddm.enable = mkForce false;
|
||||||
};
|
};
|
||||||
displayManager = {
|
displayManager = mkIf (!cfg.wayland) {
|
||||||
autoLogin.enable = true;
|
autoLogin.enable = true;
|
||||||
autoLogin.user = "kodi";
|
autoLogin.user = "kodi";
|
||||||
defaultSession = "kodi";
|
defaultSession = "kodi";
|
||||||
sessionData.autologinSession = "kodi";
|
sessionData.autologinSession = "kodi";
|
||||||
};
|
};
|
||||||
})
|
};
|
||||||
] else {};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config = {
|
||||||
{
|
|
||||||
fileSystems."/media" = {
|
fileSystems."/media" = {
|
||||||
device = "10.0.0.43:/media";
|
device = "10.0.0.43:/media";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
|||||||
@@ -2,16 +2,12 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.roles.printing;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.roles.printing = {
|
options.roles.printing = {
|
||||||
enable = mkEnableOption "Enable default printing setup";
|
enable = mkEnableOption "Enable default printing setup";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config = {
|
||||||
{
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
services.avahi = {
|
services.avahi = {
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ in
|
|||||||
enable = mkEnableOption "Enable the spotifyd role";
|
enable = mkEnableOption "Enable the spotifyd role";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config = {
|
||||||
{
|
|
||||||
roles.audio.enable = true;
|
roles.audio.enable = true;
|
||||||
|
|
||||||
services.spotifyd = {
|
services.spotifyd = {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ in
|
|||||||
kidsPackages = with pkgs; [
|
kidsPackages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
];
|
];
|
||||||
in mkIf cfg.enable {
|
in {
|
||||||
users.users.johno = {
|
users.users.johno = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "John Ogle";
|
description = "John Ogle";
|
||||||
|
|||||||
@@ -2,16 +2,12 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.roles.virtualisation;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.roles.virtualisation = {
|
options.roles.virtualisation = {
|
||||||
enable = mkEnableOption "Enable virtualisation";
|
enable = mkEnableOption "Enable virtualisation";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config = {
|
||||||
{
|
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ example_number: ENC[AES256_GCM,data:jmLoVC+8YIlB2A==,iv:u9GztD/aE9UN5zWq3Am2nhYw
|
|||||||
example_booleans:
|
example_booleans:
|
||||||
- ENC[AES256_GCM,data:ZacILA==,iv:xo+7aFFQXzbJzKDY0mYTeFLf10AlnHkywDRAMHeprEM=,tag:F/OnJdqjrZP02sTLWLmnbg==,type:bool]
|
- 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]
|
- 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:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
@@ -41,8 +42,8 @@ sops:
|
|||||||
aU1IQzdTMVhnbHhsNENwMG05dXhOU2MK8fEJea9sL5JLgltVlTI6mRDb+Tl83Iz7
|
aU1IQzdTMVhnbHhsNENwMG05dXhOU2MK8fEJea9sL5JLgltVlTI6mRDb+Tl83Iz7
|
||||||
4wPYvo68cn8vimXqSk45ldHRrNa3zhYai3CalQaGtDT3fkWGvSq0zQ==
|
4wPYvo68cn8vimXqSk45ldHRrNa3zhYai3CalQaGtDT3fkWGvSq0zQ==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2024-09-28T15:44:39Z"
|
lastmodified: "2024-10-06T00:23:29Z"
|
||||||
mac: ENC[AES256_GCM,data:YUi+AbS6DQTmrSyOXsbkZWfWaMyKGR8fYm/MHcxmqChi8hng+UWHBZjsLBe6ef/FLH3rnP6bhfwK8KYnVS6fHvHahoqIq/BHydTsqrclnSgRAGl8Lh0yuhwISNRvP1AuW5pd50sdQaS0uGOtzOCharI/pZ9H+cmt2SB5WOCdeLs=,iv:2nBG6it3tNSLSia8hGzCcesuK9QwzB9EzfjWegjQ2kw=,tag:RGGPAPw/rQKhWA2OqLjTJw==,type:str]
|
mac: ENC[AES256_GCM,data:adzK7q2CJOcurpaZHmNDe8O9EqdCuwopmSS2ysFHDkJ8GtXdFQQBabwwlYz/zi0jIHBBUP4JIqnffg+rsM2R0fAvGMnIZvwbD9Yo6efiEK5kVgbwze6O9SaqOpgXr8R8zxsgm9gJWtjrAqwOdKTqb9tIN24cMKnhFr6UVXZen0U=,iv:MTTavZ9eq9ibWwBFiJ1OHRQswHXwLacc2PBMSztMZ+w=,tag:X8mz2hX1cTKdWPlEQTyzHA==,type:str]
|
||||||
pgp: []
|
pgp: []
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.9.0
|
version: 3.9.0
|
||||||
|
|||||||
Reference in New Issue
Block a user