mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
restructure folder organisation
This commit is contained in:
parent
599d55fa6a
commit
9cf7be677d
72 changed files with 95 additions and 98 deletions
16
README.md
16
README.md
|
@ -1,19 +1,19 @@
|
||||||
# nixos-config [](https://builtwithnix.org)
|
# nixos-config [](https://builtwithnix.org)
|
||||||
|
|
||||||
This repository holds my NixOS configuration. It is fully reproducible, flakes
|
This repository holds my NixOS configuration.
|
||||||
based, and position-independent, meaning there is no moving around of
|
It is fully reproducible, flakes based, and position-independent, meaning there is no moving around of `configuration.nix`.
|
||||||
`configuration.nix`.
|
|
||||||
|
|
||||||
Deployment is done using [deploy-rs](https://github.com/serokell/deploy-rs), see [usage](#usage).
|
Deployment is done using [deploy-rs](https://github.com/serokell/deploy-rs), see [usage](#usage).
|
||||||
Secret are managed using [sops-nix](https://github.com/Mic92/sops-nix). For formatting [pre-commit-hooks](https://github.com/cachix/pre-commit-hooks.nix) is used.
|
Secret are managed using [sops-nix](https://github.com/Mic92/sops-nix).
|
||||||
|
For formatting [pre-commit-hooks](https://github.com/cachix/pre-commit-hooks.nix) is used.
|
||||||
|
|
||||||
## structure
|
## structure
|
||||||
|
|
||||||
```
|
```
|
||||||
.
|
.
|
||||||
├── modules # Own nix-options, to modularize services
|
├── modules # Own nix-options, to modularize services/hardware/...
|
||||||
├── nixos # Machine definitions
|
├── machines # Machine definitions
|
||||||
└── pgks # Own packages, which are not available in nixpkgs
|
└── pkgs # Own packages, which are not available in nixpkgs
|
||||||
```
|
```
|
||||||
|
|
||||||
## usage
|
## usage
|
||||||
|
@ -30,7 +30,7 @@ deploy .#myHost
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
```bash
|
```bash
|
||||||
sops ./nixos/myHost/secrets.yaml
|
sops ./machines/myHost/secrets.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
## inspired by
|
## inspired by
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
flake-parts.lib.mkFlake { inherit self; } {
|
flake-parts.lib.mkFlake { inherit self; } {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./nixos/configurations.nix
|
./machines/configurations.nix
|
||||||
#./nixos/images/default.nix
|
#./nixos/images/default.nix
|
||||||
inputs.pre-commit-hooks-nix.flakeModule
|
inputs.pre-commit-hooks-nix.flakeModule
|
||||||
];
|
];
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
flake = {
|
flake = {
|
||||||
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||||
|
|
||||||
deploy = import ./nixos/deploy.nix (inputs // {
|
deploy = import ./machines/deploy.nix (inputs // {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,7 +16,7 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
customModules = import ./modules/default.nix;
|
customModules = import ./core/default.nix;
|
||||||
baseModules = [
|
baseModules = [
|
||||||
# make flake inputs accessiable in NixOS
|
# make flake inputs accessiable in NixOS
|
||||||
{
|
{
|
|
@ -1,6 +1,5 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
#sops.defaultSopsFile = ../secrets + "/${config.networking.hostName}/secrets.yaml";
|
|
||||||
sops.secrets."users/felix/password".neededForUsers = true;
|
sops.secrets."users/felix/password".neededForUsers = true;
|
||||||
sops.secrets."users/felix/password" = { };
|
sops.secrets."users/felix/password" = { };
|
||||||
|
|
|
@ -7,12 +7,10 @@
|
||||||
./network.nix
|
./network.nix
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./services.nix
|
./services.nix
|
||||||
#../modules/backup.nix
|
../../legacy/modules/docker.nix
|
||||||
../modules/docker.nix
|
../../legacy/modules/networkdecrypt.nix
|
||||||
../modules/networkdecrypt.nix
|
../../legacy/modules/nix.nix
|
||||||
../modules/nix.nix
|
../../legacy/modules/users.nix
|
||||||
../modules/users.nix
|
|
||||||
#../modules/webapps/radicale.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "newton";
|
networking.hostName = "newton";
|
|
@ -7,14 +7,14 @@
|
||||||
./services.nix
|
./services.nix
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./wifi.nix
|
./wifi.nix
|
||||||
#../modules/3d-printer.nix
|
#../../legacy/modules/3d-printer.nix
|
||||||
../modules/avahi.nix
|
../../legacy/modules/avahi.nix
|
||||||
../modules/docker.nix
|
../../legacy/modules/docker.nix
|
||||||
../modules/nix.nix
|
../../legacy/modules/nix.nix
|
||||||
../modules/webapps/bazarr.nix
|
../../legacy/modules/webapps/bazarr.nix
|
||||||
../modules/webapps/prowlarr.nix
|
../../legacy/modules/webapps/prowlarr.nix
|
||||||
../modules/webapps/radarr.nix
|
../../legacy/modules/webapps/radarr.nix
|
||||||
../modules/webapps/sonarr.nix
|
../../legacy/modules/webapps/sonarr.nix
|
||||||
];
|
];
|
||||||
networking.hostName = "serverle";
|
networking.hostName = "serverle";
|
||||||
|
|
71
machines/thinkman/configuration.nix
Normal file
71
machines/thinkman/configuration.nix
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./disks.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./services.nix
|
||||||
|
../../legacy/modules/3d-design.nix
|
||||||
|
../../legacy/modules/android.nix
|
||||||
|
../../legacy/modules/avahi.nix
|
||||||
|
../../legacy/modules/bluetooth-audio.nix
|
||||||
|
../../legacy/modules/clean.nix
|
||||||
|
../../legacy/modules/desktop-default.nix
|
||||||
|
../../legacy/modules/desktop-development.nix
|
||||||
|
../../legacy/modules/development.nix
|
||||||
|
../../legacy/modules/docker.nix
|
||||||
|
../../legacy/modules/filesystem.nix
|
||||||
|
../../legacy/modules/gaming.nix
|
||||||
|
../../legacy/modules/hardware-base.nix
|
||||||
|
../../legacy/modules/intel-video.nix
|
||||||
|
../../legacy/modules/intel.nix
|
||||||
|
../../legacy/modules/kvm.nix
|
||||||
|
../../legacy/modules/location.nix
|
||||||
|
../../legacy/modules/media.nix
|
||||||
|
../../legacy/modules/meeting.nix
|
||||||
|
../../legacy/modules/nix.nix
|
||||||
|
../../legacy/modules/power.nix
|
||||||
|
../../legacy/modules/presentation.nix
|
||||||
|
../../legacy/modules/printer.nix
|
||||||
|
../../legacy/modules/screen-sharing.nix
|
||||||
|
../../legacy/modules/sway.nix
|
||||||
|
../../legacy/modules/sync.nix
|
||||||
|
../../legacy/modules/systemd-user.nix
|
||||||
|
../../legacy/modules/systemduefi.nix
|
||||||
|
../../legacy/modules/tex.nix
|
||||||
|
../../legacy/modules/thunderbolt.nix
|
||||||
|
../../legacy/modules/webcam.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "thinkman";
|
||||||
|
|
||||||
|
sops = {
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
gnupg.sshKeyPaths = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.extraOptions = ''
|
||||||
|
extra-platforms = aarch64-linux i686-linux
|
||||||
|
'';
|
||||||
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
|
|
||||||
|
# Use latest kernel
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# Nix
|
||||||
|
nix = {
|
||||||
|
autoOptimiseStore = true;
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
daemonCPUSchedPolicy = "idle";
|
||||||
|
daemonIOSchedPriority = 7;
|
||||||
|
};
|
||||||
|
|
||||||
|
system = {
|
||||||
|
stateVersion = "22.05";
|
||||||
|
autoUpgrade.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,71 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./disks.nix
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./services.nix
|
|
||||||
../modules/3d-design.nix
|
|
||||||
../modules/android.nix
|
|
||||||
../modules/avahi.nix
|
|
||||||
../modules/bluetooth-audio.nix
|
|
||||||
../modules/clean.nix
|
|
||||||
../modules/desktop-default.nix
|
|
||||||
../modules/desktop-development.nix
|
|
||||||
../modules/development.nix
|
|
||||||
../modules/docker.nix
|
|
||||||
../modules/filesystem.nix
|
|
||||||
../modules/gaming.nix
|
|
||||||
../modules/hardware-base.nix
|
|
||||||
../modules/intel-video.nix
|
|
||||||
../modules/intel.nix
|
|
||||||
../modules/kvm.nix
|
|
||||||
../modules/location.nix
|
|
||||||
../modules/media.nix
|
|
||||||
../modules/meeting.nix
|
|
||||||
../modules/nix.nix
|
|
||||||
../modules/power.nix
|
|
||||||
../modules/presentation.nix
|
|
||||||
../modules/printer.nix
|
|
||||||
../modules/screen-sharing.nix
|
|
||||||
../modules/sway.nix
|
|
||||||
../modules/sync.nix
|
|
||||||
../modules/systemd-user.nix
|
|
||||||
../modules/systemduefi.nix
|
|
||||||
../modules/tex.nix
|
|
||||||
../modules/thunderbolt.nix
|
|
||||||
../modules/webcam.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
networking.hostName = "thinkman";
|
|
||||||
|
|
||||||
sops = {
|
|
||||||
defaultSopsFile = ./secrets.yaml;
|
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
||||||
gnupg.sshKeyPaths = [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.extraOptions = ''
|
|
||||||
extra-platforms = aarch64-linux i686-linux
|
|
||||||
'';
|
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
||||||
|
|
||||||
# Use latest kernel
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
|
|
||||||
# Nix
|
|
||||||
nix = {
|
|
||||||
autoOptimiseStore = true;
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 30d";
|
|
||||||
};
|
|
||||||
daemonCPUSchedPolicy = "idle";
|
|
||||||
daemonIOSchedPriority = 7;
|
|
||||||
};
|
|
||||||
|
|
||||||
system = {
|
|
||||||
stateVersion = "22.05";
|
|
||||||
autoUpgrade.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue