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

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

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

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

@ -1,30 +1,11 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
# swapDevices = [{ fileSystems."/" = {
# device = "/dev/disk/by-label/swap"; device = "/dev/disk/by-label/NIXOS_SD";
# }]; fsType = "ext4";
options = [
# fileSystems."/" = { "noatime"
# 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";
# };
} }

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

@ -11,7 +11,7 @@
]; ];
interfaces = { interfaces = {
enp2s0f0 = { eth0 = {
ipv4 = { ipv4 = {
addresses = [{ addresses = [{
address = "192.168.1.5"; 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 = [ imports = [
./boot.nix
./heimdall.nix ./heimdall.nix
./network.nix ./network.nix
./shells.nix ./shells.nix
./tools.nix ./tools.nix
./users.nix ./users.nix
./prowlarr.nix
]; ];
config = { 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; enable = true;
user = "media"; user = "media";
group = "media"; group = "media";
package = pkgs.unstable.unpackerr; # package = pkgs.unstable.unpackerr;
}; };
radarr = { 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 ../services
./filesystems.nix ./filesystems.nix
./hardware.nix ./boot.nix
./networking.nix ./networking.nix
./hardware.nix
]; ];
personal = { 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 = { system = {
stateVersion = "21.11"; stateVersion = "21.11";
}; };

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