1
0
mirror of https://github.com/tboerger/nixos-config synced 2024-11-22 18:21:58 +01:00

chore: some restructure and add rapsberry config

This commit is contained in:
Thomas Boerger 2022-06-05 22:54:46 +02:00
parent a2f9d91233
commit 443742a664
No known key found for this signature in database
GPG Key ID: 09745AFF9D63C79B
16 changed files with 174 additions and 115 deletions

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1648942457,
"narHash": "sha256-i29Z1t3sVfCNfpp+KAfeExvpqHQSbLO1KWylTtfradU=",
"lastModified": 1652712410,
"narHash": "sha256-hMJ2TqLt0DleEnQFGUHK9sV2aAzJPU8pZeiZoqRozbE=",
"owner": "ryantm",
"repo": "agenix",
"rev": "0d5e59ed645e4c7b60174bc6f6aac6a203dc0b01",
"rev": "7e5e58b98c3dcbf497543ff6f22591552ebfe65b",
"type": "github"
},
"original": {
@ -20,6 +20,22 @@
"type": "github"
}
},
"hardware": {
"locked": {
"lastModified": 1654057797,
"narHash": "sha256-mXo7C4v7Jj2feBzcReu1Eu/3Rnw5b023E9kOyFsHZQw=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "0cab18a48de7914ef8cad35dca0bb36868f3e1af",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"homemanager": {
"inputs": {
"nixpkgs": [
@ -27,11 +43,11 @@
]
},
"locked": {
"lastModified": 1649392573,
"narHash": "sha256-dCPEJZzExz2+i7AjUuViZUgHC+JXDlBBG/IzuSYWCh8=",
"lastModified": 1654422613,
"narHash": "sha256-ZxkMM13AnrMwYOV99ohzcqeTkAOqD9Q2SBdZ9WoFE9Y=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f911ebbec927e8e9b582f2e32e2b35f730074cfc",
"rev": "20703892473d01c70fb10248442231fe94f4ceb4",
"type": "github"
},
"original": {
@ -42,11 +58,11 @@
},
"master": {
"locked": {
"lastModified": 1649626569,
"narHash": "sha256-Zy6yK1GrB+NfvnumePfJDygs2jsmMlYn/ADF9CqcUQQ=",
"lastModified": 1654460529,
"narHash": "sha256-l8ct5LuzPIzqUkWxphHW8bH/350JUq0XfLazI7wosuk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5949b253ad1730633e2d4b848a688be24691096c",
"rev": "d8bbeaa5c86c3f296275d154b4d0952a4cfbda54",
"type": "github"
},
"original": {
@ -58,11 +74,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1649537291,
"narHash": "sha256-V6VYIwTeI5BCfYK9f5EsMbjsjsis1rUDHMsaDbTvt+A=",
"lastModified": 1654346688,
"narHash": "sha256-Y7QtZkfdxTvACCvWmDjpN6qOf4OKkZATufHcJP2VMKM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "715dc137b08213aabbbe0965b78ab938e5d8d3b7",
"rev": "2de556c4cd46a59e8ce2f85ee4dd400983213d45",
"type": "github"
},
"original": {
@ -74,11 +90,11 @@
},
"nur": {
"locked": {
"lastModified": 1649628063,
"narHash": "sha256-JDM3ihOxR+leYD8LMYg8SDwcc/6poyQoWSbDIKK3IOg=",
"lastModified": 1654429664,
"narHash": "sha256-rQe6/72yWA78RzWogM8ZT++XYoYrZJdF/T6mjcCqsfU=",
"owner": "nix-community",
"repo": "NUR",
"rev": "5b4205ddf9b05da8d29b527376bd6e5fc148d91c",
"rev": "18fa7520a7ca968eb74b46036329f3f7606bd541",
"type": "github"
},
"original": {
@ -90,6 +106,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"hardware": "hardware",
"homemanager": "homemanager",
"master": "master",
"nixpkgs": "nixpkgs",
@ -99,11 +116,11 @@
},
"unstable": {
"locked": {
"lastModified": 1649408932,
"narHash": "sha256-JhTW1OtS5fACcRXLqcTTQyYO5vLkO+bceCqeRms13SY=",
"lastModified": 1654230545,
"narHash": "sha256-8Vlwf0x8ow6pPOK2a04bT+pxIeRnM1+O0Xv9/CuDzRs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "42948b300670223ca8286aaf916bc381f66a5313",
"rev": "236cc2971ac72acd90f0ae3a797f9f83098b17ec",
"type": "github"
},
"original": {

@ -14,6 +14,10 @@
url = "github:nixos/nixpkgs/nixos-unstable";
};
hardware = {
url = "github:NixOS/nixos-hardware/master";
};
nur = {
url = "github:nix-community/NUR";
};
@ -146,13 +150,14 @@
({ pkgs, ... }:
let
nur-no-pkgs = import nur {
nurpkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
nurpkgs = import inputs.nixpkgs { system = "aarch64-linux"; };
};
in {
imports = [
nur-no-pkgs.repos.tboerger.modules
];
})
inputs.hardware.nixosModules.raspberry-pi-4
inputs.homemanager.nixosModules.home-manager
inputs.agenix.nixosModules.age
sharedNixosConfiguration
@ -166,8 +171,8 @@
};
};
midgard = self.nixosConfigurations.midgard.config.system.build.toplevel;
utgard = self.nixosConfigurations.utgard.config.system.build.toplevel;
asgard = self.nixosConfigurations.asgard.config.system.build.toplevel;
midgard = self.nixosConfigurations.midgard.config.system.build.toplevel;
};
}

@ -1,5 +1,20 @@
{ config, lib, pkgs, ... }:
{
boot = { };
boot = {
kernelPackages = pkgs.linuxPackages;
cleanTmpDir = true;
loader = {
efi = {
canTouchEfiVariables = true;
};
systemd-boot = {
enable = true;
consoleMode = "2";
editor = false;
};
};
};
}

@ -3,13 +3,20 @@
{
imports = [
../modules
../services
./filesystems.nix
./boot.nix
./hardware.nix
./networking.nix
./hardware.nix
];
personal = {
services = {
};
};
system = {
stateVersion = "21.11";
};

@ -1,5 +1,7 @@
{ config, lib, pkgs, ... }:
{
boot = { };
boot = {
cleanTmpDir = true;
};
}

@ -3,13 +3,20 @@
{
imports = [
../modules
../services
./filesystems.nix
./boot.nix
./hardware.nix
./networking.nix
./hardware.nix
];
personal = {
services = {
};
};
system = {
stateVersion = "21.11";
};

@ -1,30 +1,11 @@
{ config, lib, pkgs, ... }:
{
# swapDevices = [{
# device = "/dev/disk/by-label/swap";
# }];
# fileSystems."/" = {
# device = "/dev/disk/by-label/root";
# fsType = "ext4";
# options = [
# "noatime"
# "discard"
# ];
# };
# fileSystems."/home" = {
# device = "/dev/disk/by-label/home";
# fsType = "ext4";
# options = [
# "noatime"
# "discard"
# ];
# };
# fileSystems."/boot" = {
# device = "/dev/disk/by-label/boot";
# fsType = "vfat";
# };
fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [
"noatime"
];
};
}

@ -1,9 +1,13 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
hardware = { };
hardware = {
raspberry-pi = {
"4" = {
fkms-3d = {
enable = true;
};
};
};
};
}

@ -11,7 +11,7 @@
];
interfaces = {
enp2s0f0 = {
eth0 = {
ipv4 = {
addresses = [{
address = "192.168.1.5";

@ -1,22 +0,0 @@
{ pkgs, lib, config, options, ... }:
{
config = {
boot = {
kernelPackages = pkgs.linuxPackages;
cleanTmpDir = true;
loader = {
efi = {
canTouchEfiVariables = true;
};
systemd-boot = {
enable = true;
consoleMode = "2";
editor = false;
};
};
};
};
}

@ -2,12 +2,12 @@
{
imports = [
./boot.nix
./heimdall.nix
./network.nix
./shells.nix
./tools.nix
./users.nix
./prowlarr.nix
];
config = {

@ -0,0 +1,24 @@
{ pkgs, lib, config, options, ... }:
with lib;
let
cfg = config.services.prowlarr;
in
{
config = mkIf cfg.enable {
systemd.services.prowlarr = {
description = "Prowlarr";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = mkForce {
Type = "simple";
User = cfg.user;
Group = cfg.group;
ExecStart = "${cfg.package}/bin/Prowlarr -nobrowser -data='${cfg.dataDir}'";
Restart = "on-failure";
};
};
};
}

@ -87,7 +87,7 @@ in
enable = true;
user = "media";
group = "media";
package = pkgs.unstable.unpackerr;
# package = pkgs.unstable.unpackerr;
};
radarr = {

46
machines/utgard/boot.nix Normal file

@ -0,0 +1,46 @@
{ config, lib, pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages;
cleanTmpDir = true;
kernelModules = [
"kvm-intel"
"wl"
];
extraModulePackages = [
config.boot.kernelPackages.broadcom_sta
];
loader = {
efi = {
canTouchEfiVariables = true;
};
systemd-boot = {
enable = true;
consoleMode = "2";
editor = false;
};
};
initrd = {
availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ahci"
"firewire_ohci"
"usb_storage"
"usbhid"
"sd_mod"
"sdhci_pci"
];
kernelModules = [
"dm-snapshot"
];
};
};
}

@ -6,8 +6,9 @@
../services
./filesystems.nix
./hardware.nix
./boot.nix
./networking.nix
./hardware.nix
];
personal = {
@ -27,40 +28,6 @@
};
};
environment = {
systemPackages = with pkgs; [
intel-media-driver
];
};
boot = {
kernelModules = [
"kvm-intel"
"wl"
];
extraModulePackages = [
config.boot.kernelPackages.broadcom_sta
];
initrd = {
availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ahci"
"firewire_ohci"
"usb_storage"
"usbhid"
"sd_mod"
"sdhci_pci"
];
kernelModules = [
"dm-snapshot"
];
};
};
system = {
stateVersion = "21.11";
};

@ -12,4 +12,10 @@
};
};
};
environment = {
systemPackages = with pkgs; [
intel-media-driver
];
};
}