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
18
README.md
18
README.md
|
@ -1,19 +1,19 @@
|
|||
# nixos-config [](https://builtwithnix.org)
|
||||
|
||||
This repository holds my NixOS configuration. It is fully reproducible, flakes
|
||||
based, and position-independent, meaning there is no moving around of
|
||||
`configuration.nix`.
|
||||
This repository holds my NixOS configuration.
|
||||
It is fully reproducible, flakes based, and position-independent, meaning there is no moving around of `configuration.nix`.
|
||||
|
||||
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
|
||||
|
||||
```
|
||||
.
|
||||
├── modules # Own nix-options, to modularize services
|
||||
├── nixos # Machine definitions
|
||||
└── pgks # Own packages, which are not available in nixpkgs
|
||||
├── modules # Own nix-options, to modularize services/hardware/...
|
||||
├── machines # Machine definitions
|
||||
└── pkgs # Own packages, which are not available in nixpkgs
|
||||
```
|
||||
|
||||
## usage
|
||||
|
@ -30,7 +30,7 @@ deploy .#myHost
|
|||
|
||||
secrets:
|
||||
```bash
|
||||
sops ./nixos/myHost/secrets.yaml
|
||||
sops ./machines/myHost/secrets.yaml
|
||||
```
|
||||
|
||||
## inspired by
|
||||
|
@ -40,4 +40,4 @@ sops ./nixos/myHost/secrets.yaml
|
|||
- [Nix config by pborzenkov](https://github.com/pborzenkov/nix-config)
|
||||
- [Nix config by nyanloutre](https://gitea.nyanlout.re/nyanloutre/nixos-config)
|
||||
- [deploy-rs by disassembler](https://samleathers.com/posts/2022-02-03-my-new-network-and-deploy-rs.html)
|
||||
- [pre-commit config](https://github.com/cachix/pre-commit-hooks.nix/blob/master/template/flake.nix)
|
||||
- [pre-commit config](https://github.com/cachix/pre-commit-hooks.nix/blob/master/template/flake.nix)
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
flake-parts.lib.mkFlake { inherit self; } {
|
||||
|
||||
imports = [
|
||||
./nixos/configurations.nix
|
||||
./machines/configurations.nix
|
||||
#./nixos/images/default.nix
|
||||
inputs.pre-commit-hooks-nix.flakeModule
|
||||
];
|
||||
|
@ -75,7 +75,7 @@
|
|||
flake = {
|
||||
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;
|
||||
});
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
customModules = import ./modules/default.nix;
|
||||
customModules = import ./core/default.nix;
|
||||
baseModules = [
|
||||
# make flake inputs accessiable in NixOS
|
||||
{
|
|
@ -1,6 +1,5 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
#sops.defaultSopsFile = ../secrets + "/${config.networking.hostName}/secrets.yaml";
|
||||
sops.secrets."users/felix/password".neededForUsers = true;
|
||||
sops.secrets."users/felix/password" = { };
|
||||
|
|
@ -7,12 +7,10 @@
|
|||
./network.nix
|
||||
./syncthing.nix
|
||||
./services.nix
|
||||
#../modules/backup.nix
|
||||
../modules/docker.nix
|
||||
../modules/networkdecrypt.nix
|
||||
../modules/nix.nix
|
||||
../modules/users.nix
|
||||
#../modules/webapps/radicale.nix
|
||||
../../legacy/modules/docker.nix
|
||||
../../legacy/modules/networkdecrypt.nix
|
||||
../../legacy/modules/nix.nix
|
||||
../../legacy/modules/users.nix
|
||||
];
|
||||
|
||||
networking.hostName = "newton";
|
|
@ -7,14 +7,14 @@
|
|||
./services.nix
|
||||
./syncthing.nix
|
||||
./wifi.nix
|
||||
#../modules/3d-printer.nix
|
||||
../modules/avahi.nix
|
||||
../modules/docker.nix
|
||||
../modules/nix.nix
|
||||
../modules/webapps/bazarr.nix
|
||||
../modules/webapps/prowlarr.nix
|
||||
../modules/webapps/radarr.nix
|
||||
../modules/webapps/sonarr.nix
|
||||
#../../legacy/modules/3d-printer.nix
|
||||
../../legacy/modules/avahi.nix
|
||||
../../legacy/modules/docker.nix
|
||||
../../legacy/modules/nix.nix
|
||||
../../legacy/modules/webapps/bazarr.nix
|
||||
../../legacy/modules/webapps/prowlarr.nix
|
||||
../../legacy/modules/webapps/radarr.nix
|
||||
../../legacy/modules/webapps/sonarr.nix
|
||||
];
|
||||
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