setup initial build for rico

This commit is contained in:
Adithya 2023-04-10 23:07:41 +05:30
parent d91919d47b
commit 918859b31f
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
6 changed files with 102 additions and 26 deletions

View file

@ -331,6 +331,21 @@
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1680876084,
"narHash": "sha256-eP9yxP0wc7XuVaODugh+ajgbFGaile2O1ihxiLxOuvU=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "3006d2860a6ed5e01b0c3e7ffb730e9b293116e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1681036984,
@ -522,6 +537,7 @@
"hyprland": "hyprland",
"impermanence": "impermanence",
"lanzaboote": "lanzaboote",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim"
}

View file

@ -25,28 +25,30 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware = {
url = "github:NixOS/nixos-hardware";
};
nixvim = {
url = "github:pta2002/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, hyprland, impermanence, lanzaboote, nixvim }@inputs:
let
system = "x86_64-linux";
lib = nixpkgs.lib;
in
{
formatter.${system} = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
outputs = { self, nixpkgs, home-manager, hyprland, impermanence, lanzaboote, nixos-hardware, nixvim }@inputs: {
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt;
formatter."aarch64-linux" = nixpkgs.legacyPackages."aarch64-linux".nixpkgs-fmt;
nixosConfigurations = {
Skipper = lib.nixosSystem {
Skipper = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
modules = [
./nix.nix
{
nixpkgs.overlays = [ (import ./packages) hyprland.overlays.default ];
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
nixpkgs.hostPlatform = nixpkgs.lib.mkDefault "x86_64-linux";
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
home-manager.nixosModules.home-manager
@ -58,6 +60,23 @@
./home
];
};
Rico2 = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = inputs;
modules = [
./nix.nix
{
nixpkgs.hostPlatform = nixpkgs.lib.mkDefault "aarch64-linux";
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
nixos-hardware.nixosModules.raspberry-pi-4
./users
./system.rico
];
};
};
};
}

View file

@ -1,4 +1,4 @@
{ lib, ... }: {
{ ... }: {
nix.settings = {
substituters = [
"https://nix-community.cachix.org/"
@ -10,5 +10,4 @@
experimental-features = [ "nix-command" "flakes" ];
};
nixpkgs.config.allowUnfree = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

31
system.rico/default.nix Normal file
View file

@ -0,0 +1,31 @@
{ ... }: {
imports = [
./hardware
];
networking.hostName = "Rico2";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
};
supportedLocales = [ "en_US.UTF-8/UTF-8" ];
};
programs.zsh.enable = true;
services.openssh.enable = true;
time.timeZone = "Asia/Kolkata";
system.stateVersion = "23.05";
}

View file

@ -0,0 +1,3 @@
{ ... }: {
imports = [ ./filesystem.nix ];
}

View file

@ -0,0 +1,8 @@
{ ... }: {
fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
}