removed two hosts, added glances, and disabled loading of nvidia module.
This commit is contained in:
parent
d9c1439c2f
commit
164a365ec0
10 changed files with 92 additions and 37 deletions
36
.archive/flake.nix
Normal file
36
.archive/flake.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"durincore" = mkNixosConfig {
|
||||
# T470 Thinkpad Intel i7-6600U
|
||||
# Backup Nix dev laptop
|
||||
hostname = "durincore";
|
||||
system = "x86_64-linux";
|
||||
hardwareModules = [
|
||||
./nixos/profiles/hw-thinkpad-t470.nix
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t470s
|
||||
];
|
||||
profileModules = [
|
||||
./nixos/profiles/role-workstation.nix
|
||||
./nixos/profiles/role-dev.nix
|
||||
{ home-manager.users.jahanson = ./nixos/home/jahanson/workstation.nix; }
|
||||
];
|
||||
};
|
||||
|
||||
"legiondary" = mkNixosConfig {
|
||||
# Legion 15arh05h AMD/Nvidia Ryzen 7 4800H
|
||||
# Nix dev/gaming laptop
|
||||
hostname = "legiondary";
|
||||
system = "x86_64-linux";
|
||||
hardwareModules = [
|
||||
inputs.nixos-hardware.nixosModules.lenovo-legion-15arh05h
|
||||
./nixos/profiles/hw-legion-15arh05h.nix
|
||||
disko.nixosModules.disko
|
||||
(import ./nixos/profiles/disko-nixos.nix { disks = [ "/dev/nvme0n1" ]; })
|
||||
];
|
||||
profileModules = [
|
||||
./nixos/profiles/role-dev.nix
|
||||
./nixos/profiles/role-gaming.nix
|
||||
./nixos/profiles/role-workstation.nix
|
||||
{ home-manager.users.jahanson = ./nixos/home/jahanson/workstation.nix; }
|
||||
];
|
||||
};
|
||||
}
|
35
flake.nix
35
flake.nix
|
@ -168,41 +168,6 @@
|
|||
};
|
||||
in
|
||||
{
|
||||
"durincore" = mkNixosConfig {
|
||||
# T470 Thinkpad Intel i7-6600U
|
||||
# Backup Nix dev laptop
|
||||
hostname = "durincore";
|
||||
system = "x86_64-linux";
|
||||
hardwareModules = [
|
||||
./nixos/profiles/hw-thinkpad-t470.nix
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t470s
|
||||
];
|
||||
profileModules = [
|
||||
./nixos/profiles/role-workstation.nix
|
||||
./nixos/profiles/role-dev.nix
|
||||
{ home-manager.users.jahanson = ./nixos/home/jahanson/workstation.nix; }
|
||||
];
|
||||
};
|
||||
|
||||
"legiondary" = mkNixosConfig {
|
||||
# Legion 15arh05h AMD/Nvidia Ryzen 7 4800H
|
||||
# Nix dev/gaming laptop
|
||||
hostname = "legiondary";
|
||||
system = "x86_64-linux";
|
||||
hardwareModules = [
|
||||
inputs.nixos-hardware.nixosModules.lenovo-legion-15arh05h
|
||||
./nixos/profiles/hw-legion-15arh05h.nix
|
||||
disko.nixosModules.disko
|
||||
(import ./nixos/profiles/disko-nixos.nix { disks = [ "/dev/nvme0n1" ]; })
|
||||
];
|
||||
profileModules = [
|
||||
./nixos/profiles/role-dev.nix
|
||||
./nixos/profiles/role-gaming.nix
|
||||
./nixos/profiles/role-workstation.nix
|
||||
{ home-manager.users.jahanson = ./nixos/home/jahanson/workstation.nix; }
|
||||
];
|
||||
};
|
||||
|
||||
"telchar" = mkNixosConfig {
|
||||
# Framework 16 Ryzen 7 7840HS - Radeon 780M Graphics
|
||||
# Nix dev laptop
|
||||
|
|
|
@ -124,8 +124,9 @@ in
|
|||
};
|
||||
};
|
||||
services = {
|
||||
podman.enable = true;
|
||||
glances.enable = true;
|
||||
libvirt-qemu.enable = true;
|
||||
podman.enable = true;
|
||||
|
||||
# Scrutiny
|
||||
scrutiny = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./nvidia
|
||||
# ./nvidia
|
||||
];
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
./cockpit
|
||||
./dnsmasq
|
||||
./forgejo
|
||||
./glances
|
||||
./haproxy
|
||||
./libvirt-qemu
|
||||
./matchbox
|
||||
|
|
52
nixos/modules/nixos/services/glances/default.nix
Normal file
52
nixos/modules/nixos/services/glances/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
cfg = config.mySystem.services.glances;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.mySystem.services.glances =
|
||||
{
|
||||
enable = mkEnableOption "Glances system monitor";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = with pkgs;
|
||||
[ glances python310Packages.psutil hddtemp ];
|
||||
|
||||
# port 61208
|
||||
systemd.services.glances = {
|
||||
script = ''
|
||||
${pkgs.glances}/bin/glances --enable-plugin smart --webserver --bind 0.0.0.0
|
||||
'';
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
firewall.allowedTCPPorts = [ 61208 ];
|
||||
};
|
||||
|
||||
environment.etc."glances/glances.conf" = {
|
||||
text = ''
|
||||
[global]
|
||||
check_update=False
|
||||
|
||||
[network]
|
||||
hide=lo,docker.*
|
||||
|
||||
[diskio]
|
||||
hide=loop.*
|
||||
|
||||
[containers]
|
||||
disable=False
|
||||
podman_sock=unix:///var/run/podman/podman.sock
|
||||
|
||||
[connections]
|
||||
disable=True
|
||||
|
||||
[irq]
|
||||
disable=True
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue