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 = { conf = {
ssh.enable = true;
stateVersion = "25.05"; stateVersion = "25.05";
hmStateVersion = "25.05";
}; };
} }

View file

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

View file

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

View file

@ -12,6 +12,7 @@ in {
./niri ./niri
./nix ./nix
./secureboot ./secureboot
./ssh
./utils ./utils
./vm ./vm
]; ];
@ -29,9 +30,5 @@ in {
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
}; };
hardware.opentabletdriver = {
enable = true;
};
system.stateVersion = conf.stateVersion; 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 = { fonts = {
packages = with pkgs; [ packages = with pkgs; [
alegreya alegreya

View file

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

View file

@ -45,6 +45,7 @@ in {
home-manager.users.${conf.username} = { home-manager.users.${conf.username} = {
home.packages = with pkgs; [ home.packages = with pkgs; [
swayidle swayidle
wl-clipboard
]; ];
services.swayosd = { 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;
inherit (config.conf) keys; inherit (config.conf) keys;
inherit (lib.strings) concatMapStrings; inherit (lib.strings) concatMapStrings;
time = pkgs.makeDesktopItem {
name = "peaclock-desktop";
desktopName = "Time";
exec = "alacritty -e ${pkgs.peaclock}/bin/peaclock";
};
in { in {
programs.fish.enable = true; programs.fish.enable = true;
users.defaultUserShell = pkgs.fish; users.defaultUserShell = pkgs.fish;
@ -21,11 +16,6 @@ in {
unzip unzip
gnutar gnutar
lshw lshw
peaclock
netcat-openbsd
wl-clipboard
] ++ [
time
]; ];
home.file = { home.file = {

View file

@ -4,6 +4,7 @@
in { in {
options = { options = {
conf = { 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."; apps.enable = mkEnableOption "Enable complete configuration for end-user machine.";
niri.enable = mkEnableOption "Enable niri compositor."; niri.enable = mkEnableOption "Enable niri compositor.";
vm.enable = mkEnableOption "Enable VM related configuration."; vm.enable = mkEnableOption "Enable VM related configuration.";
@ -11,6 +12,8 @@ in {
games.enable = mkEnableOption "Enable games."; games.enable = mkEnableOption "Enable games.";
secureboot.enable = mkEnableOption "Enable secure boot utilities (manual key-enrolling required)."; secureboot.enable = mkEnableOption "Enable secure boot utilities (manual key-enrolling required).";
extraLayout.enable = mkEnableOption "Enable additional custom layout."; 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 { username = mkOption {
type = str; type = str;

View file

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