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 ./hardware.nix
./services ./services
./networking.nix ./networking.nix
../common.nix
../../modules ../../modules
../../modules/fonts.nix ../../modules/fonts.nix
]; ];

View file

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

View file

@ -3,6 +3,7 @@
./hardware.nix ./hardware.nix
./services ./services
./networking.nix ./networking.nix
../common.nix
../../modules ../../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 flake.nixosConfigurations = let
inherit (inputs.nixpkgs.lib) nixosSystem; inherit (inputs.nixpkgs.lib) nixosSystem;
specialArgs = {inherit inputs;}; 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 { in {
tsuki = nixosSystem { tsuki = nixosSystem {
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
./tsuki ./tsuki
sopsModule
hmModule
atticModule
nurModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -36,9 +27,6 @@
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
./ame ./ame
sopsModule
hmModule
t480Module
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -55,8 +43,6 @@
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
./sakura ./sakura
sopsModule
hmModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -73,8 +59,6 @@
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
./kariru ./kariru
sopsModule
hmModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -91,8 +75,6 @@
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
./yuki ./yuki
sopsModule
hmModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -109,8 +91,6 @@
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
./arashi ./arashi
sopsModule
hmModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -127,9 +107,6 @@
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
./sora ./sora
sopsModule
atticModule
hmModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -146,8 +123,6 @@
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
./tsuru ./tsuru
sopsModule
hmModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -164,8 +139,6 @@
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
./haru ./haru
sopsModule
hmModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -182,8 +155,6 @@
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
./kaze ./kaze
sopsModule
hmModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
_: { _: {
virtualisation.oci-containers.containers.wallos = { 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"]; ports = ["8282:80"];
volumes = [ volumes = [
"/home/notoh/docker/wallos/db:/var/www/html/db" "/home/notoh/docker/wallos/db:/var/www/html/db"