Skip to content

Commit

Permalink
Merge pull request #83 from redyf/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
redyf authored Jul 6, 2024
2 parents 9a4b706 + 3d9713b commit 3bb5706
Show file tree
Hide file tree
Showing 7 changed files with 300 additions and 31 deletions.
177 changes: 176 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 50 additions & 25 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
inputs.nixpkgs.follows = "nixpkgs";
};

raspberry-pi-nix.url = "github:tstat/raspberry-pi-nix";

hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
disko.url = "github:nix-community/disko";
stylix.url = "github:danth/stylix";
Expand Down Expand Up @@ -38,8 +40,51 @@
disko,
stylix,
font-flake,
raspberry-pi-nix,
...
} @ inputs: let
inherit (nixpkgs.lib) nixosSystem;
basic-config = {
pkgs,
lib,
...
}: {
users.users.root.initialPassword = "root";
networking = {
hostName = "raspberry";
firewall.enable = false;
wireless = {
enable = true;
};
};
environment.systemPackages = with pkgs; [bluez bluez-tools neovim git];
nix = {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
};
time.timeZone = "America/Bahia";
console = {keyMap = "br-abnt2";};
i18n = {
defaultLocale = "pt_BR.UTF-8";
};
hardware = {
bluetooth.enable = true;
raspberry-pi = {
config = {
all = {
base-dt-params = {
# enable autoprobing of bluetooth driver
# https://github.com/raspberrypi/linux/blob/c8c99191e1419062ac8b668956d19e788865912a/arch/arm/boot/dts/overlays/README#L222-L224
krnbt = {
enable = true;
value = "on";
};
};
};
};
};
};
};
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];

# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
Expand Down Expand Up @@ -77,31 +122,11 @@
disko.nixosModules.disko
];
};
# selene = nixpkgs.lib.nixosSystem {
# system = "x86_64-linux";
# specialArgs = {
# inherit
# inputs
# hyprland
# disko
# ;
# };
# modules = [
# ./hosts/selene/configuration.nix
# home-manager.nixosModules.home-manager
# {
# home-manager = {
# useUserPackages = true;
# useGlobalPkgs = false;
# extraSpecialArgs = {inherit inputs disko;};
# users.selene = ./home/selene/home.nix;
# };
# }
# hyprland.nixosModules.default
# {programs.hyprland.enable = false;}
# disko.nixosModules.disko
# ];
# };
# nix build '.#nixosConfigurations.selene.config.system.build.sdImage'
selene = nixosSystem {
system = "aarch64-linux";
modules = [raspberry-pi-nix.nixosModules.raspberry-pi basic-config];
};
};
devShells = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
Expand Down
8 changes: 5 additions & 3 deletions home/redyf/system/fonts/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{pkgs, ...}: {
{
inputs,
pkgs,
...
}: {
home = {
packages = with pkgs; [
dejavu_fonts
font-awesome
fira-code-symbols
material-design-icons
(nerdfonts.override {fonts = ["JetBrainsMono"];})
noto-fonts
powerline-symbols
# monolisa-script
# berkeley
# sf-mono-liga-bin
# geist-mono
];
};
}
2 changes: 2 additions & 0 deletions home/redyf/system/shell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ in {
gp = "git pull";
gs = "git status";
nb = "nix-build";
nd = "nix develop";
nr = "nix run";
ns = "nix-shell";
};

Expand Down
1 change: 1 addition & 0 deletions home/redyf/tools/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
init = {defaultBranch = "main";};
core.editor = "nvim";
pull.rebase = false;
maintenance.repo = "/home/redyf/opensource/nixpkgs";
};
};
home.packages = with pkgs; [
Expand Down
2 changes: 0 additions & 2 deletions home/redyf/tools/languages/c/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
cmake
gnumake
gnupatch
# astyle
# cpplint
clang-tools
];
}
Loading

0 comments on commit 3bb5706

Please sign in to comment.