format the repo files
This commit is contained in:
108
CLAUDE.md
Normal file
108
CLAUDE.md
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## What This Repo Is
|
||||||
|
|
||||||
|
A NixOS flake configuration managing multiple hosts (desktops, laptops, servers). All hosts share common settings via `hosts/configuration_common.nix` and are assembled in `hosts/default.nix`.
|
||||||
|
|
||||||
|
## Common Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Format all nix files
|
||||||
|
nix fmt
|
||||||
|
|
||||||
|
# Build a host configuration (no activation)
|
||||||
|
nixos-rebuild build --flake .#<host>
|
||||||
|
|
||||||
|
# Switch the current host
|
||||||
|
sudo nixos-rebuild switch --flake .#<host>
|
||||||
|
|
||||||
|
# Build a custom package
|
||||||
|
nix build .#<package>
|
||||||
|
|
||||||
|
# Edit an age-encrypted secret
|
||||||
|
agenix -e secrets/<path>.age
|
||||||
|
|
||||||
|
# Re-key all secrets after adding a new host key to secrets/secrets.nix
|
||||||
|
agenix -r
|
||||||
|
```
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
### Entry Points
|
||||||
|
|
||||||
|
- `flake.nix` — defines inputs (nixpkgs stable=25.11, unstable, home-manager, agenix, lanzaboote, jovian-nixos, microvm, impermanence, noctalia) and calls `hosts/default.nix` for `nixosConfigurations`
|
||||||
|
- `hosts/default.nix` — instantiates every host via `lib.nixosSystem`; contains the `mkHM` helper that wires home-manager into a host's modules list
|
||||||
|
|
||||||
|
### Host Structure
|
||||||
|
|
||||||
|
Each host lives in `hosts/<name>/`:
|
||||||
|
- `default.nix` — imports either `../../modules/desktop` or `../../modules/server`, sets the module options (`myDesktop.*` / `myServer.*`), and adds host-specific settings
|
||||||
|
- `home.nix` — host-specific home-manager config (merged with `hosts/home.nix` for desktops or `hosts/home_server.nix` for servers)
|
||||||
|
- `hardware-configuration.nix` — generated hardware config
|
||||||
|
|
||||||
|
Shared host-level files:
|
||||||
|
- `hosts/configuration_common.nix` — applied to every host: SSH (key-only, no root), locale, nix GC/settings, zsh, fonts, auto-upgrade flake URL
|
||||||
|
- `hosts/home.nix` — desktop home-manager base
|
||||||
|
- `hosts/home_server.nix` — server home-manager base
|
||||||
|
|
||||||
|
### Module System
|
||||||
|
|
||||||
|
Two top-level NixOS modules expose all major knobs as typed options:
|
||||||
|
|
||||||
|
**`modules/desktop/default.nix`** — `myDesktop.*`
|
||||||
|
- `windowManager`: `"niri"` (default) | `"sway"` | `"kde"`
|
||||||
|
- `cpu`: `"amd"` | `"intel"` | `"none"` — selects KVM kernel params
|
||||||
|
- `virtualisation.enable` — podman (docker-compat) + qemu/libvirt + virt-manager
|
||||||
|
- `syncthing.{enable,devices,folders}`
|
||||||
|
- `openrgb.{enable,motherboard}`
|
||||||
|
- `laptop.{enable,lidSwitch,hibernateDelaySec}`
|
||||||
|
- `nitrokey.enable`
|
||||||
|
- `niri.hotkeyVariant`: `"default"` | `"lifebook"`
|
||||||
|
- `git.signingKey` — SSH key for commit signing
|
||||||
|
- `extraSystemPackages`
|
||||||
|
|
||||||
|
**`modules/server/default.nix`** — `myServer.*`
|
||||||
|
- `sshPort` (default 2220)
|
||||||
|
- `virtualisation.{enable,cpu}` — podman only (no libvirt)
|
||||||
|
- `fail2ban.enable`
|
||||||
|
- `autoUpgrade.enable` (default true)
|
||||||
|
- `uid`, `sudoRequiresPassword`, `extraGroups`, `extraSystemPackages`
|
||||||
|
|
||||||
|
Service bundles are imported as lists in host `default.nix`:
|
||||||
|
- `modules/services/server/` — kabtop services (gitea, nextcloud, matrix, coturn, hydra, mealie, etc.)
|
||||||
|
- `modules/services/nas/` — jupiter services (nfs, vaultwarden, syncthing, paperless)
|
||||||
|
- `modules/services/dmz/` — dmz services (gitea runner microVM)
|
||||||
|
- `modules/services/kabtopci/` — kabtopci services (hydra, gitea runner)
|
||||||
|
- `modules/services/nasbackup/` — nasbak backup jobs
|
||||||
|
|
||||||
|
### Secrets (agenix)
|
||||||
|
|
||||||
|
`secrets/secrets.nix` declares which age public keys (users + host SSH keys) can decrypt each `.age` file. Add a new host: add its `ssh-ed25519` host key to `secrets/secrets.nix` in the relevant groups, then run `agenix -r` to re-key.
|
||||||
|
|
||||||
|
### Custom Packages & Overlays
|
||||||
|
|
||||||
|
- `packages/` — custom packages (e.g. `corosync-qdevice`), imported at `flake.nix` level
|
||||||
|
- `overlays/` — nixpkgs overlays applied globally
|
||||||
|
- Per-host overlays: set `nixpkgs.overlays` inside the host's `default.nix` so only that host is affected
|
||||||
|
|
||||||
|
### Disk Layouts
|
||||||
|
|
||||||
|
`disko/` contains reusable disko modules: `btrfs.nix`, `btrfs_luks.nix`, `nas_luks.nix` — referenced during initial install.
|
||||||
|
|
||||||
|
## Active Hosts
|
||||||
|
|
||||||
|
| Host | Role | WM / Notes |
|
||||||
|
|---|---|---|
|
||||||
|
| hades | Desktop | niri, AMD, Secure Boot (lanzaboote) |
|
||||||
|
| lifebook | Laptop | niri, Intel, Secure Boot |
|
||||||
|
| steamdeck | Gaming | KDE/Jovian-NixOS, Secure Boot |
|
||||||
|
| kabtop | Main server | gitea, nextcloud, matrix+bridges, coturn, hydra, mealie |
|
||||||
|
| kabtopci | CI server | hydra, nix-serve |
|
||||||
|
| jupiter | NAS | nfs, vaultwarden, syncthing, paperless |
|
||||||
|
| dmz | DMZ | gitea Actions homerunner microVM |
|
||||||
|
| nasbak | NAS backup | — |
|
||||||
|
| kubemaster-1 | K8s master | — |
|
||||||
|
|
||||||
|
See `SERVICES.md` for port-level service details per host.
|
||||||
15
flake.nix
15
flake.nix
@@ -5,7 +5,6 @@
|
|||||||
# flake.nix *
|
# flake.nix *
|
||||||
# ├─ ./hosts
|
# ├─ ./hosts
|
||||||
# │ └─ default.nix
|
# │ └─ default.nix
|
||||||
|
|
||||||
{
|
{
|
||||||
description = "Kabbone's personal NixOS Flake config";
|
description = "Kabbone's personal NixOS Flake config";
|
||||||
|
|
||||||
@@ -21,12 +20,14 @@
|
|||||||
|
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
|
||||||
home-manager = { # User Package Management
|
home-manager = {
|
||||||
|
# User Package Management
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager-unstable = { # User Package Management
|
home-manager-unstable = {
|
||||||
|
# User Package Management
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
};
|
};
|
||||||
@@ -50,7 +51,6 @@
|
|||||||
url = "github:noctalia-dev/noctalia-shell";
|
url = "github:noctalia-dev/noctalia-shell";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
@@ -67,8 +67,7 @@
|
|||||||
lanzaboote,
|
lanzaboote,
|
||||||
noctalia,
|
noctalia,
|
||||||
...
|
...
|
||||||
} @ inputs:
|
} @ inputs: let
|
||||||
let
|
|
||||||
systems = [
|
systems = [
|
||||||
# "aarch64-linux"
|
# "aarch64-linux"
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
@@ -91,9 +90,9 @@
|
|||||||
# These are usually stuff you would upstream into home-manager
|
# These are usually stuff you would upstream into home-manager
|
||||||
#homeManagerModules = import ./modules/home-manager;
|
#homeManagerModules = import ./modules/home-manager;
|
||||||
|
|
||||||
|
|
||||||
nixosConfigurations = ( # NixOS configurations
|
nixosConfigurations = ( # NixOS configurations
|
||||||
import ./hosts { # Imports ./hosts/default.nix
|
import ./hosts {
|
||||||
|
# Imports ./hosts/default.nix
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
inherit inputs nixpkgs nixpkgs-unstable nixos-hardware home-manager home-manager-unstable agenix jovian-nixos microvm impermanence lanzaboote; # Also inherit home-manager so it does not need to be defined here.
|
inherit inputs nixpkgs nixpkgs-unstable nixos-hardware home-manager home-manager-unstable agenix jovian-nixos microvm impermanence lanzaboote; # Also inherit home-manager so it does not need to be defined here.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,16 @@
|
|||||||
# Common configuration shared by all hosts (desktop and server).
|
# Common configuration shared by all hosts (desktop and server).
|
||||||
# Imported by configuration_desktop.nix and configuration_server.nix.
|
# Imported by configuration_desktop.nix and configuration_server.nix.
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, inputs, user, location, agenix, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
user,
|
||||||
|
location,
|
||||||
|
agenix,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../modules/hardware/hydraCache.nix
|
../modules/hardware/hydraCache.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -2,10 +2,16 @@
|
|||||||
# Server configuration. Imports configuration_common.nix for shared settings.
|
# Server configuration. Imports configuration_common.nix for shared settings.
|
||||||
# Service modules are imported per-host.
|
# Service modules are imported per-host.
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, inputs, user, location, agenix, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
user,
|
||||||
|
location,
|
||||||
|
agenix,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./configuration_common.nix
|
./configuration_common.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -12,10 +12,21 @@
|
|||||||
# ├─ ./default.nix
|
# ├─ ./default.nix
|
||||||
# └─ ./home.nix
|
# └─ ./home.nix
|
||||||
#
|
#
|
||||||
|
{
|
||||||
{ lib, inputs, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, agenix, jovian-nixos, microvm, impermanence, lanzaboote, ... }:
|
lib,
|
||||||
|
inputs,
|
||||||
let
|
nixpkgs,
|
||||||
|
nixpkgs-unstable,
|
||||||
|
nixos-hardware,
|
||||||
|
home-manager,
|
||||||
|
home-manager-unstable,
|
||||||
|
agenix,
|
||||||
|
jovian-nixos,
|
||||||
|
microvm,
|
||||||
|
impermanence,
|
||||||
|
lanzaboote,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
# Default user — desktop hosts share this; server hosts may override per-host
|
# Default user — desktop hosts share this; server hosts may override per-host
|
||||||
# by passing a different `user` value in their own specialArgs block.
|
# by passing a different `user` value in their own specialArgs block.
|
||||||
defaultUser = "kabbone";
|
defaultUser = "kabbone";
|
||||||
@@ -30,7 +41,10 @@ let
|
|||||||
|
|
||||||
pkgs-kabbone = import ../packages {
|
pkgs-kabbone = import ../packages {
|
||||||
inherit system;
|
inherit system;
|
||||||
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
@@ -55,13 +69,16 @@ let
|
|||||||
home-manager.users.${user}.imports = hmImports;
|
home-manager.users.${user}.imports = hmImports;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
in {
|
||||||
in
|
hades = lib.nixosSystem {
|
||||||
{
|
# Desktop profile
|
||||||
hades = lib.nixosSystem { # Desktop profile
|
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs location nixos-hardware agenix microvm nixpkgs lanzaboote; user = defaultUser; };
|
specialArgs = {
|
||||||
modules = [
|
inherit inputs location nixos-hardware agenix microvm nixpkgs lanzaboote;
|
||||||
|
user = defaultUser;
|
||||||
|
};
|
||||||
|
modules =
|
||||||
|
[
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
microvm.nixosModules.host
|
microvm.nixosModules.host
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
@@ -71,106 +88,155 @@ in
|
|||||||
nixos-hardware.nixosModules.common-cpu-amd
|
nixos-hardware.nixosModules.common-cpu-amd
|
||||||
nixos-hardware.nixosModules.common-gpu-amd
|
nixos-hardware.nixosModules.common-gpu-amd
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
] ++ (mkHM home-manager defaultUser [ ./home.nix ./desktop/home.nix ]);
|
]
|
||||||
|
++ (mkHM home-manager defaultUser [./home.nix ./desktop/home.nix]);
|
||||||
};
|
};
|
||||||
|
|
||||||
lifebook = lib.nixosSystem { # Laptop profile
|
lifebook = lib.nixosSystem {
|
||||||
|
# Laptop profile
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs location nixos-hardware agenix lanzaboote; user = defaultUser; };
|
specialArgs = {
|
||||||
modules = [
|
inherit inputs location nixos-hardware agenix lanzaboote;
|
||||||
|
user = defaultUser;
|
||||||
|
};
|
||||||
|
modules =
|
||||||
|
[
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
./lifebook # myDesktop options set inside
|
./lifebook # myDesktop options set inside
|
||||||
./configuration_common.nix
|
./configuration_common.nix
|
||||||
nixos-hardware.nixosModules.common-cpu-intel
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
] ++ (mkHM home-manager defaultUser [ ./home.nix ./lifebook/home.nix ]);
|
]
|
||||||
|
++ (mkHM home-manager defaultUser [./home.nix ./lifebook/home.nix]);
|
||||||
};
|
};
|
||||||
|
|
||||||
steamdeck = nixpkgs-unstable.lib.nixosSystem { # steamdeck profile
|
steamdeck = nixpkgs-unstable.lib.nixosSystem {
|
||||||
|
# steamdeck profile
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs location nixos-hardware agenix jovian-nixos lanzaboote; user = defaultUser; };
|
specialArgs = {
|
||||||
modules = [
|
inherit inputs location nixos-hardware agenix jovian-nixos lanzaboote;
|
||||||
|
user = defaultUser;
|
||||||
|
};
|
||||||
|
modules =
|
||||||
|
[
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
jovian-nixos.nixosModules.default
|
jovian-nixos.nixosModules.default
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
./steamdeck
|
./steamdeck
|
||||||
./configuration_common.nix
|
./configuration_common.nix
|
||||||
] ++ (mkHM home-manager-unstable defaultUser [ ./home.nix ./steamdeck/home.nix ]);
|
]
|
||||||
|
++ (mkHM home-manager-unstable defaultUser [./home.nix ./steamdeck/home.nix]);
|
||||||
};
|
};
|
||||||
|
|
||||||
kabtop = lib.nixosSystem { # Server profile
|
kabtop = lib.nixosSystem {
|
||||||
|
# Server profile
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs location nixos-hardware agenix impermanence; user = defaultUser; };
|
specialArgs = {
|
||||||
modules = [
|
inherit inputs location nixos-hardware agenix impermanence;
|
||||||
|
user = defaultUser;
|
||||||
|
};
|
||||||
|
modules =
|
||||||
|
[
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
microvm.nixosModules.host
|
microvm.nixosModules.host
|
||||||
./kabtop
|
./kabtop
|
||||||
./configuration_common.nix
|
./configuration_common.nix
|
||||||
nixos-hardware.nixosModules.common-cpu-amd
|
nixos-hardware.nixosModules.common-cpu-amd
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
] ++ (mkHM home-manager defaultUser [ ./home_server.nix ./kabtop/home.nix ]);
|
]
|
||||||
|
++ (mkHM home-manager defaultUser [./home_server.nix ./kabtop/home.nix]);
|
||||||
};
|
};
|
||||||
|
|
||||||
nasbak = lib.nixosSystem { # Server profile
|
nasbak = lib.nixosSystem {
|
||||||
|
# Server profile
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs location nixos-hardware agenix; user = defaultUser; };
|
specialArgs = {
|
||||||
modules = [
|
inherit inputs location nixos-hardware agenix;
|
||||||
|
user = defaultUser;
|
||||||
|
};
|
||||||
|
modules =
|
||||||
|
[
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
./nasbackup
|
./nasbackup
|
||||||
./configuration_common.nix
|
./configuration_common.nix
|
||||||
nixos-hardware.nixosModules.common-cpu-intel
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
] ++ (mkHM home-manager defaultUser [ ./home_server.nix ./nasbackup/home.nix ]);
|
]
|
||||||
|
++ (mkHM home-manager defaultUser [./home_server.nix ./nasbackup/home.nix]);
|
||||||
};
|
};
|
||||||
|
|
||||||
jupiter = lib.nixosSystem { # Server profile
|
jupiter = lib.nixosSystem {
|
||||||
|
# Server profile
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs location nixos-hardware agenix; user = defaultUser; };
|
specialArgs = {
|
||||||
modules = [
|
inherit inputs location nixos-hardware agenix;
|
||||||
|
user = defaultUser;
|
||||||
|
};
|
||||||
|
modules =
|
||||||
|
[
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
./jupiter
|
./jupiter
|
||||||
./configuration_common.nix
|
./configuration_common.nix
|
||||||
nixos-hardware.nixosModules.common-cpu-intel
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
] ++ (mkHM home-manager defaultUser [ ./home_server.nix ./jupiter/home.nix ]);
|
]
|
||||||
|
++ (mkHM home-manager defaultUser [./home_server.nix ./jupiter/home.nix]);
|
||||||
};
|
};
|
||||||
|
|
||||||
kabtopci = lib.nixosSystem { # Server profile
|
kabtopci = lib.nixosSystem {
|
||||||
|
# Server profile
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs location nixos-hardware agenix impermanence; user = defaultUser; };
|
specialArgs = {
|
||||||
modules = [
|
inherit inputs location nixos-hardware agenix impermanence;
|
||||||
|
user = defaultUser;
|
||||||
|
};
|
||||||
|
modules =
|
||||||
|
[
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
microvm.nixosModules.host
|
microvm.nixosModules.host
|
||||||
./kabtopci
|
./kabtopci
|
||||||
./configuration_common.nix
|
./configuration_common.nix
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
] ++ (mkHM home-manager defaultUser [ ./home_server.nix ./kabtopci/home.nix ]);
|
]
|
||||||
|
++ (mkHM home-manager defaultUser [./home_server.nix ./kabtopci/home.nix]);
|
||||||
};
|
};
|
||||||
|
|
||||||
kubemaster-1 = lib.nixosSystem { # Server profile
|
kubemaster-1 = lib.nixosSystem {
|
||||||
|
# Server profile
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs location nixos-hardware agenix impermanence; user = defaultUser; };
|
specialArgs = {
|
||||||
modules = [
|
inherit inputs location nixos-hardware agenix impermanence;
|
||||||
|
user = defaultUser;
|
||||||
|
};
|
||||||
|
modules =
|
||||||
|
[
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
microvm.nixosModules.host
|
microvm.nixosModules.host
|
||||||
./kubemaster-1
|
./kubemaster-1
|
||||||
./configuration_common.nix
|
./configuration_common.nix
|
||||||
nixos-hardware.nixosModules.common-cpu-intel
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
] ++ (mkHM home-manager defaultUser [ ./home_server.nix ./kubemaster-1/home.nix ]);
|
]
|
||||||
|
++ (mkHM home-manager defaultUser [./home_server.nix ./kubemaster-1/home.nix]);
|
||||||
};
|
};
|
||||||
|
|
||||||
dmz = lib.nixosSystem { # Server profile
|
dmz = lib.nixosSystem {
|
||||||
|
# Server profile
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit inputs location nixos-hardware agenix impermanence; user = defaultUser; };
|
specialArgs = {
|
||||||
modules = [
|
inherit inputs location nixos-hardware agenix impermanence;
|
||||||
|
user = defaultUser;
|
||||||
|
};
|
||||||
|
modules =
|
||||||
|
[
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
microvm.nixosModules.host
|
microvm.nixosModules.host
|
||||||
./dmz
|
./dmz
|
||||||
./configuration_common.nix
|
./configuration_common.nix
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
] ++ (mkHM home-manager defaultUser [ ./home_server.nix ./dmz/home.nix ]);
|
]
|
||||||
|
++ (mkHM home-manager defaultUser [./home_server.nix ./dmz/home.nix]);
|
||||||
};
|
};
|
||||||
|
|
||||||
# vm = lib.nixosSystem { # VM profile
|
# vm = lib.nixosSystem { # VM profile
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#
|
#
|
||||||
# Hades desktop — system configuration
|
# Hades desktop — system configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
{ lib, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# Example: host-specific overlays — only hades gets these packages in its pkgs.
|
# Example: host-specific overlays — only hades gets these packages in its pkgs.
|
||||||
# nixpkgs.overlays = [
|
# nixpkgs.overlays = [
|
||||||
# (final: prev: {
|
# (final: prev: {
|
||||||
|
|||||||
@@ -10,12 +10,16 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")] ++
|
[(modulesPath + "/installer/scan/not-detected.nix")]
|
||||||
[( import ../../modules/hardware/backup.nix )];
|
++ [(import ../../modules/hardware/backup.nix)];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod"];
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod"];
|
||||||
boot.initrd.kernelModules = ["vfio_pci" "vfio" "vfio_iommu_type1"];
|
boot.initrd.kernelModules = ["vfio_pci" "vfio" "vfio_iommu_type1"];
|
||||||
@@ -94,60 +98,59 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/root" =
|
fileSystems."/mnt/snapshots/root" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part1";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part1";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/Pluto" =
|
fileSystems."/mnt/Pluto" = {
|
||||||
{ device = "jupiter:/Pluto";
|
device = "jupiter:/Pluto";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
options = ["noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/Mars" =
|
fileSystems."/mnt/Mars" = {
|
||||||
{ device = "jupiter:/Mars";
|
device = "jupiter:/Mars";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
options = ["noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
swapDevices = [{device = "/swap/swapfile";}];
|
swapDevices = [{device = "/swap/swapfile";}];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|||||||
@@ -2,10 +2,7 @@
|
|||||||
# Hades desktop — home-manager host-specific additions
|
# Hades desktop — home-manager host-specific additions
|
||||||
# (WM home config is loaded by modules/desktop based on myDesktop.windowManager)
|
# (WM home config is loaded by modules/desktop based on myDesktop.windowManager)
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/home.nix # cmds / theme options
|
../../modules/home.nix # cmds / theme options
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
#
|
#
|
||||||
# DMZ — demilitarised zone server configuration
|
# DMZ — demilitarised zone server configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, pkgs, user, agenix, impermanence, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
config,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
agenix,
|
||||||
|
impermanence,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports =
|
||||||
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/server
|
../../modules/server
|
||||||
] ++ (import ../../modules/services/dmz);
|
]
|
||||||
|
++ (import ../../modules/services/dmz);
|
||||||
|
|
||||||
# ── Server module options ───────────────────────────────────────────────
|
# ── Server module options ───────────────────────────────────────────────
|
||||||
myServer.virtualisation.enable = true;
|
myServer.virtualisation.enable = true;
|
||||||
|
|||||||
@@ -10,11 +10,15 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk"];
|
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk"];
|
||||||
@@ -33,44 +37,44 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var" =
|
fileSystems."/var" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@var,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@var,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/root" =
|
fileSystems."/mnt/snapshots/root" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
@@ -103,5 +107,4 @@
|
|||||||
allowedTCPPorts = [80 443];
|
allowedTCPPorts = [80 443];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,16 +10,13 @@
|
|||||||
# └─ ./hyprland
|
# └─ ./hyprland
|
||||||
# └─ hyprland.nix
|
# └─ hyprland.nix
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
imports = [
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
../../modules/home.nix # Window Manager
|
../../modules/home.nix # Window Manager
|
||||||
];
|
];
|
||||||
|
|
||||||
home = { # Specific packages for laptop
|
home = {
|
||||||
|
# Specific packages for laptop
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Applications
|
# Applications
|
||||||
|
|
||||||
@@ -32,5 +29,4 @@
|
|||||||
programs = {
|
programs = {
|
||||||
alacritty.settings.font.size = 11;
|
alacritty.settings.font.size = 11;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,21 +16,32 @@
|
|||||||
# └─ ./hardware
|
# └─ ./hardware
|
||||||
# └─ default.nix
|
# └─ default.nix
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, nixpkgs, pkgs, user, lib, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = # For now, if applying to other system, swap files
|
config,
|
||||||
[(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
nixpkgs,
|
||||||
[(import ../../modules/wm/sway/default.nix)] ++ # Window Manager
|
pkgs,
|
||||||
(import ../../modules/wm/virtualisation) ++ # libvirt + Docker
|
user,
|
||||||
[(import ../../modules/wm/virtualisation/kvm-amd.nix)] ++ # kvm module options
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports =
|
||||||
|
# For now, if applying to other system, swap files
|
||||||
|
[(import ./hardware-configuration.nix)]
|
||||||
|
++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
||||||
|
[(import ../../modules/wm/sway/default.nix)]
|
||||||
|
++ # Window Manager
|
||||||
|
(import ../../modules/wm/virtualisation)
|
||||||
|
++ # libvirt + Docker
|
||||||
|
[(import ../../modules/wm/virtualisation/kvm-amd.nix)]
|
||||||
|
++ # kvm module options
|
||||||
(import ../../modules/hardware); # Hardware devices
|
(import ../../modules/hardware); # Hardware devices
|
||||||
|
|
||||||
boot = { # Boot options
|
boot = {
|
||||||
|
# Boot options
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
loader = { # EFI Boot
|
loader = {
|
||||||
|
# EFI Boot
|
||||||
systemd-boot.enable = lib.mkForce false;
|
systemd-boot.enable = lib.mkForce false;
|
||||||
efi = {
|
efi = {
|
||||||
canTouchEfiVariables = true;
|
canTouchEfiVariables = true;
|
||||||
@@ -64,15 +75,16 @@
|
|||||||
services = {
|
services = {
|
||||||
#auto-cpufreq.enable = true;
|
#auto-cpufreq.enable = true;
|
||||||
blueman.enable = true;
|
blueman.enable = true;
|
||||||
avahi = { # Needed to find wireless printer
|
avahi = {
|
||||||
|
# Needed to find wireless printer
|
||||||
enable = true;
|
enable = true;
|
||||||
nssmdns4 = true;
|
nssmdns4 = true;
|
||||||
publish = { # Needed for detecting the scanner
|
publish = {
|
||||||
|
# Needed for detecting the scanner
|
||||||
enable = true;
|
enable = true;
|
||||||
addresses = true;
|
addresses = true;
|
||||||
userServices = true;
|
userServices = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,16 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")] ++
|
[(modulesPath + "/installer/scan/not-detected.nix")]
|
||||||
[( import ../../modules/hardware/backup.nix )];
|
++ [(import ../../modules/hardware/backup.nix)];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod"];
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod"];
|
||||||
boot.initrd.kernelModules = ["vfio_pci" "vfio" "vfio_iommu_type1"];
|
boot.initrd.kernelModules = ["vfio_pci" "vfio" "vfio_iommu_type1"];
|
||||||
@@ -59,48 +63,47 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/root" =
|
fileSystems."/mnt/snapshots/root" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part2";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part1";
|
device = "/dev/disk/by-id/nvme-ADATA_SX8200PNP_2J3320119186-part1";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
swapDevices = [{device = "/swap/swapfile";}];
|
swapDevices = [{device = "/swap/swapfile";}];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|||||||
@@ -10,18 +10,15 @@
|
|||||||
# └─ ./hyprland
|
# └─ ./hyprland
|
||||||
# └─ hyprland.nix
|
# └─ hyprland.nix
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
imports = [
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
#../../modules/wm/hyprland/home.nix # Window Manager
|
#../../modules/wm/hyprland/home.nix # Window Manager
|
||||||
#../../modules/wm/kde/home.nix # Window Manager
|
#../../modules/wm/kde/home.nix # Window Manager
|
||||||
../../modules/home.nix # Window Manager
|
../../modules/home.nix # Window Manager
|
||||||
];
|
];
|
||||||
|
|
||||||
home = { # Specific packages for laptop
|
home = {
|
||||||
|
# Specific packages for laptop
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Applications
|
# Applications
|
||||||
#firefox
|
#firefox
|
||||||
@@ -35,11 +32,11 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services = { # Applets
|
services = {
|
||||||
|
# Applets
|
||||||
#blueman-applet.enable = true; # Bluetooth
|
#blueman-applet.enable = true; # Bluetooth
|
||||||
network-manager-applet.enable = true; # Network
|
network-manager-applet.enable = true; # Network
|
||||||
};
|
};
|
||||||
|
|
||||||
xsession.preferStatusNotifierItems = true;
|
xsession.preferStatusNotifierItems = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,16 +14,19 @@
|
|||||||
# └─ ./shell
|
# └─ ./shell
|
||||||
# └─ default.nix
|
# └─ default.nix
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, user, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports =
|
imports =
|
||||||
(import ../modules/editors) ++
|
(import ../modules/editors)
|
||||||
(import ../modules/programs) ++
|
++ (import ../modules/programs)
|
||||||
(import ../modules/programs/configs) ++
|
++ (import ../modules/programs/configs)
|
||||||
(import ../modules/services) ++
|
++ (import ../modules/services)
|
||||||
(import ../modules/shell);
|
++ (import ../modules/shell);
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = "${user}";
|
username = "${user}";
|
||||||
@@ -117,7 +120,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# gtk = { # Theming
|
# gtk = { # Theming
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# theme = {
|
# theme = {
|
||||||
|
|||||||
@@ -14,12 +14,17 @@
|
|||||||
# └─ ./shell
|
# └─ ./shell
|
||||||
# └─ default.nix
|
# └─ default.nix
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, user, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = # Home Manager Modules
|
config,
|
||||||
(import ../modules/editors) ++
|
lib,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports =
|
||||||
|
# Home Manager Modules
|
||||||
|
(import ../modules/editors)
|
||||||
|
++
|
||||||
#(import ../modules/programs) ++
|
#(import ../modules/programs) ++
|
||||||
#(import ../modules/programs/configs) ++
|
#(import ../modules/programs/configs) ++
|
||||||
#(import ../modules/services) ++
|
#(import ../modules/services) ++
|
||||||
@@ -48,7 +53,6 @@
|
|||||||
rsync # Syncer $ rsync -r dir1/ dir2/
|
rsync # Syncer $ rsync -r dir1/ dir2/
|
||||||
#unzip # Zip files
|
#unzip # Zip files
|
||||||
#unrar # Rar files
|
#unrar # Rar files
|
||||||
|
|
||||||
];
|
];
|
||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
#
|
#
|
||||||
# Jupiter — NAS server configuration
|
# Jupiter — NAS server configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, pkgs, inputs, user, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
user,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports =
|
||||||
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/server
|
../../modules/server
|
||||||
] ++ (import ../../modules/services/nas);
|
]
|
||||||
|
++ (import ../../modules/services/nas);
|
||||||
|
|
||||||
# ── Server module options ───────────────────────────────────────────────
|
# ── Server module options ───────────────────────────────────────────────
|
||||||
# No virtualisation on the NAS
|
# No virtualisation on the NAS
|
||||||
|
|||||||
@@ -10,12 +10,16 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports =
|
imports =
|
||||||
[(modulesPath + "/profiles/qemu-guest.nix")] ++
|
[(modulesPath + "/profiles/qemu-guest.nix")]
|
||||||
[( import ../../modules/hardware/backup.nix )];
|
++ [(import ../../modules/hardware/backup.nix)];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk"];
|
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk"];
|
||||||
boot.initrd.kernelModules = [];
|
boot.initrd.kernelModules = [];
|
||||||
@@ -112,78 +116,78 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/root" =
|
fileSystems."/mnt/snapshots/root" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/Mars" =
|
fileSystems."/mnt/snapshots/Mars" = {
|
||||||
{ device = "/dev/disk/by-label/MARS";
|
device = "/dev/disk/by-label/MARS";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/Pluto" =
|
fileSystems."/mnt/snapshots/Pluto" = {
|
||||||
{ device = "/dev/disk/by-label/NAS-RAID";
|
device = "/dev/disk/by-label/NAS-RAID";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd:8,noatime,subvolid=5"];
|
options = ["compress=zstd:8,noatime,subvolid=5"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/Pluto" =
|
fileSystems."/mnt/Pluto" = {
|
||||||
{ device = "/dev/disk/by-label/NAS-RAID";
|
device = "/dev/disk/by-label/NAS-RAID";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd:8,noatime,subvol=@"];
|
options = ["compress=zstd:8,noatime,subvol=@"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/Mars" =
|
fileSystems."/mnt/Mars" = {
|
||||||
{ device = "/dev/disk/by-label/MARS";
|
device = "/dev/disk/by-label/MARS";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nas,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nas,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
device = "/dev/disk/by-label/NIXBOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/export/Pluto" =
|
fileSystems."/export/Pluto" = {
|
||||||
{ device = "/mnt/Pluto";
|
device = "/mnt/Pluto";
|
||||||
options = ["bind"];
|
options = ["bind"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/export/Mars" =
|
fileSystems."/export/Mars" = {
|
||||||
{ device = "/mnt/Mars";
|
device = "/mnt/Mars";
|
||||||
options = ["bind"];
|
options = ["bind"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -234,5 +238,4 @@
|
|||||||
${pkgs.hdparm}/sbin/hdparm -S 150 /dev/disk/by-uuid/57e6446d-faca-4b67-9063-e8d9afb80088
|
${pkgs.hdparm}/sbin/hdparm -S 150 /dev/disk/by-uuid/57e6446d-faca-4b67-9063-e8d9afb80088
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,16 +10,13 @@
|
|||||||
# └─ ./hyprland
|
# └─ ./hyprland
|
||||||
# └─ hyprland.nix
|
# └─ hyprland.nix
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
imports = [
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
../../modules/home.nix # Window Manager
|
../../modules/home.nix # Window Manager
|
||||||
];
|
];
|
||||||
|
|
||||||
home = { # Specific packages for laptop
|
home = {
|
||||||
|
# Specific packages for laptop
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Applications
|
# Applications
|
||||||
|
|
||||||
@@ -32,5 +29,4 @@
|
|||||||
programs = {
|
programs = {
|
||||||
alacritty.settings.font.size = 11;
|
alacritty.settings.font.size = 11;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
#
|
#
|
||||||
# Kabtop — server configuration
|
# Kabtop — server configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, pkgs, user, agenix, impermanence, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
config,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
agenix,
|
||||||
|
impermanence,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports =
|
||||||
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/server
|
../../modules/server
|
||||||
] ++ (import ../../modules/services/server);
|
]
|
||||||
|
++ (import ../../modules/services/server);
|
||||||
|
|
||||||
# ── Server module options ───────────────────────────────────────────────
|
# ── Server module options ───────────────────────────────────────────────
|
||||||
myServer.virtualisation.enable = true;
|
myServer.virtualisation.enable = true;
|
||||||
|
|||||||
@@ -10,11 +10,15 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "ahci" "sd_mod" "sr_mod"];
|
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "ahci" "sd_mod" "sr_mod"];
|
||||||
@@ -61,49 +65,48 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var" =
|
fileSystems."/var" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["space_cache=v2,ssd,noatime,subvol=@var,discard=async"];
|
options = ["space_cache=v2,ssd,noatime,subvol=@var,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/root" =
|
fileSystems."/mnt/snapshots/root" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#swapDevices = [ { device = "/swap/swapfile"; } ];
|
#swapDevices = [ { device = "/swap/swapfile"; } ];
|
||||||
swapDevices = [];
|
swapDevices = [];
|
||||||
|
|
||||||
@@ -144,6 +147,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,16 +10,13 @@
|
|||||||
# └─ ./hyprland
|
# └─ ./hyprland
|
||||||
# └─ hyprland.nix
|
# └─ hyprland.nix
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
imports = [
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
../../modules/home.nix # Window Manager
|
../../modules/home.nix # Window Manager
|
||||||
];
|
];
|
||||||
|
|
||||||
home = { # Specific packages for laptop
|
home = {
|
||||||
|
# Specific packages for laptop
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Applications
|
# Applications
|
||||||
|
|
||||||
@@ -32,5 +29,4 @@
|
|||||||
programs = {
|
programs = {
|
||||||
alacritty.settings.font.size = 11;
|
alacritty.settings.font.size = 11;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
#
|
#
|
||||||
# Kabtopci — CI server configuration
|
# Kabtopci — CI server configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, pkgs, user, agenix, impermanence, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
config,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
agenix,
|
||||||
|
impermanence,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports =
|
||||||
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/server
|
../../modules/server
|
||||||
] ++ (import ../../modules/services/kabtopci);
|
]
|
||||||
|
++ (import ../../modules/services/kabtopci);
|
||||||
|
|
||||||
# ── Server module options ───────────────────────────────────────────────
|
# ── Server module options ───────────────────────────────────────────────
|
||||||
myServer.virtualisation.enable = true;
|
myServer.virtualisation.enable = true;
|
||||||
|
|||||||
@@ -10,11 +10,14 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")];
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["ata_piix" "virtio_pci" "virtio_scsi" "xhci_pci" "sr_mod" "virtio_blk"];
|
boot.initrd.availableKernelModules = ["ata_piix" "virtio_pci" "virtio_scsi" "xhci_pci" "sr_mod" "virtio_blk"];
|
||||||
boot.initrd.kernelModules = ["vfio_pci" "vfio" "vfio_iommu_type1"];
|
boot.initrd.kernelModules = ["vfio_pci" "vfio" "vfio_iommu_type1"];
|
||||||
@@ -32,38 +35,38 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var" =
|
fileSystems."/var" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["space_cache=v2,ssd,noatime,subvol=@var,discard=async"];
|
options = ["space_cache=v2,ssd,noatime,subvol=@var,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd:9,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd:9,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
||||||
};
|
};
|
||||||
@@ -80,14 +83,18 @@
|
|||||||
interfaces = {
|
interfaces = {
|
||||||
ens3 = {
|
ens3 = {
|
||||||
useDHCP = false; # For versatility sake, manually edit IP on nm-applet.
|
useDHCP = false; # For versatility sake, manually edit IP on nm-applet.
|
||||||
ipv4.addresses = [ {
|
ipv4.addresses = [
|
||||||
|
{
|
||||||
address = "195.90.221.87";
|
address = "195.90.221.87";
|
||||||
prefixLength = 22;
|
prefixLength = 22;
|
||||||
} ];
|
}
|
||||||
ipv6.addresses = [ {
|
];
|
||||||
|
ipv6.addresses = [
|
||||||
|
{
|
||||||
address = "2a00:6800:3:d5b::2";
|
address = "2a00:6800:3:d5b::2";
|
||||||
prefixLength = 64;
|
prefixLength = 64;
|
||||||
} ];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
defaultGateway = "195.90.220.1";
|
defaultGateway = "195.90.220.1";
|
||||||
|
|||||||
@@ -10,16 +10,13 @@
|
|||||||
# └─ ./hyprland
|
# └─ ./hyprland
|
||||||
# └─ hyprland.nix
|
# └─ hyprland.nix
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
imports = [
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
../../modules/home.nix # Window Manager
|
../../modules/home.nix # Window Manager
|
||||||
];
|
];
|
||||||
|
|
||||||
home = { # Specific packages for laptop
|
home = {
|
||||||
|
# Specific packages for laptop
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Applications
|
# Applications
|
||||||
|
|
||||||
@@ -32,5 +29,4 @@
|
|||||||
programs = {
|
programs = {
|
||||||
alacritty.settings.font.size = 11;
|
alacritty.settings.font.size = 11;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
#
|
#
|
||||||
# Kubemaster-1 — Kubernetes master server configuration
|
# Kubemaster-1 — Kubernetes master server configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, pkgs, user, agenix, impermanence, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
config,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
agenix,
|
||||||
|
impermanence,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports =
|
||||||
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/server
|
../../modules/server
|
||||||
] ++ (import ../../modules/services/kubemaster);
|
]
|
||||||
|
++ (import ../../modules/services/kubemaster);
|
||||||
|
|
||||||
# ── Server module options ───────────────────────────────────────────────
|
# ── Server module options ───────────────────────────────────────────────
|
||||||
myServer.virtualisation.enable = true;
|
myServer.virtualisation.enable = true;
|
||||||
|
|||||||
@@ -10,11 +10,15 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod"];
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod"];
|
||||||
@@ -33,44 +37,44 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var" =
|
fileSystems."/var" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@var,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@var,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/root" =
|
fileSystems."/mnt/snapshots/root" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
@@ -113,5 +117,4 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,16 +10,13 @@
|
|||||||
# └─ ./hyprland
|
# └─ ./hyprland
|
||||||
# └─ hyprland.nix
|
# └─ hyprland.nix
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
imports = [
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
../../modules/home.nix # Window Manager
|
../../modules/home.nix # Window Manager
|
||||||
];
|
];
|
||||||
|
|
||||||
home = { # Specific packages for laptop
|
home = {
|
||||||
|
# Specific packages for laptop
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Applications
|
# Applications
|
||||||
|
|
||||||
@@ -32,5 +29,4 @@
|
|||||||
programs = {
|
programs = {
|
||||||
alacritty.settings.font.size = 11;
|
alacritty.settings.font.size = 11;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#
|
#
|
||||||
# Lifebook laptop — system configuration
|
# Lifebook laptop — system configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
{ lib, pkgs, user, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/desktop
|
../../modules/desktop
|
||||||
|
|||||||
@@ -10,12 +10,16 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")] ++
|
[(modulesPath + "/installer/scan/not-detected.nix")]
|
||||||
[( import ../../modules/hardware/backup.nix )];
|
++ [(import ../../modules/hardware/backup.nix)];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd = {
|
initrd = {
|
||||||
@@ -43,7 +47,6 @@
|
|||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
btrfs.autoScrub = {
|
btrfs.autoScrub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -154,76 +157,73 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
device = "/dev/disk/by-label/NIXBOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/opt" =
|
fileSystems."/opt" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@opt,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@opt,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var" =
|
fileSystems."/var" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@var,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@var,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/root" =
|
fileSystems."/mnt/snapshots/root" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/Pluto" = {
|
||||||
fileSystems."/mnt/Pluto" =
|
device = "jupiter.home.opel-online.de:/Pluto";
|
||||||
{ device = "jupiter.home.opel-online.de:/Pluto";
|
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
options = ["nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/Mars" =
|
fileSystems."/mnt/Mars" = {
|
||||||
{ device = "jupiter.home.opel-online.de:/Mars";
|
device = "jupiter.home.opel-online.de:/Mars";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
options = ["nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
swapDevices = [{device = "/swap/swapfile";}];
|
swapDevices = [{device = "/swap/swapfile";}];
|
||||||
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
useDHCP = false; # Deprecated
|
useDHCP = false; # Deprecated
|
||||||
hostName = "lifebook";
|
hostName = "lifebook";
|
||||||
|
|||||||
@@ -2,10 +2,7 @@
|
|||||||
# Lifebook laptop — home-manager host-specific additions
|
# Lifebook laptop — home-manager host-specific additions
|
||||||
# (WM home config is loaded by modules/desktop based on myDesktop.windowManager)
|
# (WM home config is loaded by modules/desktop based on myDesktop.windowManager)
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/home.nix # cmds / theme options
|
../../modules/home.nix # cmds / theme options
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
#
|
#
|
||||||
# Nasbak — NAS backup server configuration
|
# Nasbak — NAS backup server configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, pkgs, user, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
config,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports =
|
||||||
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/server
|
../../modules/server
|
||||||
] ++ (import ../../modules/services/nasbackup);
|
]
|
||||||
|
++ (import ../../modules/services/nasbackup);
|
||||||
|
|
||||||
# ── Server module options ───────────────────────────────────────────────
|
# ── Server module options ───────────────────────────────────────────────
|
||||||
# No virtualisation on the backup NAS
|
# No virtualisation on the backup NAS
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# Hardware settings for Teclast F5 10" Laptop
|
# Hardware settings for Teclast F5 10" Laptop
|
||||||
# NixOS @ sda2
|
# NixOS @ sda2
|
||||||
#
|
#
|
||||||
@@ -10,11 +9,15 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod"];
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod"];
|
||||||
@@ -139,39 +142,38 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
fileSystems."/" =
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/root" =
|
fileSystems."/mnt/snapshots/root" = {
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
@@ -182,14 +184,14 @@
|
|||||||
# options = [ "compress=zstd,space_cache=v2,noatime,subvolid=5" ];
|
# options = [ "compress=zstd,space_cache=v2,noatime,subvolid=5" ];
|
||||||
# };
|
# };
|
||||||
#
|
#
|
||||||
fileSystems."/mnt/nas" =
|
fileSystems."/mnt/nas" = {
|
||||||
{ device = "/dev/disk/by-uuid/70523c79-ef5c-40f2-8782-60fc86bb445b";
|
device = "/dev/disk/by-uuid/70523c79-ef5c-40f2-8782-60fc86bb445b";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd:9,space_cache=v2,noatime,subvol=@nasbak"];
|
options = ["compress=zstd:9,space_cache=v2,noatime,subvol=@nasbak"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
device = "/dev/disk/by-label/NIXBOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -229,5 +231,4 @@
|
|||||||
# ${pkgs.hdparm}/sbin/hdparm -S 150 /dev/disk/by-uuid/b9edc489-ac37-4b28-981d-442722df7ae2
|
# ${pkgs.hdparm}/sbin/hdparm -S 150 /dev/disk/by-uuid/b9edc489-ac37-4b28-981d-442722df7ae2
|
||||||
# '';
|
# '';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,16 +10,13 @@
|
|||||||
# └─ ./hyprland
|
# └─ ./hyprland
|
||||||
# └─ hyprland.nix
|
# └─ hyprland.nix
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
imports = [
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
../../modules/home.nix # Window Manager
|
../../modules/home.nix # Window Manager
|
||||||
];
|
];
|
||||||
|
|
||||||
home = { # Specific packages for laptop
|
home = {
|
||||||
|
# Specific packages for laptop
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Applications
|
# Applications
|
||||||
|
|
||||||
@@ -32,5 +29,4 @@
|
|||||||
programs = {
|
programs = {
|
||||||
alacritty.settings.font.size = 11;
|
alacritty.settings.font.size = 11;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,23 +16,32 @@
|
|||||||
# └─ ./hardware
|
# └─ ./hardware
|
||||||
# └─ default.nix
|
# └─ default.nix
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, pkgs, user, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = # For now, if applying to other system, swap files
|
config,
|
||||||
[(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
pkgs,
|
||||||
|
user,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports =
|
||||||
|
# For now, if applying to other system, swap files
|
||||||
|
[(import ./hardware-configuration.nix)]
|
||||||
|
++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
||||||
|
|
||||||
#[(import ../../modules/wm/hyprland/default.nix)] ++ # Window Manager
|
#[(import ../../modules/wm/hyprland/default.nix)] ++ # Window Manager
|
||||||
# [(import ../../modules/wm/sway/default.nix)] ++ # Window Manager
|
# [(import ../../modules/wm/sway/default.nix)] ++ # Window Manager
|
||||||
[(import ../../modules/wm/virtualisation/docker.nix)] ++ # Docker
|
[(import ../../modules/wm/virtualisation/docker.nix)]
|
||||||
[(import ../../modules/wm/virtualisation/kvm-intel.nix)] ++ # kvm module options
|
++ # Docker
|
||||||
(import ../../modules/hardware) ++
|
[(import ../../modules/wm/virtualisation/kvm-intel.nix)]
|
||||||
(import ../../modules/services/printer); # Hardware devices
|
++ # kvm module options
|
||||||
|
(import ../../modules/hardware)
|
||||||
|
++ (import ../../modules/services/printer); # Hardware devices
|
||||||
|
|
||||||
boot = { # Boot options
|
boot = {
|
||||||
|
# Boot options
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
loader = { # EFI Boot
|
loader = {
|
||||||
|
# EFI Boot
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi = {
|
efi = {
|
||||||
canTouchEfiVariables = true;
|
canTouchEfiVariables = true;
|
||||||
@@ -48,7 +57,8 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = { # No xbacklight, this is the alterantive
|
programs = {
|
||||||
|
# No xbacklight, this is the alterantive
|
||||||
light.enable = true;
|
light.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -63,10 +73,12 @@
|
|||||||
logind.lidSwitch = "suspend-then-hibernate"; # Laptop does not go to sleep when lid is closed
|
logind.lidSwitch = "suspend-then-hibernate"; # Laptop does not go to sleep when lid is closed
|
||||||
#auto-cpufreq.enable = true;
|
#auto-cpufreq.enable = true;
|
||||||
blueman.enable = true;
|
blueman.enable = true;
|
||||||
avahi = { # Needed to find wireless printer
|
avahi = {
|
||||||
|
# Needed to find wireless printer
|
||||||
enable = true;
|
enable = true;
|
||||||
nssmdns4 = true;
|
nssmdns4 = true;
|
||||||
publish = { # Needed for detecting the scanner
|
publish = {
|
||||||
|
# Needed for detecting the scanner
|
||||||
enable = true;
|
enable = true;
|
||||||
addresses = true;
|
addresses = true;
|
||||||
userServices = true;
|
userServices = true;
|
||||||
|
|||||||
@@ -10,11 +10,15 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
@@ -74,63 +78,61 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/mapper/root";
|
device = "/dev/mapper/root";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/mapper/root";
|
device = "/dev/mapper/root";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/mapper/root";
|
device = "/dev/mapper/root";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/opt" =
|
fileSystems."/opt" = {
|
||||||
{ device = "/dev/mapper/root";
|
device = "/dev/mapper/root";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@opt,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@opt,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/mapper/root";
|
device = "/dev/mapper/root";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/root" =
|
fileSystems."/mnt/snapshots/root" = {
|
||||||
{ device = "/dev/mapper/root";
|
device = "/dev/mapper/root";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-label/BOOT";
|
device = "/dev/disk/by-label/BOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/Pluto" =
|
fileSystems."/mnt/Pluto" = {
|
||||||
{ device = "jupiter:/Pluto";
|
device = "jupiter:/Pluto";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
options = ["noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/Mars" =
|
fileSystems."/mnt/Mars" = {
|
||||||
{ device = "jupiter:/Mars";
|
device = "jupiter:/Mars";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
options = ["noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
swapDevices = [];
|
swapDevices = [];
|
||||||
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
useDHCP = false; # Deprecated
|
useDHCP = false; # Deprecated
|
||||||
hostName = "nbf5";
|
hostName = "nbf5";
|
||||||
|
|||||||
@@ -10,18 +10,15 @@
|
|||||||
# └─ ./hyprland
|
# └─ ./hyprland
|
||||||
# └─ hyprland.nix
|
# └─ hyprland.nix
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
imports = [
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
#../../modules/wm/hyprland/home.nix # Window Manager
|
#../../modules/wm/hyprland/home.nix # Window Manager
|
||||||
#../../modules/wm/sway/home.nix # Window Manager
|
#../../modules/wm/sway/home.nix # Window Manager
|
||||||
../../modules/home.nix # Window Manager
|
../../modules/home.nix # Window Manager
|
||||||
];
|
];
|
||||||
|
|
||||||
home = { # Specific packages for laptop
|
home = {
|
||||||
|
# Specific packages for laptop
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# Applications
|
# Applications
|
||||||
firefox
|
firefox
|
||||||
@@ -41,11 +38,11 @@
|
|||||||
alacritty.settings.font.size = 11;
|
alacritty.settings.font.size = 11;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = { # Applets
|
services = {
|
||||||
|
# Applets
|
||||||
blueman-applet.enable = true; # Bluetooth
|
blueman-applet.enable = true; # Bluetooth
|
||||||
network-manager-applet.enable = true; # Network
|
network-manager-applet.enable = true; # Network
|
||||||
};
|
};
|
||||||
|
|
||||||
xsession.preferStatusNotifierItems = true;
|
xsession.preferStatusNotifierItems = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
#
|
#
|
||||||
# Steamdeck — system configuration
|
# Steamdeck — system configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
{ lib, pkgs, user, jovian-nixos, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
jovian-nixos,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/desktop
|
../../modules/desktop
|
||||||
|
|||||||
@@ -10,11 +10,15 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
@@ -111,49 +115,49 @@
|
|||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
device = "/dev/disk/by-label/NIXBOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv" =
|
fileSystems."/srv" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/opt" =
|
fileSystems."/opt" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@opt,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvol=@opt,discard=async"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/snapshots/root" =
|
fileSystems."/mnt/snapshots/root" = {
|
||||||
{ device = "/dev/mapper/crypted";
|
device = "/dev/mapper/crypted";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async"];
|
||||||
};
|
};
|
||||||
@@ -164,22 +168,20 @@
|
|||||||
# options = [ "nofail,noauto,users,x-systemd.automount" ];
|
# options = [ "nofail,noauto,users,x-systemd.automount" ];
|
||||||
# };
|
# };
|
||||||
|
|
||||||
fileSystems."/mnt/Pluto" =
|
fileSystems."/mnt/Pluto" = {
|
||||||
{ device = "jupiter:/Pluto";
|
device = "jupiter:/Pluto";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
options = ["nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/Mars" =
|
fileSystems."/mnt/Mars" = {
|
||||||
{ device = "jupiter:/Mars";
|
device = "jupiter:/Mars";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
options = ["nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
swapDevices = [{device = "/swap/swapfile";}];
|
swapDevices = [{device = "/swap/swapfile";}];
|
||||||
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
useDHCP = false; # Deprecated
|
useDHCP = false; # Deprecated
|
||||||
hostName = "steamdeck";
|
hostName = "steamdeck";
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Home-manager configuration for steamdeck
|
# Home-manager configuration for steamdeck
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
specialisation = {
|
specialisation = {
|
||||||
sway.configuration = {
|
sway.configuration = {
|
||||||
imports = [(import ../../modules/wm/sway/home.nix)];
|
imports = [(import ../../modules/wm/sway/home.nix)];
|
||||||
@@ -12,8 +9,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
imports =
|
imports =
|
||||||
[ (import ../../modules/home.nix) ] ++
|
[(import ../../modules/home.nix)]
|
||||||
[ (import ../../modules/wm/steam/home.nix) ];
|
++ [(import ../../modules/wm/steam/home.nix)];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk"];
|
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk"];
|
||||||
@@ -13,8 +17,8 @@
|
|||||||
boot.kernelModules = ["kvm-intel"];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-label/nixos";
|
device = "/dev/disk/by-label/nixos";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd,space_cache=v2,ssd,noatime"];
|
options = ["compress=zstd,space_cache=v2,ssd,noatime"];
|
||||||
};
|
};
|
||||||
@@ -25,8 +29,8 @@
|
|||||||
# options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home" ];
|
# options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home" ];
|
||||||
# };
|
# };
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-label/BOOT";
|
device = "/dev/disk/by-label/BOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -28,20 +28,22 @@
|
|||||||
#
|
#
|
||||||
# myDesktop.extraSystemPackages = with pkgs; [ some-tool ];
|
# myDesktop.extraSystemPackages = with pkgs; [ some-tool ];
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, inputs, user, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.myDesktop;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
user,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.myDesktop;
|
||||||
|
in {
|
||||||
# Hardware modules that are always useful on desktops (bluetooth, …)
|
# Hardware modules that are always useful on desktops (bluetooth, …)
|
||||||
imports = (import ../hardware);
|
imports = import ../hardware;
|
||||||
|
|
||||||
# ── Options ──────────────────────────────────────────────────────────────
|
# ── Options ──────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
options.myDesktop = with lib; {
|
options.myDesktop = with lib; {
|
||||||
|
|
||||||
windowManager = mkOption {
|
windowManager = mkOption {
|
||||||
type = types.enum ["niri" "sway" "kde"];
|
type = types.enum ["niri" "sway" "kde"];
|
||||||
default = "niri";
|
default = "niri";
|
||||||
@@ -62,14 +64,16 @@ in
|
|||||||
devices = mkOption {
|
devices = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
default = {};
|
default = {};
|
||||||
example = literalExpression
|
example =
|
||||||
|
literalExpression
|
||||||
''{ "jupiter.home.example.de" = { id = "XXXXX-XXXXX-XXXXX-..."; }; }'';
|
''{ "jupiter.home.example.de" = { id = "XXXXX-XXXXX-XXXXX-..."; }; }'';
|
||||||
description = "Syncthing peer devices.";
|
description = "Syncthing peer devices.";
|
||||||
};
|
};
|
||||||
folders = mkOption {
|
folders = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
default = {};
|
default = {};
|
||||||
example = literalExpression
|
example =
|
||||||
|
literalExpression
|
||||||
''{ "Sync" = { path = "/home/user/Sync"; devices = [ "jupiter" ]; ignorePerms = false; }; }'';
|
''{ "Sync" = { path = "/home/user/Sync"; devices = [ "jupiter" ]; ignorePerms = false; }; }'';
|
||||||
description = "Syncthing shared folders.";
|
description = "Syncthing shared folders.";
|
||||||
};
|
};
|
||||||
@@ -122,15 +126,23 @@ in
|
|||||||
# ── Configuration ────────────────────────────────────────────────────────
|
# ── Configuration ────────────────────────────────────────────────────────
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
|
|
||||||
# ── Base desktop config (replaces configuration_desktop.nix) ───────────
|
# ── Base desktop config (replaces configuration_desktop.nix) ───────────
|
||||||
{
|
{
|
||||||
users.users.${user} = {
|
users.users.${user} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
uid = 2000;
|
uid = 2000;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel" "video" "audio" "camera" "networkmanager"
|
"wheel"
|
||||||
"lp" "kvm" "libvirtd" "adb" "dialout" "tss"
|
"video"
|
||||||
|
"audio"
|
||||||
|
"camera"
|
||||||
|
"networkmanager"
|
||||||
|
"lp"
|
||||||
|
"kvm"
|
||||||
|
"libvirtd"
|
||||||
|
"adb"
|
||||||
|
"dialout"
|
||||||
|
"tss"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -228,8 +240,7 @@ in
|
|||||||
greetd = {
|
greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
useTextGreeter = true;
|
useTextGreeter = true;
|
||||||
settings.default_session.command =
|
settings.default_session.command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd niri-session";
|
||||||
"${pkgs.tuigreet}/bin/tuigreet --time --cmd niri-session";
|
|
||||||
};
|
};
|
||||||
tuned.enable = true;
|
tuned.enable = true;
|
||||||
upower.enable = true;
|
upower.enable = true;
|
||||||
@@ -238,8 +249,7 @@ in
|
|||||||
programs = {
|
programs = {
|
||||||
niri.enable = true;
|
niri.enable = true;
|
||||||
ssh.enableAskPassword = true;
|
ssh.enableAskPassword = true;
|
||||||
ssh.askPassword =
|
ssh.askPassword = "${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass";
|
||||||
"${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Noctalia shell + niri home config via home-manager
|
# Noctalia shell + niri home config via home-manager
|
||||||
@@ -271,26 +281,49 @@ in
|
|||||||
showCapsule = false;
|
showCapsule = false;
|
||||||
widgets = {
|
widgets = {
|
||||||
left = [
|
left = [
|
||||||
{ id = "ControlCenter"; useDistroLogo = true; }
|
{
|
||||||
{ hideUnoccupied = false; id = "Workspace";
|
id = "ControlCenter";
|
||||||
labelMode = "index"; showApplications = true; }
|
useDistroLogo = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
hideUnoccupied = false;
|
||||||
|
id = "Workspace";
|
||||||
|
labelMode = "index";
|
||||||
|
showApplications = true;
|
||||||
|
}
|
||||||
{id = "ActiveWindow";}
|
{id = "ActiveWindow";}
|
||||||
];
|
];
|
||||||
center = [
|
center = [
|
||||||
{ formatHorizontal = "HH:mm\\ndd-MM-yy";
|
{
|
||||||
|
formatHorizontal = "HH:mm\\ndd-MM-yy";
|
||||||
formatVertical = "HH mm";
|
formatVertical = "HH mm";
|
||||||
id = "Clock";
|
id = "Clock";
|
||||||
useMonospacedFont = true;
|
useMonospacedFont = true;
|
||||||
usePrimaryColor = true; }
|
usePrimaryColor = true;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
right = [
|
right = [
|
||||||
{id = "MediaMini";}
|
{id = "MediaMini";}
|
||||||
{ id = "SystemMonitor"; showNetworkStats = true; compactMode = false; }
|
{
|
||||||
|
id = "SystemMonitor";
|
||||||
|
showNetworkStats = true;
|
||||||
|
compactMode = false;
|
||||||
|
}
|
||||||
{id = "WiFi";}
|
{id = "WiFi";}
|
||||||
{id = "Bluetooth";}
|
{id = "Bluetooth";}
|
||||||
{ id = "Battery"; displayMode = "icon-always"; hideIfNotDetected = true; }
|
{
|
||||||
{ id = "Volume"; displayMode = "alwaysShow"; }
|
id = "Battery";
|
||||||
{ id = "NotificationHistory"; hideWhenZero = true; }
|
displayMode = "icon-always";
|
||||||
|
hideIfNotDetected = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "Volume";
|
||||||
|
displayMode = "alwaysShow";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "NotificationHistory";
|
||||||
|
hideWhenZero = true;
|
||||||
|
}
|
||||||
{id = "Tray";}
|
{id = "Tray";}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -390,8 +423,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
ssh.enableAskPassword = true;
|
ssh.enableAskPassword = true;
|
||||||
ssh.askPassword =
|
ssh.askPassword = "${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass";
|
||||||
"${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
@@ -507,8 +539,7 @@ in
|
|||||||
|
|
||||||
# ── Laptop ─────────────────────────────────────────────────────────────
|
# ── Laptop ─────────────────────────────────────────────────────────────
|
||||||
(lib.mkIf cfg.laptop.enable {
|
(lib.mkIf cfg.laptop.enable {
|
||||||
systemd.sleep.extraConfig =
|
systemd.sleep.extraConfig = "HibernateDelaySec=${cfg.laptop.hibernateDelaySec}";
|
||||||
"HibernateDelaySec=${cfg.laptop.hibernateDelaySec}";
|
|
||||||
services.logind.settings.Login.HandleLidSwitch =
|
services.logind.settings.Login.HandleLidSwitch =
|
||||||
cfg.laptop.lidSwitch;
|
cfg.laptop.lidSwitch;
|
||||||
})
|
})
|
||||||
@@ -517,6 +548,5 @@ in
|
|||||||
(lib.mkIf cfg.nitrokey.enable {
|
(lib.mkIf cfg.nitrokey.enable {
|
||||||
hardware.nitrokey.enable = true;
|
hardware.nitrokey.enable = true;
|
||||||
})
|
})
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
# └─ ...
|
# └─ ...
|
||||||
#
|
#
|
||||||
|
|
||||||
[
|
[
|
||||||
./nvim
|
./nvim
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ nvim, ... }:
|
{nvim, ...}: {
|
||||||
{
|
|
||||||
# Import all your configuration modules here
|
# Import all your configuration modules here
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Neovim
|
# Neovim
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = [pkgs.gnvim];
|
packages = [pkgs.gnvim];
|
||||||
};
|
};
|
||||||
@@ -161,4 +157,3 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.btrbk = {
|
services.btrbk = {
|
||||||
sshAccess = [
|
sshAccess = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hsphfpd.enable = false; # HSP & HFP daemon
|
hsphfpd.enable = false; # HSP & HFP daemon
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
@@ -15,5 +17,4 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
{ pkgs, config, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
users.users.nixremote = { # System User
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
users.users.nixremote = {
|
||||||
|
# System User
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "nixremote";
|
group = "nixremote";
|
||||||
extraGroups = ["kvm"];
|
extraGroups = ["kvm"];
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
nix = {
|
nix = {
|
||||||
distributedBuilds = false;
|
distributedBuilds = false;
|
||||||
buildMachines = [ {
|
buildMachines = [
|
||||||
|
{
|
||||||
hostName = "hades";
|
hostName = "hades";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
supportedFeatures = ["kvm" "big-parallel"];
|
supportedFeatures = ["kvm" "big-parallel"];
|
||||||
@@ -14,7 +17,8 @@
|
|||||||
speedFactor = 4;
|
speedFactor = 4;
|
||||||
publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUVnbld5UVVVYSt2Y0hBS3g2ZWRiVGdxVzhwaCtNQ2lTNmZVd1lqWWNTK28gcm9vdEBoYWRlcwo=%";
|
publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUVnbld5UVVVYSt2Y0hBS3g2ZWRiVGdxVzhwaCtNQ2lTNmZVd1lqWWNTK28gcm9vdEBoYWRlcwo=%";
|
||||||
protocol = "ssh-ng";
|
protocol = "ssh-ng";
|
||||||
} ];
|
}
|
||||||
|
];
|
||||||
settings = {
|
settings = {
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
"hades-builder:AFdPgi6Qq/yKqc2V2imgzMikEkVEFCrDaHyAmOJ3MII="
|
"hades-builder:AFdPgi6Qq/yKqc2V2imgzMikEkVEFCrDaHyAmOJ3MII="
|
||||||
|
|||||||
@@ -1,31 +1,75 @@
|
|||||||
{ lib, options, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
options,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
options = with lib; {
|
options = with lib; {
|
||||||
cmds = {
|
cmds = {
|
||||||
shell = mkOption { type = types.str; default = "zsh"; };
|
shell = mkOption {
|
||||||
fetch = mkOption { type = types.str; default = "hyfetch"; };
|
type = types.str;
|
||||||
editor = mkOption { type = types.str; default = "nvim"; };
|
default = "zsh";
|
||||||
|
};
|
||||||
|
fetch = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "hyfetch";
|
||||||
|
};
|
||||||
|
editor = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "nvim";
|
||||||
|
};
|
||||||
|
|
||||||
wm = mkOption { type = types.str; default = "sway"; };
|
wm = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "sway";
|
||||||
|
};
|
||||||
|
|
||||||
terminal = mkOption { type = types.str; default = "alacritty"; };
|
terminal = mkOption {
|
||||||
menu = mkOption { type = types.str; default = "rofi -show drun -show-icons"; };
|
type = types.str;
|
||||||
|
default = "alacritty";
|
||||||
|
};
|
||||||
|
menu = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "rofi -show drun -show-icons";
|
||||||
|
};
|
||||||
|
|
||||||
lock = mkOption { type = types.str; default = "locksway"; };
|
lock = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "locksway";
|
||||||
|
};
|
||||||
notifications = {
|
notifications = {
|
||||||
volume = mkOption { type = types.str; default = "volume-notify"; };
|
volume = mkOption {
|
||||||
brightness = mkOption { type = types.str; default = "brightness-notify"; };
|
type = types.str;
|
||||||
|
default = "volume-notify";
|
||||||
|
};
|
||||||
|
brightness = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "brightness-notify";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
is-wayland = mkOption { type = types.bool; default = true; };
|
is-wayland = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
theme = mkOption { type = types.str; default = "catppuccin-mocha"; };
|
theme = mkOption {
|
||||||
icon-theme = mkOption { type = types.str; default = "Papirus-Dark"; };
|
type = types.str;
|
||||||
font = mkOption { type = types.str; default = "Cascadia Code 11"; };
|
default = "catppuccin-mocha";
|
||||||
wallpaper = mkOption { type = types.str; default = ""; };
|
};
|
||||||
|
icon-theme = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "Papirus-Dark";
|
||||||
|
};
|
||||||
|
font = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "Cascadia Code 11";
|
||||||
|
};
|
||||||
|
wallpaper = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,10 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
pkgs-kabbone,
|
pkgs-kabbone,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.services.corosync-qnetd;
|
cfg = config.services.corosync-qnetd;
|
||||||
dataDir = "/var/run/corosync-qnetd";
|
dataDir = "/var/run/corosync-qnetd";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
# interface
|
# interface
|
||||||
options.services.corosync-qnetd = {
|
options.services.corosync-qnetd = {
|
||||||
enable = lib.mkEnableOption "corosync-qnetd";
|
enable = lib.mkEnableOption "corosync-qnetd";
|
||||||
@@ -45,7 +43,6 @@ in
|
|||||||
# transport: knet
|
# transport: knet
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
|
||||||
# logging {
|
# logging {
|
||||||
# to_syslog: yes
|
# to_syslog: yes
|
||||||
# }
|
# }
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.services.kabbone_mautrix-whatsapp;
|
cfg = config.services.kabbone_mautrix-whatsapp;
|
||||||
dataDir = "/var/lib/mautrix-whatsapp";
|
dataDir = "/var/lib/mautrix-whatsapp";
|
||||||
registrationFile = "${dataDir}/whatsapp-registration.yaml";
|
registrationFile = "${dataDir}/whatsapp-registration.yaml";
|
||||||
@@ -66,9 +65,7 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options.services.kabbone_mautrix-whatsapp = {
|
options.services.kabbone_mautrix-whatsapp = {
|
||||||
enable = lib.mkEnableOption "mautrix-whatsapp, a Matrix-Whatsapp puppeting bridge";
|
enable = lib.mkEnableOption "mautrix-whatsapp, a Matrix-Whatsapp puppeting bridge";
|
||||||
|
|
||||||
@@ -159,7 +156,6 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
users.users.mautrix-whatsapp = {
|
users.users.mautrix-whatsapp = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "mautrix-whatsapp";
|
group = "mautrix-whatsapp";
|
||||||
@@ -178,8 +174,7 @@ in
|
|||||||
|
|
||||||
# Note: this is defined here to avoid the docs depending on `config`
|
# Note: this is defined here to avoid the docs depending on `config`
|
||||||
services.kabbone_mautrix-whatsapp.settings.homeserver = optOneOf (
|
services.kabbone_mautrix-whatsapp.settings.homeserver = optOneOf (
|
||||||
with config.services;
|
with config.services; [
|
||||||
[
|
|
||||||
(lib.mkIf matrix-synapse.enable (mkDefaults {
|
(lib.mkIf matrix-synapse.enable (mkDefaults {
|
||||||
domain = matrix-synapse.settings.server_name;
|
domain = matrix-synapse.settings.server_name;
|
||||||
}))
|
}))
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
# └─ ...
|
# └─ ...
|
||||||
#
|
#
|
||||||
|
|
||||||
[
|
[
|
||||||
./mpv.nix
|
./mpv.nix
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -9,10 +9,7 @@
|
|||||||
# └─ ./configs
|
# └─ ./configs
|
||||||
# └─ mpv.nix *
|
# └─ mpv.nix *
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/mpv/mpv.conf".text = ''
|
".config/mpv/mpv.conf".text = ''
|
||||||
hwdec=vaapi
|
hwdec=vaapi
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
#
|
#
|
||||||
# Firefox Brower Emulator
|
# Firefox Brower Emulator
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
{ pkgs, config, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
#home.packages = [ pkgs.firefox-wayland ];
|
#home.packages = [ pkgs.firefox-wayland ];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|||||||
@@ -16,17 +16,18 @@
|
|||||||
#
|
#
|
||||||
# myServer.extraSystemPackages = with pkgs; [ some-tool ];
|
# myServer.extraSystemPackages = with pkgs; [ some-tool ];
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, user, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.myServer;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.myServer;
|
||||||
|
in {
|
||||||
# ── Options ──────────────────────────────────────────────────────────────
|
# ── Options ──────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
options.myServer = with lib; {
|
options.myServer = with lib; {
|
||||||
|
|
||||||
uid = mkOption {
|
uid = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 3000;
|
default = 3000;
|
||||||
@@ -75,13 +76,11 @@ in
|
|||||||
fail2ban = {
|
fail2ban = {
|
||||||
enable = mkEnableOption "fail2ban intrusion prevention";
|
enable = mkEnableOption "fail2ban intrusion prevention";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# ── Configuration ────────────────────────────────────────────────────────
|
# ── Configuration ────────────────────────────────────────────────────────
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
|
|
||||||
# ── Base server config ────────────────────────────────────────────────
|
# ── Base server config ────────────────────────────────────────────────
|
||||||
{
|
{
|
||||||
users.users.${user} = {
|
users.users.${user} = {
|
||||||
@@ -92,11 +91,13 @@ in
|
|||||||
|
|
||||||
security.sudo.wheelNeedsPassword = cfg.sudoRequiresPassword;
|
security.sudo.wheelNeedsPassword = cfg.sudoRequiresPassword;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs;
|
||||||
|
[
|
||||||
ffmpeg
|
ffmpeg
|
||||||
smartmontools
|
smartmontools
|
||||||
htop
|
htop
|
||||||
] ++ cfg.extraSystemPackages;
|
]
|
||||||
|
++ cfg.extraSystemPackages;
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
ports = [cfg.sshPort];
|
ports = [cfg.sshPort];
|
||||||
@@ -146,6 +147,5 @@ in
|
|||||||
jails.DEFAULT.settings.findtime = "15m";
|
jails.DEFAULT.settings.findtime = "15m";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,10 @@
|
|||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
# └─ ...
|
# └─ ...
|
||||||
#
|
#
|
||||||
|
|
||||||
[
|
[
|
||||||
./microvm.nix
|
./microvm.nix
|
||||||
# ./hydra.nix
|
# ./hydra.nix
|
||||||
]
|
]
|
||||||
|
|
||||||
# picom, polybar and sxhkd are pulled from desktop module
|
# picom, polybar and sxhkd are pulled from desktop module
|
||||||
# redshift temporarely disables
|
# redshift temporarely disables
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
podman = {
|
podman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services = {
|
services = {
|
||||||
hydra = {
|
hydra = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -86,6 +89,4 @@
|
|||||||
file = ../../../secrets/services/acme/opel-online.age;
|
file = ../../../secrets/services/acme/opel-online.age;
|
||||||
owner = "acme";
|
owner = "acme";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,28 @@
|
|||||||
{ config, microvm, lib, pkgs, user, agenix, impermanence, ... }:
|
|
||||||
let
|
|
||||||
name = "gitea-runner";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
microvm,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
agenix,
|
||||||
|
impermanence,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
name = "gitea-runner";
|
||||||
|
in {
|
||||||
microvm = {
|
microvm = {
|
||||||
autostart = [
|
autostart = [
|
||||||
name
|
name
|
||||||
];
|
];
|
||||||
vms = {
|
vms = {
|
||||||
${name} = {
|
${name} = {
|
||||||
|
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
imports =
|
imports =
|
||||||
[ agenix.nixosModules.default ] ++
|
[agenix.nixosModules.default]
|
||||||
[ impermanence.nixosModules.impermanence ] ++
|
++ [impermanence.nixosModules.impermanence]
|
||||||
[( ./gitea_runner.nix )];
|
++ [(./gitea_runner.nix)];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "${name}";
|
hostName = "${name}";
|
||||||
@@ -40,7 +46,8 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.${user} = { # System User
|
users.users.${user} = {
|
||||||
|
# System User
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel"];
|
extraGroups = ["wheel"];
|
||||||
uid = 2000;
|
uid = 2000;
|
||||||
@@ -64,14 +71,16 @@ in
|
|||||||
path = "/persist/etc/ssh/ssh_host_rsa_key";
|
path = "/persist/etc/ssh/ssh_host_rsa_key";
|
||||||
type = "rsa";
|
type = "rsa";
|
||||||
bits = 4096;
|
bits = 4096;
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/persist".neededForBoot = lib.mkForce true;
|
fileSystems."/persist".neededForBoot = lib.mkForce true;
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [ # Default packages install system-wide
|
systemPackages = with pkgs; [
|
||||||
|
# Default packages install system-wide
|
||||||
bash
|
bash
|
||||||
coreutils
|
coreutils
|
||||||
curl
|
curl
|
||||||
@@ -108,8 +117,10 @@ in
|
|||||||
link = "ens18";
|
link = "ens18";
|
||||||
mode = "bridge";
|
mode = "bridge";
|
||||||
};
|
};
|
||||||
} ];
|
}
|
||||||
shares = [{
|
];
|
||||||
|
shares = [
|
||||||
|
{
|
||||||
source = "/nix/store";
|
source = "/nix/store";
|
||||||
mountPoint = "/nix/.ro-store";
|
mountPoint = "/nix/.ro-store";
|
||||||
tag = "ro-store";
|
tag = "ro-store";
|
||||||
@@ -120,7 +131,8 @@ in
|
|||||||
mountPoint = "/persist";
|
mountPoint = "/persist";
|
||||||
tag = "persist";
|
tag = "persist";
|
||||||
proto = "virtiofs";
|
proto = "virtiofs";
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
#writableStoreOverlay = "/nix/.rw-store";
|
#writableStoreOverlay = "/nix/.rw-store";
|
||||||
#storeOnDisk = true;
|
#storeOnDisk = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,11 +9,10 @@
|
|||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
# └─ ...
|
# └─ ...
|
||||||
#
|
#
|
||||||
|
|
||||||
[
|
[
|
||||||
# ./microvm.nix
|
# ./microvm.nix
|
||||||
./hydra.nix
|
./hydra.nix
|
||||||
]
|
]
|
||||||
|
|
||||||
# picom, polybar and sxhkd are pulled from desktop module
|
# picom, polybar and sxhkd are pulled from desktop module
|
||||||
# redshift temporarely disables
|
# redshift temporarely disables
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
podman = {
|
podman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services = {
|
services = {
|
||||||
hydra = {
|
hydra = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -78,5 +81,4 @@
|
|||||||
file = ../../../secrets/keys/nixservepriv.age;
|
file = ../../../secrets/keys/nixservepriv.age;
|
||||||
owner = "hydra";
|
owner = "hydra";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,28 @@
|
|||||||
{ config, microvm, lib, pkgs, user, agenix, impermanence, ... }:
|
|
||||||
let
|
|
||||||
name = "gitea-runner";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
microvm,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
agenix,
|
||||||
|
impermanence,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
name = "gitea-runner";
|
||||||
|
in {
|
||||||
microvm = {
|
microvm = {
|
||||||
autostart = [
|
autostart = [
|
||||||
name
|
name
|
||||||
];
|
];
|
||||||
vms = {
|
vms = {
|
||||||
${name} = {
|
${name} = {
|
||||||
|
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
imports =
|
imports =
|
||||||
[ agenix.nixosModules.default ] ++
|
[agenix.nixosModules.default]
|
||||||
[ impermanence.nixosModules.impermanence ] ++
|
++ [impermanence.nixosModules.impermanence]
|
||||||
[( ./gitea_runner.nix )];
|
++ [(./gitea_runner.nix)];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "${name}";
|
hostName = "${name}";
|
||||||
@@ -40,7 +46,8 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.${user} = { # System User
|
users.users.${user} = {
|
||||||
|
# System User
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel"];
|
extraGroups = ["wheel"];
|
||||||
uid = 2000;
|
uid = 2000;
|
||||||
@@ -64,14 +71,16 @@ in
|
|||||||
path = "/persist/etc/ssh/ssh_host_rsa_key";
|
path = "/persist/etc/ssh/ssh_host_rsa_key";
|
||||||
type = "rsa";
|
type = "rsa";
|
||||||
bits = 4096;
|
bits = 4096;
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/persist".neededForBoot = lib.mkForce true;
|
fileSystems."/persist".neededForBoot = lib.mkForce true;
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [ # Default packages install system-wide
|
systemPackages = with pkgs; [
|
||||||
|
# Default packages install system-wide
|
||||||
bash
|
bash
|
||||||
coreutils
|
coreutils
|
||||||
curl
|
curl
|
||||||
@@ -104,8 +113,10 @@ in
|
|||||||
type = "user";
|
type = "user";
|
||||||
id = "vm-${name}";
|
id = "vm-${name}";
|
||||||
mac = "04:00:00:00:00:02";
|
mac = "04:00:00:00:00:02";
|
||||||
} ];
|
}
|
||||||
shares = [{
|
];
|
||||||
|
shares = [
|
||||||
|
{
|
||||||
source = "/nix/store";
|
source = "/nix/store";
|
||||||
mountPoint = "/nix/.ro-store";
|
mountPoint = "/nix/.ro-store";
|
||||||
tag = "ro-store";
|
tag = "ro-store";
|
||||||
@@ -116,7 +127,8 @@ in
|
|||||||
mountPoint = "/persist";
|
mountPoint = "/persist";
|
||||||
tag = "persist";
|
tag = "persist";
|
||||||
proto = "virtiofs";
|
proto = "virtiofs";
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
#writableStoreOverlay = "/nix/.rw-store";
|
#writableStoreOverlay = "/nix/.rw-store";
|
||||||
#storeOnDisk = true;
|
#storeOnDisk = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
#
|
#
|
||||||
# Screenshots
|
# Screenshots
|
||||||
#
|
#
|
||||||
|
|
||||||
{ pkgs, user, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
services = { # sxhkd shortcut = Printscreen button (Print)
|
pkgs,
|
||||||
|
user,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services = {
|
||||||
|
# sxhkd shortcut = Printscreen button (Print)
|
||||||
gnome-keyring = {
|
gnome-keyring = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,11 +9,10 @@
|
|||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
# └─ ...
|
# └─ ...
|
||||||
#
|
#
|
||||||
|
|
||||||
[
|
[
|
||||||
# ./microvm.nix
|
# ./microvm.nix
|
||||||
# ./hydra.nix
|
# ./hydra.nix
|
||||||
]
|
]
|
||||||
|
|
||||||
# picom, polybar and sxhkd are pulled from desktop module
|
# picom, polybar and sxhkd are pulled from desktop module
|
||||||
# redshift temporarely disables
|
# redshift temporarely disables
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
# └─ ...
|
# └─ ...
|
||||||
#
|
#
|
||||||
|
|
||||||
[
|
[
|
||||||
./nfs.nix
|
./nfs.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
@@ -17,6 +16,6 @@
|
|||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./paperless.nix
|
./paperless.nix
|
||||||
]
|
]
|
||||||
|
|
||||||
# picom, polybar and sxhkd are pulled from desktop module
|
# picom, polybar and sxhkd are pulled from desktop module
|
||||||
# redshift temporarely disables
|
# redshift temporarely disables
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{config, pkgs, lib, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# enable nfs
|
# enable nfs
|
||||||
services.nfs.server = rec {
|
services.nfs.server = rec {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#
|
#
|
||||||
# System notifications
|
# System notifications
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
@@ -57,7 +59,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
defaults = {
|
defaults = {
|
||||||
@@ -87,5 +88,4 @@
|
|||||||
file = ../../../secrets/services/acme/opel-online.age;
|
file = ../../../secrets/services/acme/opel-online.age;
|
||||||
owner = "acme";
|
owner = "acme";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#
|
#
|
||||||
# System notifications
|
# System notifications
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.paperless = {
|
services.paperless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "paperless.home.opel-online.de";
|
domain = "paperless.home.opel-online.de";
|
||||||
@@ -34,5 +36,4 @@
|
|||||||
file = ../../../secrets/services/paperless/pwFile.age;
|
file = ../../../secrets/services/paperless/pwFile.age;
|
||||||
owner = "paperless";
|
owner = "paperless";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#
|
#
|
||||||
# System notifications
|
# System notifications
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
group = "users";
|
group = "users";
|
||||||
@@ -20,7 +22,8 @@
|
|||||||
"lifebook.home.opel-online.de" = {id = "RKPZG3H-BDUZID3-DV26MKR-UOARIQC-JBCAFXP-J5QFM4H-5EGBSM5-VEGXHQ4";};
|
"lifebook.home.opel-online.de" = {id = "RKPZG3H-BDUZID3-DV26MKR-UOARIQC-JBCAFXP-J5QFM4H-5EGBSM5-VEGXHQ4";};
|
||||||
};
|
};
|
||||||
folders = {
|
folders = {
|
||||||
"Sync" = { # Name of folder in Syncthing, also the folder ID
|
"Sync" = {
|
||||||
|
# Name of folder in Syncthing, also the folder ID
|
||||||
path = "/mnt/Mars/${config.services.syncthing.user}/Sync"; # Which folder to add to Syncthing
|
path = "/mnt/Mars/${config.services.syncthing.user}/Sync"; # Which folder to add to Syncthing
|
||||||
devices = ["hades.home.opel-online.de" "lifebook.home.opel-online.de"]; # Which devices to share the folder with
|
devices = ["hades.home.opel-online.de" "lifebook.home.opel-online.de"]; # Which devices to share the folder with
|
||||||
ignorePerms = false; # By default, Syncthing doesn't sync file permissions. This line enables it for this folder.
|
ignorePerms = false; # By default, Syncthing doesn't sync file permissions. This line enables it for this folder.
|
||||||
@@ -49,5 +52,4 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#
|
#
|
||||||
# System notifications
|
# System notifications
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.vaultwarden = {
|
services.vaultwarden = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dbBackend = "sqlite";
|
dbBackend = "sqlite";
|
||||||
@@ -34,5 +36,4 @@
|
|||||||
file = ../../../secrets/services/vaultwarden/environment.age;
|
file = ../../../secrets/services/vaultwarden/environment.age;
|
||||||
owner = "vaultwarden";
|
owner = "vaultwarden";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,9 @@
|
|||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
# └─ ...
|
# └─ ...
|
||||||
#
|
#
|
||||||
|
|
||||||
[
|
[
|
||||||
# ./nfs.nix
|
# ./nfs.nix
|
||||||
]
|
]
|
||||||
|
|
||||||
# picom, polybar and sxhkd are pulled from desktop module
|
# picom, polybar and sxhkd are pulled from desktop module
|
||||||
# redshift temporarely disables
|
# redshift temporarely disables
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,9 @@
|
|||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
# └─ ...
|
# └─ ...
|
||||||
#
|
#
|
||||||
|
|
||||||
[
|
[
|
||||||
./klipper.nix
|
./klipper.nix
|
||||||
]
|
]
|
||||||
|
|
||||||
# picom, polybar and sxhkd are pulled from desktop module
|
# picom, polybar and sxhkd are pulled from desktop module
|
||||||
# redshift temporarely disables
|
# redshift temporarely disables
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
klipperscreen
|
klipperscreen
|
||||||
@@ -97,5 +100,4 @@
|
|||||||
# #server = "https://acme-staging-v02.api.letsencrypt.org/directory";
|
# #server = "https://acme-staging-v02.api.letsencrypt.org/directory";
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#
|
#
|
||||||
# System notifications
|
# System notifications
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
@@ -21,7 +23,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
defaults = {
|
defaults = {
|
||||||
@@ -49,5 +50,4 @@
|
|||||||
file = ../../../secrets/services/acme/opel-online.age;
|
file = ../../../secrets/services/acme/opel-online.age;
|
||||||
owner = "acme";
|
owner = "acme";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{config, pkgs, lib, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# enable coturn
|
# enable coturn
|
||||||
services.coturn = rec {
|
services.coturn = rec {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -43,12 +48,13 @@
|
|||||||
# open the firewall
|
# open the firewall
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
interfaces.ens18 = let
|
interfaces.ens18 = let
|
||||||
range = with config.services.coturn; [ {
|
range = with config.services.coturn; [
|
||||||
|
{
|
||||||
from = min-port;
|
from = min-port;
|
||||||
to = max-port;
|
to = max-port;
|
||||||
} ];
|
}
|
||||||
in
|
];
|
||||||
{
|
in {
|
||||||
allowedUDPPortRanges = range;
|
allowedUDPPortRanges = range;
|
||||||
allowedUDPPorts = [3478];
|
allowedUDPPorts = [3478];
|
||||||
allowedTCPPortRanges = range;
|
allowedTCPPortRanges = range;
|
||||||
@@ -57,7 +63,9 @@
|
|||||||
};
|
};
|
||||||
# get a certificate
|
# get a certificate
|
||||||
security.acme.certs.${config.services.coturn.realm} = {
|
security.acme.certs.${config.services.coturn.realm} = {
|
||||||
/* insert here the right configuration to obtain a certificate */
|
/*
|
||||||
|
insert here the right configuration to obtain a certificate
|
||||||
|
*/
|
||||||
postRun = "systemctl restart coturn.service";
|
postRun = "systemctl restart coturn.service";
|
||||||
group = "turnserver";
|
group = "turnserver";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
# └─ ...
|
# └─ ...
|
||||||
#
|
#
|
||||||
|
|
||||||
[
|
[
|
||||||
./postgresql.nix
|
./postgresql.nix
|
||||||
./gitea.nix
|
./gitea.nix
|
||||||
@@ -21,6 +20,6 @@
|
|||||||
./mealie.nix
|
./mealie.nix
|
||||||
# ./ollama.nix
|
# ./ollama.nix
|
||||||
]
|
]
|
||||||
|
|
||||||
# picom, polybar and sxhkd are pulled from desktop module
|
# picom, polybar and sxhkd are pulled from desktop module
|
||||||
# redshift temporarely disables
|
# redshift temporarely disables
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#
|
#
|
||||||
# System notifications
|
# System notifications
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.gitea = {
|
services.gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dump.enable = false;
|
dump.enable = false;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
podman = {
|
podman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services = {
|
services = {
|
||||||
hydra = {
|
hydra = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -73,5 +76,4 @@
|
|||||||
file = ../../../secrets/keys/nixservepriv.age;
|
file = ../../../secrets/keys/nixservepriv.age;
|
||||||
owner = "hydra";
|
owner = "hydra";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.jitsi-meet = {
|
services.jitsi-meet = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hostName = "meet.kabtop.de";
|
hostName = "meet.kabtop.de";
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#
|
#
|
||||||
# System notifications
|
# System notifications
|
||||||
#
|
#
|
||||||
|
{
|
||||||
{ config, lib, pkgs, ... }:
|
config,
|
||||||
|
lib,
|
||||||
let
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
fqdn = "matrix.${config.networking.domain}";
|
fqdn = "matrix.${config.networking.domain}";
|
||||||
clientConfig = {
|
clientConfig = {
|
||||||
"m.homeserver".base_url = "https://${fqdn}";
|
"m.homeserver".base_url = "https://${fqdn}";
|
||||||
@@ -62,14 +64,21 @@ in {
|
|||||||
server_name = config.networking.domain;
|
server_name = config.networking.domain;
|
||||||
public_baseurl = "https://matrix.${config.networking.domain}";
|
public_baseurl = "https://matrix.${config.networking.domain}";
|
||||||
listeners = [
|
listeners = [
|
||||||
{ port = 8008;
|
{
|
||||||
|
port = 8008;
|
||||||
bind_addresses = ["::1"];
|
bind_addresses = ["::1"];
|
||||||
type = "http";
|
type = "http";
|
||||||
tls = false;
|
tls = false;
|
||||||
x_forwarded = true;
|
x_forwarded = true;
|
||||||
resources = [
|
resources = [
|
||||||
{ names = [ "client" ]; compress = true; }
|
{
|
||||||
{ names = [ "federation" ]; compress = false; }
|
names = ["client"];
|
||||||
|
compress = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
names = ["federation"];
|
||||||
|
compress = false;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.mealie = {
|
services.mealie = {
|
||||||
enable = true;
|
enable = true;
|
||||||
listenAddress = "127.0.0.1";
|
listenAddress = "127.0.0.1";
|
||||||
@@ -32,5 +33,4 @@
|
|||||||
security.acme.defaults.email = "webmaster@kabtop.de";
|
security.acme.defaults.email = "webmaster@kabtop.de";
|
||||||
security.acme.defaults.webroot = "/var/lib/acme/acme-challenge";
|
security.acme.defaults.webroot = "/var/lib/acme/acme-challenge";
|
||||||
security.acme.acceptTerms = true;
|
security.acme.acceptTerms = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,28 @@
|
|||||||
{ config, microvm, lib, pkgs, user, agenix, impermanence, ... }:
|
|
||||||
let
|
|
||||||
name = "gitea-runner";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
microvm,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
user,
|
||||||
|
agenix,
|
||||||
|
impermanence,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
name = "gitea-runner";
|
||||||
|
in {
|
||||||
microvm = {
|
microvm = {
|
||||||
autostart = [
|
autostart = [
|
||||||
name
|
name
|
||||||
];
|
];
|
||||||
vms = {
|
vms = {
|
||||||
${name} = {
|
${name} = {
|
||||||
|
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
imports =
|
imports =
|
||||||
[ agenix.nixosModules.default ] ++
|
[agenix.nixosModules.default]
|
||||||
[ impermanence.nixosModules.impermanence ] ++
|
++ [impermanence.nixosModules.impermanence]
|
||||||
[( ./gitea_runner.nix )];
|
++ [(./gitea_runner.nix)];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "${name}";
|
hostName = "${name}";
|
||||||
@@ -40,7 +46,8 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.${user} = { # System User
|
users.users.${user} = {
|
||||||
|
# System User
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel"];
|
extraGroups = ["wheel"];
|
||||||
uid = 2000;
|
uid = 2000;
|
||||||
@@ -64,14 +71,16 @@ in
|
|||||||
path = "/persist/etc/ssh/ssh_host_rsa_key";
|
path = "/persist/etc/ssh/ssh_host_rsa_key";
|
||||||
type = "rsa";
|
type = "rsa";
|
||||||
bits = 4096;
|
bits = 4096;
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/persist".neededForBoot = lib.mkForce true;
|
fileSystems."/persist".neededForBoot = lib.mkForce true;
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [ # Default packages install system-wide
|
systemPackages = with pkgs; [
|
||||||
|
# Default packages install system-wide
|
||||||
bash
|
bash
|
||||||
coreutils
|
coreutils
|
||||||
curl
|
curl
|
||||||
@@ -104,8 +113,10 @@ in
|
|||||||
type = "user";
|
type = "user";
|
||||||
id = "vm-${name}";
|
id = "vm-${name}";
|
||||||
mac = "04:00:00:00:00:01";
|
mac = "04:00:00:00:00:01";
|
||||||
} ];
|
}
|
||||||
shares = [{
|
];
|
||||||
|
shares = [
|
||||||
|
{
|
||||||
source = "/nix/store";
|
source = "/nix/store";
|
||||||
mountPoint = "/nix/.ro-store";
|
mountPoint = "/nix/.ro-store";
|
||||||
tag = "ro-store";
|
tag = "ro-store";
|
||||||
@@ -116,7 +127,8 @@ in
|
|||||||
mountPoint = "/persist";
|
mountPoint = "/persist";
|
||||||
tag = "persist";
|
tag = "persist";
|
||||||
proto = "virtiofs";
|
proto = "virtiofs";
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
#writableStoreOverlay = "/nix/.rw-store";
|
#writableStoreOverlay = "/nix/.rw-store";
|
||||||
#storeOnDisk = true;
|
#storeOnDisk = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hostName = "cloud.kabtop.de";
|
hostName = "cloud.kabtop.de";
|
||||||
@@ -95,5 +97,4 @@
|
|||||||
security.acme.defaults.email = "webmaster@kabtop.de";
|
security.acme.defaults.email = "webmaster@kabtop.de";
|
||||||
security.acme.defaults.webroot = "/var/lib/acme/acme-challenge";
|
security.acme.defaults.webroot = "/var/lib/acme/acme-challenge";
|
||||||
security.acme.acceptTerms = true;
|
security.acme.acceptTerms = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
ollamahostname = "llm.kabtop.de";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
ollamahostname = "llm.kabtop.de";
|
||||||
|
in {
|
||||||
virtualisation.oci-containers.containers."open-webui" = {
|
virtualisation.oci-containers.containers."open-webui" = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
image = "ghcr.io/open-webui/open-webui:ollama";
|
image = "ghcr.io/open-webui/open-webui:ollama";
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#
|
#
|
||||||
# System notifications
|
# System notifications
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# imports = [ ./postgresql_upgrade.nix ];
|
# imports = [ ./postgresql_upgrade.nix ];
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -50,5 +52,4 @@
|
|||||||
file = ../../../secrets/services/postgresql/initScript.age;
|
file = ../../../secrets/services/postgresql/initScript.age;
|
||||||
owner = "postgres";
|
owner = "postgres";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(let
|
(let
|
||||||
# XXX specify the postgresql package you'd like to upgrade to.
|
# XXX specify the postgresql package you'd like to upgrade to.
|
||||||
@@ -8,7 +12,8 @@
|
|||||||
# pp.plv8
|
# pp.plv8
|
||||||
]);
|
]);
|
||||||
cfg = config.services.postgresql;
|
cfg = config.services.postgresql;
|
||||||
in pkgs.writeScriptBin "upgrade-pg-cluster" ''
|
in
|
||||||
|
pkgs.writeScriptBin "upgrade-pg-cluster" ''
|
||||||
set -eux
|
set -eux
|
||||||
# XXX it's perhaps advisable to stop all services that depend on postgresql
|
# XXX it's perhaps advisable to stop all services that depend on postgresql
|
||||||
systemctl stop postgresql
|
systemctl stop postgresql
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
#
|
#
|
||||||
# CI/CD Woodpecker
|
# CI/CD Woodpecker
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [ # Default packages install system-wide
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Default packages install system-wide
|
||||||
woodpecker-server
|
woodpecker-server
|
||||||
woodpecker-cli
|
woodpecker-cli
|
||||||
];
|
];
|
||||||
@@ -84,6 +87,4 @@
|
|||||||
file = ../../../secrets/services/woodpecker/environment.age;
|
file = ../../../secrets/services/woodpecker/environment.age;
|
||||||
owner = "woodpecker";
|
owner = "woodpecker";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
# └─ ...
|
# └─ ...
|
||||||
#
|
#
|
||||||
|
|
||||||
[
|
[
|
||||||
./git.nix
|
./git.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Tmux
|
# Tmux
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs = {
|
programs = {
|
||||||
tmux = {
|
tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Shell
|
# Shell
|
||||||
#
|
#
|
||||||
|
{pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs = {
|
programs = {
|
||||||
zsh = {
|
zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -12,7 +9,8 @@
|
|||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
history.size = 10000;
|
history.size = 10000;
|
||||||
|
|
||||||
oh-my-zsh = { # Extra plugins for zsh
|
oh-my-zsh = {
|
||||||
|
# Extra plugins for zsh
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = ["git"];
|
plugins = ["git"];
|
||||||
#custom = "$HOME/.config/zsh_nix/custom";
|
#custom = "$HOME/.config/zsh_nix/custom";
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; {
|
||||||
# NOTE: Dynamic imports based on option values are not supported in NixOS modules.
|
# NOTE: Dynamic imports based on option values are not supported in NixOS modules.
|
||||||
# To conditionally load a WM, either import all WM modules and use mkIf in each,
|
# To conditionally load a WM, either import all WM modules and use mkIf in each,
|
||||||
# or select the WM module directly in the host configuration.
|
# or select the WM module directly in the host configuration.
|
||||||
@@ -8,9 +12,18 @@ with lib;
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
desktop = {
|
desktop = {
|
||||||
wm = mkOption { type = types.str; default = "sway"; };
|
wm = mkOption {
|
||||||
taskbar = mkOption { type = types.str; default = "waybar"; };
|
type = types.str;
|
||||||
launcher = mkOption { type = types.str; default = "bemenu"; };
|
default = "sway";
|
||||||
|
};
|
||||||
|
taskbar = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "waybar";
|
||||||
|
};
|
||||||
|
launcher = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "bemenu";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,10 @@
|
|||||||
# └─ ./gnome
|
# └─ ./gnome
|
||||||
# └─ home.nix *
|
# └─ home.nix *
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,12 @@
|
|||||||
# └─ ./sway
|
# └─ ./sway
|
||||||
# └─ home.nix *
|
# └─ home.nix *
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs = {
|
programs = {
|
||||||
swaylock = {
|
swaylock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -30,12 +32,24 @@
|
|||||||
swayidle = {
|
swayidle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
events = [
|
events = [
|
||||||
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; }
|
{
|
||||||
{ event = "lock"; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
|
event = "before-sleep";
|
||||||
|
command = "${pkgs.swaylock}/bin/swaylock";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
event = "lock";
|
||||||
|
command = "${pkgs.swaylock}/bin/swaylock -fF";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{ timeout = 300; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
|
{
|
||||||
{ timeout = 600; command = "${pkgs.niri}/bin/niri msg action power-off-monitors"; }
|
timeout = 300;
|
||||||
|
command = "${pkgs.swaylock}/bin/swaylock -fF";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 600;
|
||||||
|
command = "${pkgs.niri}/bin/niri msg action power-off-monitors";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -43,5 +57,4 @@
|
|||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"niri/config.kdl".source = ./config.kdl;
|
"niri/config.kdl".source = ./config.kdl;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,14 @@
|
|||||||
# └─ ./gnome
|
# └─ ./gnome
|
||||||
# └─ default.nix *
|
# └─ default.nix *
|
||||||
#
|
#
|
||||||
{ config, lib, user, pkgs, jovian-nixos, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
user,
|
||||||
|
pkgs,
|
||||||
|
jovian-nixos,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
(jovian-nixos + "/modules")
|
(jovian-nixos + "/modules")
|
||||||
];
|
];
|
||||||
@@ -38,5 +43,4 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
steamdeck-firmware
|
steamdeck-firmware
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,12 @@
|
|||||||
# └─ ./steam
|
# └─ ./steam
|
||||||
# └─ home.nix *
|
# └─ home.nix *
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
steam
|
steam
|
||||||
|
|||||||
@@ -10,10 +10,14 @@
|
|||||||
# └─ ./hyprland
|
# └─ ./hyprland
|
||||||
# └─ hyprland.nix *
|
# └─ hyprland.nix *
|
||||||
#
|
#
|
||||||
|
|
||||||
{ config, lib, user, pkgs, desktop, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
user,
|
||||||
|
pkgs,
|
||||||
|
desktop,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [../waybar.nix];
|
imports = [../waybar.nix];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
@@ -65,7 +69,8 @@
|
|||||||
|
|
||||||
security.pam.services.swaylock = {};
|
security.pam.services.swaylock = {};
|
||||||
|
|
||||||
xdg.portal = { # Required for flatpak with windowmanagers
|
xdg.portal = {
|
||||||
|
# Required for flatpak with windowmanagers
|
||||||
enable = true;
|
enable = true;
|
||||||
wlr.enable = true;
|
wlr.enable = true;
|
||||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user