add server1 and change flatpak to make it works if not defined
All checks were successful
nix flake show / show-flake (push) Successful in 40s
All checks were successful
nix flake show / show-flake (push) Successful in 40s
This commit is contained in:
parent
5798a8bcb2
commit
cacd136ca9
@ -42,6 +42,15 @@
|
||||
nvf.nixosModules.default
|
||||
];
|
||||
};
|
||||
server1 = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs system overlays; };
|
||||
modules = [
|
||||
./hosts/server1/configuration.nix
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
inputs.stylix.nixosModules.stylix
|
||||
nvf.nixosModules.default
|
||||
];
|
||||
};
|
||||
laptop1 = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs system overlays; };
|
||||
modules = [
|
||||
|
||||
28
hosts/server1/configuration.nix
Normal file
28
hosts/server1/configuration.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ inputs, config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../common/common.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "server1";
|
||||
|
||||
smayzy = {
|
||||
server.enable = true;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
smayzy = config.smayzy;
|
||||
};
|
||||
users = {
|
||||
smayzy = import ./home.nix;
|
||||
};
|
||||
backupFileExtension = "backup";
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
}
|
||||
61
hosts/server1/hardware-configuration.nix
Normal file
61
hosts/server1/hardware-configuration.nix
Normal file
@ -0,0 +1,61 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/05e716ac-e6a2-407d-9941-5ad95db74698";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/A238-B4BF";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/30759de4-934a-4c89-aca5-2e4fed7fe94f";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/5baebd62-0a58-47c0-b2de-1f5c2970fadf"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
7
hosts/server1/home.nix
Normal file
7
hosts/server1/home.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../common/home.nix
|
||||
];
|
||||
}
|
||||
@ -1,30 +1,6 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkOption types;
|
||||
|
||||
gaming = [
|
||||
"com.heroicgameslauncher.hgl"
|
||||
];
|
||||
|
||||
dev = [
|
||||
"com.google.AndroidStudio"
|
||||
];
|
||||
|
||||
utils = [
|
||||
"com.usebottles.bottles"
|
||||
"com.github.tchx84.Flatseal"
|
||||
"it.mijorus.gearlever"
|
||||
];
|
||||
|
||||
media = [
|
||||
"com.obsproject.Studio"
|
||||
];
|
||||
|
||||
flatpaks =
|
||||
(if config.smayzy.flatpak.gaming.enable then gaming else [ ])
|
||||
++ (if config.smayzy.flatpak.dev.enable then dev else [ ])
|
||||
++ (if config.smayzy.flatpak.utils.enable then utils else [ ])
|
||||
++ (if config.smayzy.flatpak.media.enable then media else [ ]);
|
||||
in
|
||||
{
|
||||
options.smayzy.flatpak = mkOption {
|
||||
@ -61,13 +37,42 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
default = {};
|
||||
};
|
||||
|
||||
config = mkIf config.smayzy.flatpak.enable {
|
||||
config = mkIf config.smayzy.flatpak.enable (
|
||||
let
|
||||
gaming = [
|
||||
"com.heroicgameslauncher.hgl"
|
||||
];
|
||||
|
||||
dev = [
|
||||
"com.google.AndroidStudio"
|
||||
];
|
||||
|
||||
utils = [
|
||||
"com.usebottles.bottles"
|
||||
"com.github.tchx84.Flatseal"
|
||||
"it.mijorus.gearlever"
|
||||
];
|
||||
|
||||
media = [
|
||||
"com.obsproject.Studio"
|
||||
];
|
||||
|
||||
flatpaks =
|
||||
(if config.smayzy.flatpak.gaming.enable then gaming else [ ])
|
||||
++ (if config.smayzy.flatpak.dev.enable then dev else [ ])
|
||||
++ (if config.smayzy.flatpak.utils.enable then utils else [ ])
|
||||
++ (if config.smayzy.flatpak.media.enable then media else [ ]);
|
||||
in
|
||||
{
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
update.onActivation = true;
|
||||
packages = flatpaks;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -4,5 +4,6 @@
|
||||
./base.nix
|
||||
./desktop.nix
|
||||
./laptop.nix
|
||||
./server.nix
|
||||
];
|
||||
}
|
||||
|
||||
19
modules/nix/groups/server.nix
Normal file
19
modules/nix/groups/server.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkOption types;
|
||||
in
|
||||
{
|
||||
options.smayzy.server.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "desktop settings";
|
||||
};
|
||||
|
||||
config = mkIf config.smayzy.server.enable {
|
||||
smayzy = {
|
||||
base = true;
|
||||
power = "desktop";
|
||||
stylix.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user