pancake: init

This commit is contained in:
cy 2025-01-23 16:39:20 -05:00
parent 9de0b072cd
commit ba3bc88e7b
4 changed files with 140 additions and 8 deletions

16
flake.lock generated
View file

@ -899,6 +899,21 @@
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": {
"locked": {
"lastModified": 1737590910,
"narHash": "sha256-qM/y6Dtpu9Wmf5HqeZajQdn+cS0aljdYQQQnrvx+LJE=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "9368027715d8dde4b84c79c374948b5306fdd2db",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1726042813, "lastModified": 1726042813,
@ -1207,6 +1222,7 @@
"lix": "lix", "lix": "lix",
"lix-module": "lix-module", "lix-module": "lix-module",
"niri": "niri", "niri": "niri",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-garage": "nixpkgs-garage", "nixpkgs-garage": "nixpkgs-garage",
"nixvim": "nixvim", "nixvim": "nixvim",

View file

@ -68,6 +68,7 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat"; inputs.flake-compat.follows = "flake-compat";
}; };
nixos-hardware.url = "github:nixos/nixos-hardware";
nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR
@ -145,9 +146,9 @@
flake = flake =
let let
pkgs = import nixpkgs { pkgsFor = system: import nixpkgs {
config.allowUnfree = true; config.allowUnfree = true;
system = "x86_64-linux"; system = system;
overlays = [ overlays = [
inputs.niri.overlays.niri inputs.niri.overlays.niri
inputs.rust-overlay.overlays.default inputs.rust-overlay.overlays.default
@ -164,7 +165,7 @@
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ {
nixpkgs = { inherit pkgs; }; nixpkgs.pkgs = pkgsFor "x86_64-linux";
} }
./hosts/ytnix ./hosts/ytnix
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
@ -178,7 +179,7 @@
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ {
nixpkgs = { inherit pkgs; }; nixpkgs.pkgs = pkgsFor "x86_64-linux";
disabledModules = [ disabledModules = [
"services/web-servers/garage.nix" "services/web-servers/garage.nix"
]; ];
@ -194,7 +195,7 @@
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ {
nixpkgs = { inherit pkgs; }; nixpkgs.pkgs = pkgsFor "x86_64-linux";
} }
./hosts/titan ./hosts/titan
disko.nixosModules.disko disko.nixosModules.disko
@ -202,6 +203,19 @@
./modules ./modules
]; ];
}; };
pancake = lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
{
nixpkgs.pkgs = pkgsFor "aarch64-linux";
}
disko.nixosModules.disko
inputs.nixos-hardware.nixosModules.raspberry-pi-3
./hosts/pancake
./modules
];
};
}; };
homeConfigurations = homeConfigurations =
let let
@ -209,7 +223,7 @@
in in
{ {
"yt@ytnix" = lib.homeManagerConfiguration { "yt@ytnix" = lib.homeManagerConfiguration {
inherit pkgs; pkgs = pkgsFor "x86_64-linux";
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
modules = [ modules = [
./home/yt/ytnix.nix ./home/yt/ytnix.nix
@ -219,7 +233,7 @@
}; };
"yt@chunk" = lib.homeManagerConfiguration { "yt@chunk" = lib.homeManagerConfiguration {
inherit pkgs; pkgs = pkgsFor "x86_64-linux";
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
modules = [ modules = [
./home/yt/chunk.nix ./home/yt/chunk.nix
@ -228,7 +242,7 @@
}; };
"codespace@codespace" = lib.homeManagerConfiguration { "codespace@codespace" = lib.homeManagerConfiguration {
inherit pkgs; pkgs = pkgsFor "x86_64-linux";
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
modules = [ modules = [
./home/yt/codespace.nix ./home/yt/codespace.nix

69
hosts/pancake/default.nix Normal file
View file

@ -0,0 +1,69 @@
{
modulesPath,
pkgs,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
../common.nix
./disk-config.nix
./hardware-configuration.nix
];
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdhAQYy0+vS+QmyCd0MAbqbgzyMGcsuuFyf6kg2yKge yt@ytlinux"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINyn2+OoRN4nExti+vFQ1NHEZip0slAoCH9C5/FzvgZD yt@ytnix"
];
system.stateVersion = "24.05";
environment.systemPackages = with pkgs; [
curl
git
];
# network stuff
networking.hostName = "pancake";
networking.networkmanager.enable = true;
networking.firewall = {
enable = true;
allowedTCPPorts = [
22
80
443
];
allowedUDPPorts = [
443
];
};
networkings.wireless.enable = true;
networkings.wireless.networks = {
"36 Halsey" = {
psk = "Canada2022";
};
"cy" = {
psk = "12345678";
};
};
hardware.enableRedistributableFirmware = true;
services.desktopManager.plasma6.enable = true;
services.displayManager = {
enable = true;
autoLogin.user = "yt";
};
users.users.yt.extraGroups = [
"wheel"
];
security.sudo.enable = true;
security.sudo.wheelNeedsPassword = false;
}

View file

@ -0,0 +1,33 @@
{
disko.devices = {
disk = {
main = {
device = "/dev/mmcblk0";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "500M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}