refactor: add NixOS configuration files for server and workstation setups
Some checks failed
Nix Format Check / check-format (push) Failing after 39s
Some checks failed
Nix Format Check / check-format (push) Failing after 39s
This commit is contained in:
12
config/nixos/packages/common/default.nix
Normal file
12
config/nixos/packages/common/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ ./virtualisation.nix ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubikey-manager
|
||||
trash-cli
|
||||
sqlite # Used for managing SQLite databases (Brave Settings etc.)
|
||||
xcp # Rust implementation of cp/mv command
|
||||
pandoc # Document converter (Markdown, HTML, PDF etc.) (Mostly used for static site generators)
|
||||
];
|
||||
}
|
||||
39
config/nixos/packages/common/virtualisation.nix
Normal file
39
config/nixos/packages/common/virtualisation.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
qemu
|
||||
OVMF
|
||||
];
|
||||
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.docker;
|
||||
autoPrune.enable = true;
|
||||
daemon.settings = {
|
||||
"live-restore" = false;
|
||||
};
|
||||
};
|
||||
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
|
||||
qemu = {
|
||||
package = pkgs.qemu;
|
||||
runAsRoot = true;
|
||||
swtpm.enable = true;
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [ pkgs.OVMF.fd ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
config/nixos/packages/server/default.nix
Normal file
6
config/nixos/packages/server/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Import all the package modules
|
||||
imports = [
|
||||
];
|
||||
}
|
||||
25
config/nixos/packages/workstation/1password.nix
Normal file
25
config/nixos/packages/workstation/1password.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ pkgs, pkgs-unstable, ... }:
|
||||
{
|
||||
# Enables the 1Password CLI
|
||||
programs._1password = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Enables the 1Password desktop app
|
||||
programs._1password-gui = {
|
||||
enable = true;
|
||||
polkitPolicyOwners = [ "menno" ];
|
||||
package = pkgs-unstable._1password-gui;
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"1password/custom_allowed_browsers" = {
|
||||
text = ''
|
||||
firefox
|
||||
brave
|
||||
zen
|
||||
'';
|
||||
mode = "0755";
|
||||
};
|
||||
};
|
||||
}
|
||||
8
config/nixos/packages/workstation/default.nix
Normal file
8
config/nixos/packages/workstation/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Import all the package modules
|
||||
imports = [
|
||||
./flatpak.nix
|
||||
./1password.nix
|
||||
];
|
||||
}
|
||||
11
config/nixos/packages/workstation/flatpak.nix
Normal file
11
config/nixos/packages/workstation/flatpak.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.flatpak.enable = true;
|
||||
systemd.services.flatpak-repo = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.flatpak ];
|
||||
script = ''
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user