prepare for server config

This commit is contained in:
twoneis 2025-02-06 17:27:03 +01:00
parent d745c36a31
commit 78241b550d
12 changed files with 26 additions and 27 deletions

View file

@ -1,5 +1,9 @@
{ ... }: {
conf = {
ssh.enable = true;
stateVersion = "25.05";
hmStateVersion = "25.05";
};
}

View file

@ -3,8 +3,10 @@
apps.enable = true;
niri.enable = true;
extraLayout.enable = true;
fonts.enbale = true;
secureboot.enable = true;
containers.enable = true;
networkmanager.enable = true;
stateVersion = "24.11";
hmStateVersion = "24.11";

View file

@ -2,6 +2,11 @@
inherit (lib) mkIf;
inherit (config) conf;
mkXwlWrapper = import ../niri/xwl-wrapper.nix;
time = pkgs.makeDesktopItem {
name = "peaclock-desktop";
desktopName = "Time";
exec = "alacritty -e ${pkgs.peaclock}/bin/peaclock";
};
in mkIf conf.apps.enable {
services = {
# Needed for some features in nautilus such as auto-mounting and trash
@ -22,7 +27,9 @@ in mkIf conf.apps.enable {
tor-browser
libreoffice-qt6
chromium
peaclock
] ++ [
time
(mkXwlWrapper { pkgs = pkgs; name = "Prusa"; pkg = "prusa-slicer"; })
(mkXwlWrapper { pkgs = pkgs; name = "Vial"; pkg = "vial"; })
];

View file

@ -12,6 +12,7 @@ in {
./niri
./nix
./secureboot
./ssh
./utils
./vm
];
@ -29,9 +30,5 @@ in {
extraGroups = [ "networkmanager" "wheel" ];
};
hardware.opentabletdriver = {
enable = true;
};
system.stateVersion = conf.stateVersion;
}

View file

@ -1,4 +1,7 @@
{ pkgs, ... }: {
{ lib, config, pkgs, ... }: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.fonts.enable {
fonts = {
packages = with pkgs; [
alegreya

View file

@ -1,6 +1,7 @@
{ config, pkgs, ... }: let
{ config, lib, pkgs, ... }: let
inherit (config) conf;
in{
inherit (lib) mkIf;
in mkIf conf.networkmanager.enable {
home-manager.users.${conf.username}.home.packages = [ pkgs.networkmanagerapplet ];
networking = {
networkmanager = {

View file

@ -45,6 +45,7 @@ in {
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
swayidle
wl-clipboard
];
services.swayosd = {

View file

@ -1,9 +0,0 @@
{ config, ... }: let
inherit (config) conf;
in {
imports = [
./ssh
];
system.stateVersion = conf.stateVersion;
}

View file

@ -2,11 +2,6 @@
inherit (config) conf;
inherit (config.conf) keys;
inherit (lib.strings) concatMapStrings;
time = pkgs.makeDesktopItem {
name = "peaclock-desktop";
desktopName = "Time";
exec = "alacritty -e ${pkgs.peaclock}/bin/peaclock";
};
in {
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;
@ -21,11 +16,6 @@ in {
unzip
gnutar
lshw
peaclock
netcat-openbsd
wl-clipboard
] ++ [
time
];
home.file = {

View file

@ -4,6 +4,7 @@
in {
options = {
conf = {
ssh.enbale = mkEnableOption "Install my public key to allow accessing this machine via ssh.";
apps.enable = mkEnableOption "Enable complete configuration for end-user machine.";
niri.enable = mkEnableOption "Enable niri compositor.";
vm.enable = mkEnableOption "Enable VM related configuration.";
@ -11,6 +12,8 @@ in {
games.enable = mkEnableOption "Enable games.";
secureboot.enable = mkEnableOption "Enable secure boot utilities (manual key-enrolling required).";
extraLayout.enable = mkEnableOption "Enable additional custom layout.";
fonts.enable = mkEnableOption "Install and set preferred fonts";
networkmanager.enable = mkEnableOption "Enable network manager and some related configuration";
username = mkOption {
type = str;

View file

@ -28,7 +28,7 @@
modules = [
./options.nix
./devices/ellaca
./modules/server
./modules
disko.nixosModules.disko
];
};