mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
[YUKARI] Initialise
This commit is contained in:
parent
572dd0e4db
commit
aa266cc383
28 changed files with 877 additions and 614 deletions
|
|
@ -85,12 +85,24 @@
|
|||
lib = self;
|
||||
isOverlayLib = true;
|
||||
});
|
||||
in
|
||||
args:
|
||||
sys = args:
|
||||
lib.nixosSystem ({
|
||||
inherit lib;
|
||||
}
|
||||
// args);
|
||||
in
|
||||
args: let
|
||||
nixos = sys args;
|
||||
in
|
||||
nixos.extendModules {
|
||||
modules = [
|
||||
({lib, ...}: {
|
||||
scalpel.trafos = lib.mkForce {};
|
||||
})
|
||||
inputs.scalpel.nixosModules.scalpel
|
||||
];
|
||||
specialArgs = {prev = sys;};
|
||||
};
|
||||
darwin = inputs.darwin.lib.darwinSystem;
|
||||
macos = inputs.darwin.lib.darwinSystem;
|
||||
}
|
||||
|
|
@ -127,9 +139,9 @@
|
|||
user = "root";
|
||||
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.${name};
|
||||
};
|
||||
hostname = "${name}.inskip.me";
|
||||
hostname = "5.78.94.220";
|
||||
sshOpts = ["-p" "${builtins.toString (builtins.head inputs.self.nixosConfigurations.${name}.config.services.openssh.ports)}"];
|
||||
sshUser = "deploy";
|
||||
sshUser = "root";
|
||||
user = "root";
|
||||
autoRollback = true;
|
||||
magicRollback = true;
|
||||
|
|
@ -141,20 +153,9 @@
|
|||
};
|
||||
})
|
||||
];
|
||||
"${host.folder}Configurations".${name} = let
|
||||
hostConfig = host.builder {
|
||||
inherit (host) system modules specialArgs;
|
||||
};
|
||||
in
|
||||
if host.folder == "nixos"
|
||||
then
|
||||
hostConfig.extendModules {
|
||||
modules = [inputs.scalpel.nixosModule];
|
||||
specialArgs = {
|
||||
prev = hostConfig;
|
||||
};
|
||||
}
|
||||
else hostConfig;
|
||||
"${host.folder}Configurations".${name} = host.builder {
|
||||
inherit (host) system modules specialArgs;
|
||||
};
|
||||
};
|
||||
in
|
||||
set.merge (set.mapToValues processHost hostConfigs)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,27 @@ _: let
|
|||
gnome
|
||||
]);
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
fd # fd, better fine!
|
||||
ripgrep # rg, better grep!
|
||||
go # Required for pulumi
|
||||
gotools
|
||||
go-outline
|
||||
gocode
|
||||
gopkgs
|
||||
gocode-gomod
|
||||
godef
|
||||
golint
|
||||
gopls
|
||||
pulumi-bin # Infrastructure as code
|
||||
deadnix # dead-code scanner
|
||||
alejandra # code formatter
|
||||
statix # anti-pattern finder
|
||||
deploy-rs.deploy-rs # deployment system
|
||||
rnix-lsp # vscode nix extensions
|
||||
terraform # terraform
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
|
|
|||
46
systems/yukari.nix
Normal file
46
systems/yukari.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
_: let
|
||||
hostConfig = {
|
||||
lib,
|
||||
tree,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = with tree.nixos; [
|
||||
roles.server
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
version = 2;
|
||||
};
|
||||
initrd = {
|
||||
availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
||||
kernelModules = [];
|
||||
};
|
||||
kernelModules = [];
|
||||
extraModulePackages = [];
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/5db295ec-a933-4395-b918-ebef6f95d8c3";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
networking.hostName = "yukari";
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
};
|
||||
in {
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
hostConfig
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue