moving stuff around

This commit is contained in:
mjallen18
2024-02-18 13:25:15 -06:00
parent 78db245394
commit 9b5fb67c77
13 changed files with 28 additions and 61 deletions

View File

@@ -10,6 +10,7 @@ let
SSID = "Joeys Jungle";
SSIDpassword = "kR8v&3Qd";
interface = "wlan0";
timezone = "America/Chicago";
hostname = "nixos-pi4";
in {
imports =

View File

@@ -5,6 +5,7 @@
{ config, lib, pkgs, ... }:
let
user = "matt";
password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06";
hostname = "matt-nixos";
timezone = "America/Chicago";
# discover-wrapper is needed as of 1/24/24 since PackageKit does not work correctly so this removes error messages.

View File

@@ -2,7 +2,10 @@
description = "flake for matt-nixos";
inputs = {
# Common
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# Desktop
kde.url = "github:nix-community/kde2nix";
nix-flatpak.url = "github:gmodena/nix-flatpak";
# impermanence.url = "github:nix-community/impermanence";
@@ -12,11 +15,15 @@
url = "github:nix-community/lanzaboote/v0.3.0";
inputs.nixpkgs.follows = "nixpkgs";
};
# Pi4
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
# outputs = { self, nixpkgs, impermanence, lanzaboote } @ inputs: {
outputs = { self, nixpkgs, lanzaboote, kde, nix-flatpak, home-manager } @ inputs: {
nixosConfigurations = {
# Desktop
"matt-nixos" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
@@ -34,6 +41,15 @@
}
];
};
# Pi4
"nixos-pi4" = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
nixos-hardware.nixosModules.raspberry-pi-4
./configuration.nix
];
};
};
};
}

View File

@@ -28,7 +28,7 @@
WantedBy = [ "default.target" ];
};
Service = {
ExecStart = "/home/matt/nix-config/reset_wifi";
ExecStart = "/home/matt/nix-config/scripts/reset_wifi";
# ExecStart = "${pkgs.writeShellScript "fix-wifi" ''
# #!/usr/bin/env bash
# echo 1 | sudo -u root tee /sys/bus/pci/devices/0000\:09\:00.0/reset

42
pi4/flake.lock generated
View File

@@ -1,42 +0,0 @@
{
"nodes": {
"nixos-hardware": {
"locked": {
"lastModified": 1708091350,
"narHash": "sha256-o28BJYi68qqvHipT7V2jkWxDiMS1LF9nxUsou+eFUPQ=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "106d3fec43bcea19cb2e061ca02531d54b542ce3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1708151420,
"narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6e2f00c83911461438301db0dba5281197fe4b3a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@@ -1,18 +0,0 @@
{
description = "NixOS configuration with flakes for raspberry pi 4";
inputs = {
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = { self, nixpkgs, nixos-hardware } @ inputs: {
nixosConfigurations = {
"nixos-pi4" = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
nixos-hardware.nixosModules.raspberry-pi-4
./configuration.nix
];
};
};
};
}

2
scripts/.directory Normal file
View File

@@ -0,0 +1,2 @@
[Desktop Entry]
Icon=folder-script

2
scripts/garbage-collection Executable file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env bash
sudo nix-store --gc

3
scripts/power-limit Executable file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
sudo su - root
echo 293000000 > /sys/class/drm/card0/device/hwmon/hwmon0/power1_cap

2
scripts/update-flakes Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env bash
sudo nix flake update