Fix rpi3 config
This commit is contained in:
parent
9083c2f5cc
commit
e2457ef4ba
4 changed files with 50 additions and 54 deletions
45
flake.lock
generated
45
flake.lock
generated
|
|
@ -228,19 +228,22 @@
|
|||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1679786039,
|
||||
"narHash": "sha256-VNjswu0Q4bZOkWNuc0+dHvRdjUCj+MnDlRfw/Q0R3vI=",
|
||||
"lastModified": 1679738842,
|
||||
"narHash": "sha256-CvqRbsyDW756EskojZptDU590rez29RcHDV3ezoze08=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "cf662b6c98a0da81e06066fff0ecf9cbd4627727",
|
||||
"rev": "83110c259889230b324bb2d35bef78bf5f214a1f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-22.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -260,7 +263,7 @@
|
|||
"flake-utils": "flake-utils",
|
||||
"format-all": "format-all",
|
||||
"nix-straight": "nix-straight",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nose": "nose",
|
||||
"ob-racket": "ob-racket",
|
||||
"org": "org",
|
||||
|
|
@ -305,18 +308,17 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1677932085,
|
||||
"narHash": "sha256-+AB4dYllWig8iO6vAiGGYl0NEgmMgGHpy9gzWJ3322g=",
|
||||
"owner": "nixos",
|
||||
"lastModified": 1679553901,
|
||||
"narHash": "sha256-OhmJc18XNIj0wVC4ZoPnCVoY3SGfcPxaeKJOz1WHo5M=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3c5319ad3aa51551182ac82ea17ab1c6b0f0df89",
|
||||
"rev": "09ad6a72359f6aff0f96ce8e4d1ec2d1271ad15d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
|
|
@ -336,21 +338,6 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1679553901,
|
||||
"narHash": "sha256-OhmJc18XNIj0wVC4ZoPnCVoY3SGfcPxaeKJOz1WHo5M=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "09ad6a72359f6aff0f96ce8e4d1ec2d1271ad15d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1679748960,
|
||||
"narHash": "sha256-BP8XcYHyj1NxQi04RpyNW8e7KiXSoI+Fy1tXIK2GfdA=",
|
||||
|
|
@ -484,7 +471,7 @@
|
|||
"gruvbox-kvantum-theme": "gruvbox-kvantum-theme",
|
||||
"home-manager": "home-manager",
|
||||
"nix-doom-emacs": "nix-doom-emacs",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
18
flake.nix
18
flake.nix
|
|
@ -2,7 +2,10 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-22.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
|
||||
gruvbox-gtk-theme = {
|
||||
url = "github:Fausto-Korpsvart/Gruvbox-GTK-Theme";
|
||||
|
|
@ -16,7 +19,7 @@
|
|||
|
||||
outputs = inputs@{ self, home-manager, nixpkgs, nixpkgs-unstable, ... }:
|
||||
let
|
||||
inherit (lib.my) mapModules mapModulesRec mapHosts;
|
||||
inherit (lib.my) mapModules mapModulesRec mkHost;
|
||||
|
||||
system = "x86_64-linux";
|
||||
|
||||
|
|
@ -48,7 +51,14 @@
|
|||
|
||||
overlays = { my = (import ./overlay.nix); };
|
||||
|
||||
nixosConfigurations = mapHosts ./hosts { };
|
||||
|
||||
nixosConfigurations = {
|
||||
nixos-desktop = mkHost ./hosts/nixos-desktop/default.nix { };
|
||||
froidmpa-laptop = mkHost ./hosts/froidmpa-laptop/default.nix { };
|
||||
rpi3 = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [ ./hosts/rpi3/default.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,23 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
{ inputs, pkgs, ... }: {
|
||||
|
||||
nix = {
|
||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
};
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
boot.kernelParams = [ "cma=256M" ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/swapfile"; size = 1024; }];
|
||||
swapDevices = [{
|
||||
device = "/swapfile";
|
||||
size = 1024;
|
||||
}];
|
||||
|
||||
services.openssh.enable = true;
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
|
|
@ -37,11 +43,8 @@
|
|||
statistics_interval = 90;
|
||||
querylog_enabled = true;
|
||||
querylog_interval = "2160h";
|
||||
upstream_dns = [
|
||||
"tls://doh.mullvad.net"
|
||||
"[/lan/]192.168.1.1"
|
||||
"[//]192.168.1.1"
|
||||
];
|
||||
upstream_dns =
|
||||
[ "tls://doh.mullvad.net" "[/lan/]192.168.1.1" "[//]192.168.1.1" ];
|
||||
local_ptr_upstreams = [ "192.168.1.1" ];
|
||||
use_private_ptr_resolvers = true;
|
||||
resolve_clients = true;
|
||||
|
|
@ -63,9 +66,7 @@
|
|||
networking.firewall.allowedTCPPorts = [ 53 ];
|
||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
htop
|
||||
];
|
||||
environment.systemPackages = with pkgs; [ vim htop ];
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
{ config, options, lib, home-manager, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
{
|
||||
options = with types; {
|
||||
user = mkOpt attrs { };
|
||||
};
|
||||
with lib.my; {
|
||||
options = with types; { user = mkOpt attrs { }; };
|
||||
|
||||
config = {
|
||||
|
||||
|
|
@ -23,6 +20,7 @@ with lib.my;
|
|||
|
||||
users.${config.user.name} = {
|
||||
home = {
|
||||
enableNixpkgsReleaseCheck = true;
|
||||
stateVersion = config.system.stateVersion;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue