added rpi-kodi

This commit is contained in:
Jakub Kropáček 2024-10-02 13:51:48 +02:00
parent ac3f587612
commit 583ed4f408
6 changed files with 77 additions and 157 deletions

View file

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1727531434,
"narHash": "sha256-b+GBgCWd2N6pkiTkRZaMFOPztPO4IVTaclYPrQl2uLk=",
"lastModified": 1727809780,
"narHash": "sha256-7W5HE2IRiZglMBKcn9JtC6bveE6/F7IzQyV2XDanGFA=",
"owner": "nix-community",
"repo": "disko",
"rev": "b709e1cc33fcde71c7db43850a55ebe6449d0959",
"rev": "6c5ba9ec9d470c1ca29e7735762c9c366e28f7f5",
"type": "github"
},
"original": {
@ -71,11 +71,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1727617520,
"narHash": "sha256-uNfh3aMyCekMpjtL/PZtl2Hz/YqNuUpCBEzVxt1QYck=",
"lastModified": 1727747005,
"narHash": "sha256-2PBox0LkPhxirg1asEIpvfFARjq5KLw0EHPCy4unjPs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7eee17a8a5868ecf596bbb8c8beb527253ea8f4d",
"rev": "9682b2197dabc185fcca802ac1ac21136e48fcc2",
"type": "github"
},
"original": {
@ -96,11 +96,11 @@
},
"stable": {
"locked": {
"lastModified": 1727540905,
"narHash": "sha256-40J9tW7Y794J7Uw4GwcAKlMxlX2xISBl6IBigo83ih8=",
"lastModified": 1727672256,
"narHash": "sha256-9/79hjQc9+xyH+QxeMcRsA6hDyw6Z9Eo1/oxjvwirLk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fbca5e745367ae7632731639de5c21f29c8744ed",
"rev": "1719f27dd95fd4206afb9cec9f415b539978827e",
"type": "github"
},
"original": {

View file

@ -40,6 +40,12 @@
inherit inputs;
};
};
rpi-kodi = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
./hosts/rpi-kodi
];
};
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
};

View file

@ -16,7 +16,6 @@
services.power-profiles-daemon.enable = false;
services.tlp.enable = true;
networking.hostName = "lenar"; # Define your hostname.
# My own modules configuration

View file

@ -0,0 +1,25 @@
{
config,
pkgs,
inputs,
...
}:
{
imports = [
# Include the results of the hardware scan.
# ./hardware-configuration.nix
inputs.disko.nixosModules.disko
./disko.nix
];
networking.hostName = "rpi-kodi"; # Define your hostname.
# home-manager = {
# extraSpecialArgs = {
# inherit inputs;
# };
# users = {
# "krop" = import ../../users/krop;
# };
# };
}

37
hosts/rpi-kodi/disko.nix Normal file
View file

@ -0,0 +1,37 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/mmcblk0"; # Internal SD card for Raspberry Pi
content = {
type = "MBR"; # MBR partitioning for Raspberry Pi
partitions = {
# Boot partition (FAT32 for bootloader files)
boot = {
priority = 1;
name = "boot";
start = "1M";
end = "256M"; # 256MB FAT32 partition for boot files
type = "0C"; # FAT32 partition type
content = {
type = "filesystem";
format = "vfat"; # FAT32 for the boot partition
mountpoint = "/boot"; # Mounted as /boot
};
};
# Root partition (ext4 for the main system)
root = {
size = "100%"; # Use the remaining space for the root filesystem
content = {
type = "filesystem"; # Basic filesystem (ext4)
format = "ext4"; # Use ext4 for the root filesystem
mountpoint = "/"; # Root of the system
};
};
};
};
};
};
};
}

View file

@ -1,147 +0,0 @@
{ config, pkgs, ... }:
{
home.username = "krop";
home.homeDirectory = "/home/krop";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
gnomeExtensions.grand-theft-focus
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/krop/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
# EDITOR = "emacs";
};
dconf = {
enable = true;
settings."org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = with pkgs.gnomeExtensions; [
grand-theft-focus.extensionUuid
];
};
};
gtk = {
enable = true;
gtk3.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
gtk4.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
};
qt = {
enable = true;
platformTheme.name = "adwaita"; # TODO: fix themes
style.name = "adwaita-dark";
};
programs.git = {
enable = true;
userName = "Jakub Kropáček";
userEmail = "kropikuba@gmail.com";
includes =
let
workcfg = {
user = {
email = "jakub.kropacek@olc.cz";
name = "Jakub Kropáček";
};
};
in
[
{
condition = "gitdir:~/Repositories/OLC/**";
contents = workcfg;
}
{
condition = "gitdir:~/Repositories/OLC-Hexpol/**";
contents = workcfg;
}
];
extraConfig = {
init = {
defaultBranch = "master";
};
push = {
autoSetupRemote = true;
};
status = {
submoduleSummary = true;
};
diff = {
submodule = "log";
};
core = {
autocrlf = "input";
};
};
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}