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" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1681036984, "lastModified": 1681036984,
@ -522,6 +537,7 @@
"hyprland": "hyprland", "hyprland": "hyprland",
"impermanence": "impermanence", "impermanence": "impermanence",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixvim": "nixvim" "nixvim": "nixvim"
} }

View file

@ -25,39 +25,58 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixos-hardware = {
url = "github:NixOS/nixos-hardware";
};
nixvim = { nixvim = {
url = "github:pta2002/nixvim"; url = "github:pta2002/nixvim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = { self, nixpkgs, home-manager, hyprland, impermanence, lanzaboote, nixvim }@inputs: outputs = { self, nixpkgs, home-manager, hyprland, impermanence, lanzaboote, nixos-hardware, nixvim }@inputs: {
let formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt;
system = "x86_64-linux"; formatter."aarch64-linux" = nixpkgs.legacyPackages."aarch64-linux".nixpkgs-fmt;
lib = nixpkgs.lib; nixosConfigurations = {
in Skipper = nixpkgs.lib.nixosSystem {
{ system = "x86_64-linux";
formatter.${system} = nixpkgs.legacyPackages.${system}.nixpkgs-fmt; specialArgs = inputs;
nixosConfigurations = { modules = [
Skipper = lib.nixosSystem { ./nix.nix
specialArgs = inputs;
modules = [
./nix.nix
{ {
nixpkgs.overlays = [ (import ./packages) hyprland.overlays.default ]; 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 home-manager.nixosModules.home-manager
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote lanzaboote.nixosModules.lanzaboote
./system ./system
./users ./users
./home ./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 = { nix.settings = {
substituters = [ substituters = [
"https://nix-community.cachix.org/" "https://nix-community.cachix.org/"
@ -10,5 +10,4 @@
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
}; };
nixpkgs.config.allowUnfree = true; 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" ];
};
}