Compare commits

...

6 Commits

39 changed files with 114 additions and 61 deletions

42
flake.lock generated
View File

@@ -48,11 +48,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1773892995, "lastModified": 1774690660,
"narHash": "sha256-kRGAztxZcaErtp4FoXnKgOX0OebUdkAIoSXRU1fybKA=", "narHash": "sha256-oMALw/szOKhCXVX00pmITjcHorWPWu2jLRYiV1sWHnI=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "394a8d49da42d2a63e8845c7262c636051f0f823", "rev": "f4fc55e8011f82a9e0d66c610c1bec5274751b10",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -103,11 +103,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773681845, "lastModified": 1774559029,
"narHash": "sha256-o8hrZrigP0JYcwnglCp8Zi8jQafWsxbDtRRPzuVwFxY=", "narHash": "sha256-deix7yg3j6AhjMPnFDCmWB3f83LsajaaULP5HH2j34k=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "0759e0e137305bc9d0c52c204c6d8dffe6f601a6", "rev": "a0bb0d11514f92b639514220114ac8063c72d0a3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -141,11 +141,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1774407052, "lastModified": 1774666183,
"narHash": "sha256-rUkn7Bo3PAlpcZl8+0FDsTwFyDwvS4xwMT9+RJ+XJoE=", "narHash": "sha256-3DNpGXzkyuIu3/gXNtLvB2oSqKY5z1QP5ajy3VZjVV0=",
"owner": "Infinidoge", "owner": "Infinidoge",
"repo": "nix-minecraft", "repo": "nix-minecraft",
"rev": "70daf1f48885f0b4a70797076cd2ff5d9139b46e", "rev": "7bcbe84d765e7fce5e267c569c718d8246336f3b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -156,11 +156,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1773533765, "lastModified": 1774567711,
"narHash": "sha256-qonGfS2lzCgCl59Zl63jF6dIRRpvW3AJooBGMaXjHiY=", "narHash": "sha256-uVlOHBvt6Vc/iYNJXLPa4c3cLXwMllOCVfAaLAcphIo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "f8e82243fd601afb9f59ad230958bd073795cbfe", "rev": "3f6f874dfc34d386d10e434c48ad966c4832243e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -172,11 +172,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1773814637, "lastModified": 1774388614,
"narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=", "narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96", "rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -203,11 +203,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1773821835, "lastModified": 1774386573,
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=", "narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0", "rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -239,11 +239,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773889674, "lastModified": 1774303811,
"narHash": "sha256-+ycaiVAk3MEshJTg35cBTUa0MizGiS+bgpYw/f8ohkg=", "narHash": "sha256-fhG4JAcLgjKwt+XHbjs8brpWnyKUfU4LikLm3s0Q/ic=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "29b6519f3e0780452bca0ac0be4584f04ac16cc5", "rev": "614e256310e0a4f8a9ccae3fa80c11844fba7042",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -28,6 +28,9 @@
programs.zsh.enable = true; programs.zsh.enable = true;
# hive modules # hive modules
hive.hyprland.enable = true;
hive.hyprland.autologin = "jonas";
hive.kwallet.enable = true;
hive.kwallet.forUsers = ["jonas"]; hive.kwallet.forUsers = ["jonas"];
hive.virt-manager.enable = true; hive.virt-manager.enable = true;
hive.virt-manager.forUsers = ["jonas"]; hive.virt-manager.forUsers = ["jonas"];

View File

@@ -49,6 +49,9 @@
]; ];
# hive modules # hive modules
hive.plasma.enable = true;
hive.plasma.autologin = "jonas";
hive.kwallet.enable = true;
hive.kwallet.forUsers = ["jonas"]; hive.kwallet.forUsers = ["jonas"];
hive.virt-manager.enable = true; hive.virt-manager.enable = true;
hive.virt-manager.forUsers = ["jonas"]; hive.virt-manager.forUsers = ["jonas"];

View File

@@ -5,31 +5,34 @@
pkgs, pkgs,
... ...
}: let }: let
cfg = config.hive.displayManager; cfg = config.hive.hyprland;
in { in {
options.hive.displayManager = with lib; { options.hive.hyprland = with lib; {
enable = mkEnableOption "Enable Hyprland Wayland compositor";
autologin = mkOption { autologin = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
description = "The autologin username or null for no autologin."; description = "The autologin username or null for no autologin.";
}; };
}; };
config = { config = lib.mkIf cfg.enable {
services.xserver.enable = true; services.displayManager = {
services.xserver = { autoLogin.enable = cfg.autologin != null;
xkb.layout = "de"; autoLogin.user = cfg.autologin;
xkb.variant = ""; sddm = {
xkb.options = "caps:ctrl_modifier";
};
services.displayManager.autoLogin.enable = cfg.autologin != null;
services.displayManager.autoLogin.user = cfg.autologin;
services.libinput.enable = true;
services.dbus.enable = true;
services.displayManager.sddm = {
enable = true; enable = true;
wayland.enable = true; wayland.enable = true;
}; };
};
programs.hyprland = {
enable = true;
withUWSM = true;
xwayland.enable = true;
};
services.libinput.enable = true;
services.dbus.enable = true;
xdg.portal = { xdg.portal = {
enable = true; enable = true;
@@ -41,14 +44,7 @@
}; };
environment.systemPackages = with pkgs; [spaceFM]; environment.systemPackages = with pkgs; [spaceFM];
services.udisks2.enable = true; services.udisks2.enable = true;
programs.hyprland = {
enable = true;
withUWSM = true;
xwayland.enable = true;
};
programs.hyprlock.enable = true; programs.hyprlock.enable = true;
security.pam.services.hyprlock = {}; security.pam.services.hyprlock = {};
}; };

View File

@@ -8,6 +8,7 @@
cfg = config.hive.kwallet; cfg = config.hive.kwallet;
in { in {
options.hive.kwallet = { options.hive.kwallet = {
enable = lib.mkEnableOption "Enable kwallet integration with pam.";
forUsers = lib.mkOption { forUsers = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
default = []; default = [];
@@ -17,7 +18,7 @@
}; };
}; };
config = { config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs.kdePackages; [ environment.systemPackages = with pkgs.kdePackages; [
kwallet kwallet
kwalletmanager kwalletmanager

View File

@@ -1,15 +1,30 @@
{ {
flake.nixosModules.plasma = {pkgs, ...}: { flake.nixosModules.plasma = {
services.xserver.enable = true; config,
services.xserver = { pkgs,
xkb.layout = "de"; lib,
xkb.variant = ""; ...
xkb.options = "caps:ctrl_modifier"; }: let
cfg = config.hive.plasma;
in {
options.hive.plasma = {
enable = lib.mkEnableOption "Enable Plasma 6 desktop environment";
autologin = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "The autologin username or null for no autologin.";
}; };
services.displayManager.sddm = { };
config = lib.mkIf cfg.enable {
services.displayManager = {
autoLogin.enable = cfg.autologin != null;
autoLogin.user = cfg.autologin;
sddm = {
enable = true; enable = true;
wayland.enable = true; wayland.enable = true;
}; };
};
services.desktopManager.plasma6.enable = true; services.desktopManager.plasma6.enable = true;
xdg.portal = { xdg.portal = {
enable = true; enable = true;
@@ -19,4 +34,5 @@
]; ];
}; };
}; };
};
} }

32
modules/docs.nix Normal file
View File

@@ -0,0 +1,32 @@
{
self,
inputs,
...
}: {
perSystem = {
pkgs,
lib,
system,
...
}: {
packages.docs = let
nixos = inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules =
[
inputs.sops-nix.nixosModules.sops
]
++ lib.attrValues self.nixosModules;
};
doc = pkgs.nixosOptionsDoc {options.hive = nixos.options.hive;};
in
pkgs.stdenvNoCC.mkDerivation {
name = ".hive-docs";
buildCommand = ''
mkdir -p $out
cp ${doc.optionsCommonMark} $out/docs.md
${pkgs.pandoc}/bin/pandoc -o $out/docs.html $out/docs.md
'';
};
};
}

View File

@@ -92,7 +92,7 @@
;;collab ; buffers with friends ;;collab ; buffers with friends
(debugger +realgud +lsp) ; FIXME stepping through code, to help you add bugs (debugger +realgud +lsp) ; FIXME stepping through code, to help you add bugs
;;direnv ;;direnv
;;docker docker
;;editorconfig ; let someone else argue about tabs vs spaces ;;editorconfig ; let someone else argue about tabs vs spaces
ein ; tame Jupyter notebooks with emacs ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls) (eval +overlay) ; run code, run (also, repls)

View File

@@ -56,6 +56,7 @@
imports = [ imports = [
self.nixosModules.bulk-transcode-overlay self.nixosModules.bulk-transcode-overlay
self.nixosModules.unstable-overlay
]; ];
config = { config = {

View File

@@ -28,6 +28,7 @@
description = "The user for the borg repository home."; description = "The user for the borg repository home.";
}; };
repositories = lib.mkOption { repositories = lib.mkOption {
description = "The borg repositories to serve";
type = lib.types.attrsOf (lib.types.submodule { type = lib.types.attrsOf (lib.types.submodule {
options = { options = {
name = lib.mkOption { name = lib.mkOption {