hosts: move modules to common file

This commit is contained in:
notohh 2024-05-13 15:19:48 -04:00
parent 860aeaf406
commit 54055d0f9e
Signed by: notohh
GPG key ID: BD47506D475EE86D
14 changed files with 31 additions and 30 deletions

View file

@ -3,6 +3,7 @@ _: {
./hardware.nix
./services
./networking.nix
../common.nix
../../modules
../../modules/fonts.nix
];

View file

@ -1,4 +1,5 @@
{
inputs,
config,
lib,
modulesPath,
@ -6,6 +7,7 @@
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
];
boot = {
@ -18,6 +20,7 @@
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
initrd = {
@ -26,6 +29,13 @@
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid";
fsType = "ext4";
};
};
zramSwap = {
enable = true;
swapDevices = 1;

View file

@ -3,6 +3,7 @@
./hardware.nix
./services
./networking.nix
../common.nix
../../modules
];

8
hosts/common.nix Normal file
View file

@ -0,0 +1,8 @@
{inputs, ...}: {
imports = [
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.home-manager
inputs.nur.nixosModules.nur
inputs.attic.nixosModules.atticd
];
}

View file

@ -6,20 +6,11 @@
flake.nixosConfigurations = let
inherit (inputs.nixpkgs.lib) nixosSystem;
specialArgs = {inherit inputs;};
sopsModule = inputs.sops-nix.nixosModules.sops;
hmModule = inputs.home-manager.nixosModules.home-manager;
atticModule = inputs.attic.nixosModules.atticd;
nurModule = inputs.nur.nixosModules.nur;
t480Module = inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480;
in {
tsuki = nixosSystem {
inherit specialArgs;
modules = [
./tsuki
sopsModule
hmModule
atticModule
nurModule
{
home-manager = {
useGlobalPkgs = true;
@ -36,9 +27,6 @@
inherit specialArgs;
modules = [
./ame
sopsModule
hmModule
t480Module
{
home-manager = {
useGlobalPkgs = true;
@ -55,8 +43,6 @@
inherit specialArgs;
modules = [
./sakura
sopsModule
hmModule
{
home-manager = {
useGlobalPkgs = true;
@ -73,8 +59,6 @@
inherit specialArgs;
modules = [
./kariru
sopsModule
hmModule
{
home-manager = {
useGlobalPkgs = true;
@ -91,8 +75,6 @@
inherit specialArgs;
modules = [
./yuki
sopsModule
hmModule
{
home-manager = {
useGlobalPkgs = true;
@ -109,8 +91,6 @@
inherit specialArgs;
modules = [
./arashi
sopsModule
hmModule
{
home-manager = {
useGlobalPkgs = true;
@ -127,9 +107,6 @@
inherit specialArgs;
modules = [
./sora
sopsModule
atticModule
hmModule
{
home-manager = {
useGlobalPkgs = true;
@ -146,8 +123,6 @@
inherit specialArgs;
modules = [
./tsuru
sopsModule
hmModule
{
home-manager = {
useGlobalPkgs = true;
@ -164,8 +139,6 @@
inherit specialArgs;
modules = [
./haru
sopsModule
hmModule
{
home-manager = {
useGlobalPkgs = true;
@ -182,8 +155,6 @@
inherit specialArgs;
modules = [
./kaze
sopsModule
hmModule
{
home-manager = {
useGlobalPkgs = true;

View file

@ -3,6 +3,7 @@
./hardware.nix
./services
./networking.nix
../common.nix
../../modules
];

View file

@ -3,6 +3,7 @@
./hardware.nix
./services
./networking.nix
../common.nix
../../modules
];

View file

@ -3,6 +3,7 @@
./hardware.nix
./services
./networking.nix
../common.nix
../../modules
];

View file

@ -3,6 +3,7 @@ _: {
./hardware.nix
./networking.nix
./services
../common.nix
../../modules
];

View file

@ -1,8 +1,11 @@
{
inputs,
config,
pkgs,
...
}: {
imports = [inputs.attic.nixosModules.atticd];
sops.secrets.attic = {};
environment.systemPackages = [pkgs.attic];

View file

@ -9,6 +9,7 @@
./hardware.nix
./services
./networking.nix
../common.nix
../../home/wayland
../../modules
../../modules/fonts.nix

View file

@ -3,6 +3,7 @@
./hardware.nix
./services
./networking.nix
../common.nix
../../modules
];

View file

@ -3,6 +3,7 @@
./hardware.nix
./services
./networking.nix
../common.nix
../../modules
];

View file

@ -1,6 +1,6 @@
_: {
virtualisation.oci-containers.containers.wallos = {
image = "bellamy/wallos@sha256:283cef1078cd8d3bf4474c641968328bd3da7c4bb11e92abd0a3a65036b31f47"; #v 1.23.0
image = "bellamy/wallos@sha256:142d7f1202cc0d80a02e9ae48c1a53de7cf5f448758d853a1fe8f5af732459fd"; #v 1.27.1
ports = ["8282:80"];
volumes = [
"/home/notoh/docker/wallos/db:/var/www/html/db"