mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: add more nixos settings as modules
This commit is contained in:
parent
41e2f54618
commit
2db79465da
15 changed files with 493 additions and 418 deletions
|
|
@ -2071,17 +2071,18 @@ This is basically just adjusted to the core count, path to the =hwmon= (this was
|
|||
|
||||
#+begin_src nix :tangle profiles/fourside/default.nix
|
||||
|
||||
{ inputs, outputs, config, ... }:
|
||||
{ inputs, outputs, config, pkgs, ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p14s-amd-gen2
|
||||
|
||||
./hardware-configuration.nix
|
||||
./nixos.nix
|
||||
|
||||
../optional/nixos/steam.nix
|
||||
../optional/nixos/virtualbox.nix
|
||||
../optional/nixos/autologin.nix
|
||||
../optional/nixos/nswitch-rcm.nix
|
||||
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
|
|
@ -2099,12 +2100,37 @@ This is basically just adjusted to the core count, path to the =hwmon= (this was
|
|||
};
|
||||
};
|
||||
|
||||
# ------ -----
|
||||
# | DP-4 | |eDP-1|
|
||||
# ------ -----
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
|
||||
networking = {
|
||||
hostName = "fourside";
|
||||
firewall.enable = true;
|
||||
};
|
||||
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
vulkan-extension-layer
|
||||
];
|
||||
|
||||
services = {
|
||||
thinkfan.enable = false;
|
||||
fwupd.enable = true;
|
||||
};
|
||||
|
||||
swarselsystems = {
|
||||
wallpaper = ../../wallpaper/lenovowp.png;
|
||||
hasBluetooth = true;
|
||||
hasFingerprint = true;
|
||||
trackpoint = {
|
||||
isAvailable = true;
|
||||
device = "TPPS/2 Elan TrackPoint";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.swarsel.swarselsystems = {
|
||||
|
|
@ -2115,6 +2141,9 @@ This is basically just adjusted to the core count, path to the =hwmon= (this was
|
|||
path = "/sys/devices/platform/thinkpad_hwmon/hwmon/";
|
||||
input-filename = "temp1_input";
|
||||
};
|
||||
# ------ -----
|
||||
# | DP-4 | |eDP-1|
|
||||
# ------ -----
|
||||
monitors = {
|
||||
main = {
|
||||
name = "California Institute of Technology 0x1407 Unknown";
|
||||
|
|
@ -2162,98 +2191,6 @@ This is basically just adjusted to the core count, path to the =hwmon= (this was
|
|||
|
||||
#+end_src
|
||||
|
||||
***** NixOS
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:ab6fefc4-aabd-456c-8a21-5fcb20c02869
|
||||
:END:
|
||||
|
||||
Mostly just sets some opened ports for several games, enables virtualbox (which I do not want everywhere because of resource considerations) and enables thinkfan, which allows for better fan control on Lenovo Thinkpad machines.
|
||||
|
||||
#+begin_src nix :noweb yes :tangle profiles/fourside/nixos.nix
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
greetd.settings.initial_session.user = "swarsel";
|
||||
};
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
# kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
|
||||
networking = {
|
||||
hostName = "fourside"; # Define your hostname.
|
||||
nftables.enable = true;
|
||||
enableIPv6 = false;
|
||||
firewall.checkReversePath = false;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [ 4380 27036 14242 34197 51820 ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPorts = [ ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 27015; to = 27030; } # barotrauma
|
||||
{ from = 27036; to = 27037; } # barotrauma
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{ from = 27000; to = 27031; } # barotrauma
|
||||
{ from = 58962; to = 58964; } # barotrauma
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
vulkan-extension-layer
|
||||
];
|
||||
};
|
||||
bluetooth.enable = true;
|
||||
trackpoint = {
|
||||
enable = true;
|
||||
device = "TPPS/2 Elan TrackPoint";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Configure keymap in X11 (only used for login)
|
||||
|
||||
services.thinkfan = {
|
||||
enable = false;
|
||||
};
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
services.fwupd.enable = true;
|
||||
|
||||
services.nswitch-rcm = {
|
||||
enable = true;
|
||||
package = pkgs.fetchurl {
|
||||
url = "https://github.com/Atmosphere-NX/Atmosphere/releases/download/1.3.2/fusee.bin";
|
||||
hash = "sha256-5AXzNsny45SPLIrvWJA9/JlOCal5l6Y++Cm+RtlJppI=";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
||||
**** Winters (Framwork Laptop 16)
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:6c6e9261-dfa1-42d8-ab2a-8b7c227be6d9
|
||||
|
|
@ -4389,6 +4326,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
#+begin_src nix :tangle modules/nixos/default.nix
|
||||
{
|
||||
wallpaper = import ./wallpaper.nix;
|
||||
hardware = import ./hardware.nix;
|
||||
}
|
||||
#+end_src
|
||||
|
||||
|
|
@ -4407,6 +4345,22 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
|
||||
#+end_src
|
||||
|
||||
***** Hardware
|
||||
|
||||
#+begin_src nix :tangle modules/nixos/hardware.nix
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options.swarselsystems.hasBluetooth = lib.mkEnableOption "bluetooth availability";
|
||||
options.swarselsystems.hasFingerprint = lib.mkEnableOption "fingerprint sensor availability";
|
||||
options.swarselsystems.trackpoint.isAvailable = lib.mkEnableOption "trackpoint availability";
|
||||
options.swarselsystems.trackpoint.device = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
}
|
||||
#+end_src
|
||||
|
||||
|
||||
**** home-manager
|
||||
|
||||
|
|
@ -4566,7 +4520,6 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
default = { };
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
#+end_src
|
||||
|
||||
|
|
@ -4636,7 +4589,8 @@ in
|
|||
|
||||
These are system-level settings specific to NixOS machines. All settings that are required on all machines go here.
|
||||
|
||||
**** Imports, enable home-manager module
|
||||
**** Imports, enable home-manager module, stateVersion
|
||||
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:45e4315b-0929-4c47-b65a-c8f0a685f4df
|
||||
:END:
|
||||
|
|
@ -4645,7 +4599,7 @@ First, we enable the use of =home-manager= as a NixoS module
|
|||
|
||||
#+begin_src nix :tangle profiles/common/nixos/default.nix
|
||||
|
||||
{ ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./xserver.nix
|
||||
|
|
@ -4671,6 +4625,7 @@ First, we enable the use of =home-manager= as a NixoS module
|
|||
./hardwarecompatibility.nix
|
||||
./login.nix
|
||||
./stylix.nix
|
||||
./power-profiles-daemon.nix
|
||||
];
|
||||
|
||||
|
||||
|
|
@ -4678,6 +4633,8 @@ First, we enable the use of =home-manager= as a NixoS module
|
|||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
|
||||
system.stateVersion = lib.mkDefault "23.05";
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
|
@ -4832,7 +4789,7 @@ There is a persistent bug over Linux kernels that makes the user wait 1m30s on s
|
|||
Enable OpenGL, Sound, Bluetooth and various drivers.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/hardware.nix
|
||||
{ pkgs, ...}:
|
||||
{ pkgs, config, lib, ...}:
|
||||
{
|
||||
|
||||
hardware = {
|
||||
|
|
@ -4841,6 +4798,11 @@ Enable OpenGL, Sound, Bluetooth and various drivers.
|
|||
enable32Bit = true;
|
||||
};
|
||||
|
||||
trackpoint = lib.mkIf config.swarselsystems.trackpoint.isAvailable {
|
||||
enable = true;
|
||||
device = config.swarselsystems.trackpoint.device;
|
||||
};
|
||||
|
||||
pulseaudio= {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
|
|
@ -4848,7 +4810,7 @@ Enable OpenGL, Sound, Bluetooth and various drivers.
|
|||
|
||||
enableAllFirmware = true;
|
||||
|
||||
bluetooth = {
|
||||
bluetooth = lib.mkIf config.swarselsystems.hasBluetooth {
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
|
|
@ -4857,6 +4819,8 @@ Enable OpenGL, Sound, Bluetooth and various drivers.
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.fprintd.enable = lib.mkIf config.swarselsystems.hasFingerprint true;
|
||||
}
|
||||
#+end_src
|
||||
|
||||
|
|
@ -4868,9 +4832,18 @@ Enable OpenGL, Sound, Bluetooth and various drivers.
|
|||
Here I only enable =networkmanager=. Most of the 'real' network config is done in [[#h:88bf4b90-e94b-46fb-aaf1-a381a512860d][System specific configuration]].
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/network.nix
|
||||
{ config, ...}:
|
||||
{ lib, config, ...}:
|
||||
{
|
||||
networking.networkmanager = {
|
||||
networking = {
|
||||
nftables.enable = lib.mkDefault true;
|
||||
enableIPv6 = lib.mkDefault true;
|
||||
firewall = {
|
||||
checkReversePath = lib.mkDefault false;
|
||||
enable = lib.mkDefault true;
|
||||
allowedUDPPorts = [ 51820 ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
};
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
ensureProfiles = {
|
||||
environmentFiles = [
|
||||
|
|
@ -5072,6 +5045,7 @@ Here I only enable =networkmanager=. Most of the 'real' network config is done i
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.NetworkManager-ensure-profiles.after = [ "NetworkManager.service" ];
|
||||
}
|
||||
|
|
@ -5488,6 +5462,15 @@ This is a super-convenient package that lets my remap my =CAPS= key to =ESC= if
|
|||
}
|
||||
#+end_src
|
||||
|
||||
***** power-profiles-daemon
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/power-profiles-daemon.nix
|
||||
{ ... }:
|
||||
{
|
||||
services.power-profiles-daemon.enable = true;
|
||||
}
|
||||
#+end_src
|
||||
|
||||
**** Hardware compatibility settings (Yubikey, Ledger) - udev rules
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:7a89b5e3-b700-4167-8b14-2b8172f33936
|
||||
|
|
@ -5550,11 +5533,25 @@ This section houses the greetd related settings. I do not really want to use a d
|
|||
#+end_src
|
||||
*** Optional
|
||||
|
||||
**** steam
|
||||
**** gaming
|
||||
|
||||
#+begin_src nix :tangle profiles/optional/nixos/steam.nix
|
||||
#+begin_src nix :tangle profiles/optional/nixos/gaming.nix
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedUDPPorts = [ 4380 27036 14242 34197 ]; # 34197: factorio; 4380 27036 14242: barotrauma;
|
||||
allowedTCPPorts = [ ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 27015; to = 27030; } # barotrauma
|
||||
{ from = 27036; to = 27037; } # barotrauma
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{ from = 27000; to = 27031; } # barotrauma
|
||||
{ from = 58962; to = 58964; } # barotrauma
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
|
|
@ -5585,6 +5582,33 @@ This section houses the greetd related settings. I do not really want to use a d
|
|||
}
|
||||
#+end_src
|
||||
|
||||
**** Auto-login
|
||||
|
||||
#+begin_src nix :tangle profiles/optional/nixos/autologin.nix
|
||||
{ ... }:
|
||||
{
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
greetd.settings.initial_session.user = "swarsel";
|
||||
};
|
||||
}
|
||||
#+end_src
|
||||
|
||||
**** nswitch-rcm
|
||||
|
||||
#+begin_src nix :tangle profiles/optional/nixos/nswitch-rcm.nix
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.nswitch-rcm = {
|
||||
enable = true;
|
||||
package = pkgs.fetchurl {
|
||||
url = "https://github.com/Atmosphere-NX/Atmosphere/releases/download/1.3.2/fusee.bin";
|
||||
hash = "sha256-5AXzNsny45SPLIrvWJA9/JlOCal5l6Y++Cm+RtlJppI=";
|
||||
};
|
||||
};
|
||||
}
|
||||
#+end_src
|
||||
|
||||
** Home-manager
|
||||
*** Common
|
||||
:PROPERTIES:
|
||||
|
|
@ -8181,7 +8205,7 @@ We set a hook that runs everytime we save the file. It would be a bit more effic
|
|||
swarsel-swarsel-org-filepath)
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-html-export-to-html)
|
||||
;; (org-html-export-to-html)
|
||||
(org-babel-tangle)
|
||||
(swarsel/run-formatting))))
|
||||
|
||||
|
|
|
|||
123
index.html
123
index.html
|
|
@ -3,7 +3,7 @@
|
|||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2024-07-25 Do 16:53 -->
|
||||
<!-- 2024-07-25 Do 17:05 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>SwarselSystems: NixOS + Emacs Configuration</title>
|
||||
|
|
@ -223,7 +223,7 @@
|
|||
<ul>
|
||||
<li><a href="#h:8a411ee2-a58e-4b5b-99bd-4ba772f8f0a2">2.3.1. Inputs</a></li>
|
||||
<li><a href="#h:df0072bc-853f-438f-bd85-bfc869501015">2.3.2. let</a></li>
|
||||
<li><a href="#orgac1678e">2.3.3. General (outputs)</a></li>
|
||||
<li><a href="#org4adbe28">2.3.3. General (outputs)</a></li>
|
||||
<li><a href="#h:9c9b9e3b-8771-44fa-ba9e-5056ae809655">2.3.4. nixosConfigurations</a></li>
|
||||
<li><a href="#h:f881aa05-a670-48dd-a57b-2916abdcb692">2.3.5. homeConfigurations</a></li>
|
||||
<li><a href="#h:5f6ef553-59f9-4239-b6f3-63d33b57f335">2.3.6. nixOnDroidConfigurations</a></li>
|
||||
|
|
@ -241,23 +241,23 @@
|
|||
<li><a href="#h:4dc59747-9598-4029-aa7d-92bf186d6c06">3.1.3. Virtual hosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgc25794c">3.2. Overlays, packages, and modules</a>
|
||||
<li><a href="#orgc141d21">3.2. Overlays, packages, and modules</a>
|
||||
<ul>
|
||||
<li><a href="#org390ea62">3.2.1. Packages</a></li>
|
||||
<li><a href="#orged27f86">3.2.2. Overlays</a></li>
|
||||
<li><a href="#orge554f8e">3.2.3. Modules</a></li>
|
||||
<li><a href="#org1a87142">3.2.1. Packages</a></li>
|
||||
<li><a href="#orgfa72648">3.2.2. Overlays</a></li>
|
||||
<li><a href="#org7748217">3.2.3. Modules</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgd7b8492">3.3. NixOS</a>
|
||||
<li><a href="#orgd4f98ca">3.3. NixOS</a>
|
||||
<ul>
|
||||
<li><a href="#h:1c1250cd-e9b4-4715-8d9f-eb09e64bfc7f">3.3.1. Common</a></li>
|
||||
<li><a href="#orge3fad27">3.3.2. Optional</a></li>
|
||||
<li><a href="#org773d4d6">3.3.2. Optional</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org3437a1b">3.4. Home-manager</a>
|
||||
<li><a href="#orga9f212b">3.4. Home-manager</a>
|
||||
<ul>
|
||||
<li><a href="#h:f0a6b5e0-2157-4522-b5e1-3f0abd91c05e">3.4.1. Common</a></li>
|
||||
<li><a href="#orgb5a2fcb">3.4.2. Optional</a></li>
|
||||
<li><a href="#orgec559c1">3.4.2. Optional</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#h:aee5ec75-7ca6-40d8-b6ac-a3e7e33a474b">3.5. flake.nix template</a>
|
||||
|
|
@ -310,7 +310,7 @@
|
|||
<ul>
|
||||
<li><a href="#h:99544398-72af-4382-b8e1-01b2221baff4">4.4.1. Org Mode</a></li>
|
||||
<li><a href="#h:406c2ecc-0e3e-4d9f-9ae3-3eb1f8b87d1b">4.4.2. Nix Mode</a></li>
|
||||
<li><a href="#org57c613b">4.4.3. nixpkgs-fmt</a></li>
|
||||
<li><a href="#org4df1290">4.4.3. nixpkgs-fmt</a></li>
|
||||
<li><a href="#h:50327461-a11b-4e81-830a-90febc720cfa">4.4.4. Markdown Mode</a></li>
|
||||
<li><a href="#h:65e69741-9860-4ed0-bbed-7b7be9a2a9d6">4.4.5. Olivetti</a></li>
|
||||
<li><a href="#h:94d4a0dc-b0d7-4702-b760-beeaa6da2b8f">4.4.6. darkroom</a></li>
|
||||
|
|
@ -370,7 +370,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<b>This file has 42747 words spanning 11578 lines and was last revised on 2024-07-25 16:53:03 +0200.</b>
|
||||
<b>This file has 42739 words spanning 11576 lines and was last revised on 2024-07-25 17:05:22 +0200.</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
@ -420,7 +420,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry
|
|||
</p>
|
||||
|
||||
<p>
|
||||
My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-07-25 16:53:03 +0200)
|
||||
My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-07-25 17:05:22 +0200)
|
||||
</p></li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -1030,8 +1030,8 @@ mixedModules = [
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgac1678e" class="outline-4">
|
||||
<h4 id="orgac1678e"><span class="section-number-4">2.3.3.</span> General (outputs)</h4>
|
||||
<div id="outline-container-org4adbe28" class="outline-4">
|
||||
<h4 id="org4adbe28"><span class="section-number-4">2.3.3.</span> General (outputs)</h4>
|
||||
<div class="outline-text-4" id="text-2-3-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">
|
||||
|
|
@ -2410,7 +2410,7 @@ in
|
|||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a id="orge978872"></a>Home-manager only<br />
|
||||
<li><a id="org54c1fcc"></a>Home-manager only<br />
|
||||
<ol class="org-ol">
|
||||
<li><a id="h:483a26b5-5a40-4417-9ffb-67cc2cf07161"></a>Home manager<br />
|
||||
<div class="outline-text-6" id="text-h:483a26b5-5a40-4417-9ffb-67cc2cf07161">
|
||||
|
|
@ -2914,10 +2914,6 @@ Mostly just sets some opened ports for several games, enables virtualbox (which
|
|||
|
||||
{
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
greetd.settings.initial_session.user = "swarsel";
|
||||
};
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
|
|
@ -5375,8 +5371,8 @@ in
|
|||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgc25794c" class="outline-3">
|
||||
<h3 id="orgc25794c"><span class="section-number-3">3.2.</span> Overlays, packages, and modules</h3>
|
||||
<div id="outline-container-orgc141d21" class="outline-3">
|
||||
<h3 id="orgc141d21"><span class="section-number-3">3.2.</span> Overlays, packages, and modules</h3>
|
||||
<div class="outline-text-3" id="text-3-2">
|
||||
<p>
|
||||
In this section I define packages that I manually want to nixpkgs. This can be useful for packages that are currently awaiting a PR or public packages that I do not want to maintain.
|
||||
|
|
@ -5395,8 +5391,8 @@ These are for packages that are on nixpkgs, but do not fit my usecase, meaning I
|
|||
This is simply a mirror of the most recent stable branch of nixpkgs. Useful for packages that are broken on nixpkgs, but do not need to be on bleeding edge anyways.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div id="outline-container-org390ea62" class="outline-4">
|
||||
<h4 id="org390ea62"><span class="section-number-4">3.2.1.</span> Packages</h4>
|
||||
<div id="outline-container-org1a87142" class="outline-4">
|
||||
<h4 id="org1a87142"><span class="section-number-4">3.2.1.</span> Packages</h4>
|
||||
<div class="outline-text-4" id="text-3-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">
|
||||
|
|
@ -5406,8 +5402,8 @@ _ : rec { }
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orged27f86" class="outline-4">
|
||||
<h4 id="orged27f86"><span class="section-number-4">3.2.2.</span> Overlays</h4>
|
||||
<div id="outline-container-orgfa72648" class="outline-4">
|
||||
<h4 id="orgfa72648"><span class="section-number-4">3.2.2.</span> Overlays</h4>
|
||||
<div class="outline-text-4" id="text-3-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">
|
||||
|
|
@ -5440,15 +5436,15 @@ _ : rec { }
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orge554f8e" class="outline-4">
|
||||
<h4 id="orge554f8e"><span class="section-number-4">3.2.3.</span> Modules</h4>
|
||||
<div id="outline-container-org7748217" class="outline-4">
|
||||
<h4 id="org7748217"><span class="section-number-4">3.2.3.</span> Modules</h4>
|
||||
<div class="outline-text-4" id="text-3-2-3">
|
||||
<p>
|
||||
In this section I define custom modules under the <code>swarsel</code> attribute. These are mostly used to define settings specific to a host. I keep these settings confined to either home-manager or nixos to maintain compatibility with non-NixOS machines.
|
||||
</p>
|
||||
</div>
|
||||
<ol class="org-ol">
|
||||
<li><a id="orgbe6e213"></a>NixOS<br />
|
||||
<li><a id="org358b940"></a>NixOS<br />
|
||||
<div class="outline-text-5" id="text-3-2-3-1">
|
||||
<p>
|
||||
Modules that need to be loaded on the NixOS level. Note that these will not be available on systems that are not running NixOS
|
||||
|
|
@ -5462,7 +5458,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
</div>
|
||||
</div>
|
||||
<ol class="org-ol">
|
||||
<li><a id="org4ffee2c"></a>Wallpaper<br />
|
||||
<li><a id="org014ab6a"></a>Wallpaper<br />
|
||||
<div class="outline-text-6" id="text-3-2-3-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{ lib, ... }:
|
||||
|
|
@ -5480,7 +5476,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a id="org0ec9a59"></a>home-manager<br />
|
||||
<li><a id="orgcd79db9"></a>home-manager<br />
|
||||
<div class="outline-text-5" id="text-3-2-3-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{
|
||||
|
|
@ -5497,7 +5493,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
</div>
|
||||
</div>
|
||||
<ol class="org-ol">
|
||||
<li><a id="org050bf0d"></a>Laptop<br />
|
||||
<li><a id="orgad2c727"></a>Laptop<br />
|
||||
<div class="outline-text-6" id="text-3-2-3-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{ lib, config, ... }:
|
||||
|
|
@ -5532,7 +5528,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org265794a"></a>Hardware<br />
|
||||
<li><a id="orgc65ca75"></a>Hardware<br />
|
||||
<div class="outline-text-6" id="text-3-2-3-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{ lib, ... }:
|
||||
|
|
@ -5556,7 +5552,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org66979aa"></a>Waybar<br />
|
||||
<li><a id="org8aab025"></a>Waybar<br />
|
||||
<div class="outline-text-6" id="text-3-2-3-2-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix"> { lib, config, ... }:
|
||||
|
|
@ -5596,7 +5592,7 @@ in
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org6491f5b"></a>Monitors<br />
|
||||
<li><a id="org534b750"></a>Monitors<br />
|
||||
<div class="outline-text-6" id="text-3-2-3-2-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{ lib, config, ... }:
|
||||
|
|
@ -5613,7 +5609,7 @@ in
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="orgf311b2e"></a>Input<br />
|
||||
<li><a id="org8d2f5af"></a>Input<br />
|
||||
<div class="outline-text-6" id="text-3-2-3-2-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{ lib, config, ... }:
|
||||
|
|
@ -5654,7 +5650,7 @@ in
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="orgd367938"></a>Nixos<br />
|
||||
<li><a id="org3cc09df"></a>Nixos<br />
|
||||
<div class="outline-text-6" id="text-3-2-3-2-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{ lib, config, ... }:
|
||||
|
|
@ -5676,7 +5672,7 @@ in
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org40937fd"></a>System startup<br />
|
||||
<li><a id="orgf027e52"></a>System startup<br />
|
||||
<div class="outline-text-6" id="text-3-2-3-2-7">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{ lib, config, ... }:
|
||||
|
|
@ -5701,7 +5697,7 @@ in
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org125b485"></a>Wallpaper<br />
|
||||
<li><a id="orgbf2ce3c"></a>Wallpaper<br />
|
||||
<div class="outline-text-6" id="text-3-2-3-2-8">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{ lib, ... }:
|
||||
|
|
@ -5722,8 +5718,8 @@ in
|
|||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgd7b8492" class="outline-3">
|
||||
<h3 id="orgd7b8492"><span class="section-number-3">3.3.</span> NixOS</h3>
|
||||
<div id="outline-container-orgd4f98ca" class="outline-3">
|
||||
<h3 id="orgd4f98ca"><span class="section-number-3">3.3.</span> NixOS</h3>
|
||||
<div class="outline-text-3" id="text-3-3">
|
||||
</div>
|
||||
<div id="outline-container-h:1c1250cd-e9b4-4715-8d9f-eb09e64bfc7f" class="outline-4">
|
||||
|
|
@ -6270,7 +6266,7 @@ I use sops-nix to handle secrets that I want to have available on my machines at
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org2868233"></a>Theme (stylix)<br />
|
||||
<li><a id="orgc94132b"></a>Theme (stylix)<br />
|
||||
<div class="outline-text-5" id="text-3-3-1-4">
|
||||
<p>
|
||||
By default, <a href="https://github.com/danth/stylix">stylix</a> wants to style GRUB as well. However, I think that looks horrible.
|
||||
|
|
@ -6453,7 +6449,7 @@ Some programs profit from being installed through dedicated NixOS settings on sy
|
|||
</div>
|
||||
</div>
|
||||
<ol class="org-ol">
|
||||
<li><a id="orgbebcef9"></a>zsh<br />
|
||||
<li><a id="org529d729"></a>zsh<br />
|
||||
<div class="outline-text-6" id="text-3-3-1-6-1">
|
||||
<p>
|
||||
Do not touch this.
|
||||
|
|
@ -6471,7 +6467,7 @@ Do not touch this.
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="orge5aba30"></a>syncthing<br />
|
||||
<li><a id="org24ef28a"></a>syncthing<br />
|
||||
<div class="outline-text-6" id="text-3-3-1-6-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">
|
||||
|
|
@ -6548,7 +6544,7 @@ Enables the blueman service including the nice system tray icon.
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org5759fd2"></a>Network devices<br />
|
||||
<li><a id="org1300d78"></a>Network devices<br />
|
||||
<div class="outline-text-6" id="text-3-3-1-7-2">
|
||||
<p>
|
||||
In this section we enable compatibility with several network devices I have at home, mainly printers and scanners.
|
||||
|
|
@ -6600,7 +6596,7 @@ services.printing = {
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org76ac390"></a>Avahi (device discovery)<br />
|
||||
<li><a id="org26d6861"></a>Avahi (device discovery)<br />
|
||||
<div class="outline-text-7" id="text-3-3-1-7-2-3">
|
||||
<p>
|
||||
Avahi is the service used for the network discovery.
|
||||
|
|
@ -6749,12 +6745,12 @@ This section houses the greetd related settings. I do not really want to use a d
|
|||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div id="outline-container-orge3fad27" class="outline-4">
|
||||
<h4 id="orge3fad27"><span class="section-number-4">3.3.2.</span> Optional</h4>
|
||||
<div id="outline-container-org773d4d6" class="outline-4">
|
||||
<h4 id="org773d4d6"><span class="section-number-4">3.3.2.</span> Optional</h4>
|
||||
<div class="outline-text-4" id="text-3-3-2">
|
||||
</div>
|
||||
<ol class="org-ol">
|
||||
<li><a id="orgb5d8c78"></a>steam<br />
|
||||
<li><a id="orgc7b47a1"></a>steam<br />
|
||||
<div class="outline-text-5" id="text-3-3-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{ pkgs, ... }:
|
||||
|
|
@ -6773,7 +6769,7 @@ This section houses the greetd related settings. I do not really want to use a d
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org3a5dfa2"></a>VirtualBox<br />
|
||||
<li><a id="org5f16529"></a>VirtualBox<br />
|
||||
<div class="outline-text-5" id="text-3-3-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix"> { ... }:
|
||||
|
|
@ -6793,11 +6789,12 @@ This section houses the greetd related settings. I do not really want to use a d
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org535a06a"></a>Auto-login<br /></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org3437a1b" class="outline-3">
|
||||
<h3 id="org3437a1b"><span class="section-number-3">3.4.</span> Home-manager</h3>
|
||||
<div id="outline-container-orga9f212b" class="outline-3">
|
||||
<h3 id="orga9f212b"><span class="section-number-3">3.4.</span> Home-manager</h3>
|
||||
<div class="outline-text-3" id="text-3-4">
|
||||
</div>
|
||||
<div id="outline-container-h:f0a6b5e0-2157-4522-b5e1-3f0abd91c05e" class="outline-4">
|
||||
|
|
@ -6805,7 +6802,7 @@ This section houses the greetd related settings. I do not really want to use a d
|
|||
<div class="outline-text-4" id="text-h:f0a6b5e0-2157-4522-b5e1-3f0abd91c05e">
|
||||
</div>
|
||||
<ol class="org-ol">
|
||||
<li><a id="org3dedecc"></a>Imports<br />
|
||||
<li><a id="org9e66466"></a>Imports<br />
|
||||
<div class="outline-text-5" id="text-3-4-1-1">
|
||||
<p>
|
||||
This section sets up all the imports that are used in the home-manager section.
|
||||
|
|
@ -7594,7 +7591,7 @@ This section is for programs that require no further configuration. zsh Integrat
|
|||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a id="orgcbec89d"></a>nix-index<br />
|
||||
<li><a id="orgd1753e7"></a>nix-index<br />
|
||||
<div class="outline-text-5" id="text-3-4-1-10">
|
||||
<p>
|
||||
nix-index provides a way to find out which packages are provided by which derivations. By default it also comes with a replacement for <code>command-not-found.sh</code>, however, the implementation is based on a channel based setup. I like consistency, so I replace the command with one that provides a flakes-based output.
|
||||
|
|
@ -8921,7 +8918,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="orgbcac627"></a>gpg-agent<br />
|
||||
<li><a id="org0920ff5"></a>gpg-agent<br />
|
||||
<div class="outline-text-5" id="text-3-4-1-25">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">{ pkgs, ... }:
|
||||
|
|
@ -8945,12 +8942,12 @@ services.gpg-agent = {
|
|||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div id="outline-container-orgb5a2fcb" class="outline-4">
|
||||
<h4 id="orgb5a2fcb"><span class="section-number-4">3.4.2.</span> Optional</h4>
|
||||
<div id="outline-container-orgec559c1" class="outline-4">
|
||||
<h4 id="orgec559c1"><span class="section-number-4">3.4.2.</span> Optional</h4>
|
||||
<div class="outline-text-4" id="text-3-4-2">
|
||||
</div>
|
||||
<ol class="org-ol">
|
||||
<li><a id="org886fb6b"></a>Gaming<br />
|
||||
<li><a id="org3e7f5d7"></a>Gaming<br />
|
||||
<div class="outline-text-5" id="text-3-4-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-nix">
|
||||
|
|
@ -10001,7 +9998,7 @@ The standard Emacs behaviour for the Python process shell is a bit annoying. Thi
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org6634dda"></a>Nix common prefix bracketer<br />
|
||||
<li><a id="orgd21bf52"></a>Nix common prefix bracketer<br />
|
||||
<div class="outline-text-5" id="text-4-2-1-15">
|
||||
<p>
|
||||
This function searches for common delimiters in region and removes them, summarizing all captured lines by it.
|
||||
|
|
@ -10034,7 +10031,7 @@ This function searches for common delimiters in region and removes them, summari
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><a id="org074b664"></a>Nix formatters<br />
|
||||
<li><a id="orgf545847"></a>Nix formatters<br />
|
||||
<div class="outline-text-5" id="text-4-2-1-16">
|
||||
<p>
|
||||
This formats the org code block at <code>point</code> in accordance to the <code>nixpkgs-fmt</code> formatter
|
||||
|
|
@ -11607,8 +11604,8 @@ This adds a rudimentary nix-mode to Emacs. I have not really tried this out, as
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org57c613b" class="outline-4">
|
||||
<h4 id="org57c613b"><span class="section-number-4">4.4.3.</span> nixpkgs-fmt</h4>
|
||||
<div id="outline-container-org4df1290" class="outline-4">
|
||||
<h4 id="org4df1290"><span class="section-number-4">4.4.3.</span> nixpkgs-fmt</h4>
|
||||
<div class="outline-text-4" id="text-4-4-3">
|
||||
<p>
|
||||
Adds functions for formatting nix code.
|
||||
|
|
@ -13623,7 +13620,7 @@ My laptop, sadly soon to be replaced by a new one, since most basic functions ar
|
|||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: Leon Schwarzäugl</p>
|
||||
<p class="date">Created: 2024-07-25 Do 16:53</p>
|
||||
<p class="date">Created: 2024-07-25 Do 17:05</p>
|
||||
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -30,5 +30,4 @@ in
|
|||
default = { };
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
wallpaper = import ./wallpaper.nix;
|
||||
hardware = import ./hardware.nix;
|
||||
}
|
||||
|
|
|
|||
11
modules/nixos/hardware.nix
Normal file
11
modules/nixos/hardware.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options.swarselsystems.hasBluetooth = lib.mkEnableOption "bluetooth availability";
|
||||
options.swarselsystems.hasFingerprint = lib.mkEnableOption "fingerprint sensor availability";
|
||||
options.swarselsystems.trackpoint.isAvailable = lib.mkEnableOption "trackpoint availability";
|
||||
options.swarselsystems.trackpoint.device = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./xserver.nix
|
||||
|
|
@ -24,6 +24,7 @@
|
|||
./hardwarecompatibility.nix
|
||||
./login.nix
|
||||
./stylix.nix
|
||||
./power-profiles-daemon.nix
|
||||
];
|
||||
|
||||
|
||||
|
|
@ -31,4 +32,6 @@
|
|||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
|
||||
system.stateVersion = lib.mkDefault "23.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
|
||||
hardware = {
|
||||
|
|
@ -7,6 +7,11 @@
|
|||
enable32Bit = true;
|
||||
};
|
||||
|
||||
trackpoint = lib.mkIf config.swarselsystems.trackpoint.isAvailable {
|
||||
enable = true;
|
||||
device = config.swarselsystems.trackpoint.device;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
|
|
@ -14,7 +19,7 @@
|
|||
|
||||
enableAllFirmware = true;
|
||||
|
||||
bluetooth = {
|
||||
bluetooth = lib.mkIf config.swarselsystems.hasBluetooth {
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
|
|
@ -23,4 +28,6 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.fprintd.enable = lib.mkIf config.swarselsystems.hasFingerprint true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,15 @@
|
|||
{ config, ... }:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
networking.networkmanager = {
|
||||
networking = {
|
||||
nftables.enable = lib.mkDefault true;
|
||||
enableIPv6 = lib.mkDefault true;
|
||||
firewall = {
|
||||
checkReversePath = lib.mkDefault false;
|
||||
enable = lib.mkDefault true;
|
||||
allowedUDPPorts = [ 51820 ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
};
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
ensureProfiles = {
|
||||
environmentFiles = [
|
||||
|
|
@ -202,6 +211,7 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.NetworkManager-ensure-profiles.after = [ "NetworkManager.service" ];
|
||||
}
|
||||
|
|
|
|||
4
profiles/common/nixos/power-profiles-daemon.nix
Normal file
4
profiles/common/nixos/power-profiles-daemon.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.power-profiles-daemon.enable = true;
|
||||
}
|
||||
|
|
@ -1,14 +1,15 @@
|
|||
{ inputs, outputs, config, ... }:
|
||||
{ inputs, outputs, config, pkgs, ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p14s-amd-gen2
|
||||
|
||||
./hardware-configuration.nix
|
||||
./nixos.nix
|
||||
|
||||
../optional/nixos/steam.nix
|
||||
../optional/nixos/virtualbox.nix
|
||||
../optional/nixos/autologin.nix
|
||||
../optional/nixos/nswitch-rcm.nix
|
||||
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
|
|
@ -26,12 +27,37 @@
|
|||
};
|
||||
};
|
||||
|
||||
# ------ -----
|
||||
# | DP-4 | |eDP-1|
|
||||
# ------ -----
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
|
||||
networking = {
|
||||
hostName = "fourside";
|
||||
firewall.enable = true;
|
||||
};
|
||||
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
vulkan-extension-layer
|
||||
];
|
||||
|
||||
services = {
|
||||
thinkfan.enable = false;
|
||||
fwupd.enable = true;
|
||||
};
|
||||
|
||||
swarselsystems = {
|
||||
wallpaper = ../../wallpaper/lenovowp.png;
|
||||
hasBluetooth = true;
|
||||
hasFingerprint = true;
|
||||
trackpoint = {
|
||||
isAvailable = true;
|
||||
device = "TPPS/2 Elan TrackPoint";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.swarsel.swarselsystems = {
|
||||
|
|
@ -42,6 +68,9 @@
|
|||
path = "/sys/devices/platform/thinkpad_hwmon/hwmon/";
|
||||
input-filename = "temp1_input";
|
||||
};
|
||||
# ------ -----
|
||||
# | DP-4 | |eDP-1|
|
||||
# ------ -----
|
||||
monitors = {
|
||||
main = {
|
||||
name = "California Institute of Technology 0x1407 Unknown";
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
{
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
greetd.settings.initial_session.user = "swarsel";
|
||||
};
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
|
|
@ -14,53 +10,10 @@
|
|||
};
|
||||
|
||||
|
||||
networking = {
|
||||
hostName = "fourside"; # Define your hostname.
|
||||
nftables.enable = true;
|
||||
enableIPv6 = false;
|
||||
firewall.checkReversePath = false;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [ 4380 27036 14242 34197 51820 ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPorts = [ ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 27015; to = 27030; } # barotrauma
|
||||
{ from = 27036; to = 27037; } # barotrauma
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{ from = 27000; to = 27031; } # barotrauma
|
||||
{ from = 58962; to = 58964; } # barotrauma
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
vulkan-extension-layer
|
||||
];
|
||||
};
|
||||
bluetooth.enable = true;
|
||||
trackpoint = {
|
||||
enable = true;
|
||||
device = "TPPS/2 Elan TrackPoint";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Configure keymap in X11 (only used for login)
|
||||
|
||||
services.thinkfan = {
|
||||
enable = false;
|
||||
};
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
services.fwupd.enable = true;
|
||||
|
||||
services.nswitch-rcm = {
|
||||
|
|
@ -72,10 +25,6 @@
|
|||
};
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
7
profiles/optional/nixos/autologin.nix
Normal file
7
profiles/optional/nixos/autologin.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
greetd.settings.initial_session.user = "swarsel";
|
||||
};
|
||||
}
|
||||
24
profiles/optional/nixos/gaming.nix
Normal file
24
profiles/optional/nixos/gaming.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedUDPPorts = [ 4380 27036 14242 34197 ]; # 34197: factorio; 4380 27036 14242: barotrauma;
|
||||
allowedTCPPorts = [ ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 27015; to = 27030; } # barotrauma
|
||||
{ from = 27036; to = 27037; } # barotrauma
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{ from = 27000; to = 27031; } # barotrauma
|
||||
{ from = 58962; to = 58964; } # barotrauma
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extraCompatPackages = [
|
||||
pkgs.proton-ge-bin
|
||||
];
|
||||
};
|
||||
}
|
||||
10
profiles/optional/nixos/nswitch-rcm.nix
Normal file
10
profiles/optional/nixos/nswitch-rcm.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.nswitch-rcm = {
|
||||
enable = true;
|
||||
package = pkgs.fetchurl {
|
||||
url = "https://github.com/Atmosphere-NX/Atmosphere/releases/download/1.3.2/fusee.bin";
|
||||
hash = "sha256-5AXzNsny45SPLIrvWJA9/JlOCal5l6Y++Cm+RtlJppI=";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -184,7 +184,7 @@ create a new one."
|
|||
swarsel-swarsel-org-filepath)
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-html-export-to-html)
|
||||
;; (org-html-export-to-html)
|
||||
(org-babel-tangle)
|
||||
(swarsel/run-formatting))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue