Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
7dec9b5ff9 |
21
flake.lock
generated
21
flake.lock
generated
@ -1,25 +1,5 @@
|
||||
{
|
||||
"nodes": {
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726524467,
|
||||
"narHash": "sha256-xkPPPvfHhHK7BNX5ZrQ9N6AIEixCmFzRZHduDf0zv30=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "22ee467a54a3ab7fa9d637ccad5330c6c087e9dc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"dotfiles": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -90,7 +70,6 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"disko": "disko",
|
||||
"dotfiles": "dotfiles",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
|
11
flake.nix
11
flake.nix
@ -18,11 +18,6 @@
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
dotfiles = {
|
||||
url = "git+https://code.m3tam3re.com/m3tam3re/dotfiles-flake-demo.git";
|
||||
flake = false;
|
||||
@ -31,7 +26,6 @@
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
disko,
|
||||
dotfiles,
|
||||
home-manager,
|
||||
nixpkgs,
|
||||
@ -53,10 +47,7 @@
|
||||
nixosConfigurations = {
|
||||
m3-kratos-vm = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
./hosts/m3-kratos
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
modules = [./hosts/m3-kratos];
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
|
@ -7,7 +7,6 @@
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./extraServices
|
||||
./users
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./podman.nix
|
||||
];
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.extraServices.podman;
|
||||
in {
|
||||
options.extraServices.podman.enable = mkEnableOption "enable podman";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
flags = [
|
||||
"--filter=until=24h"
|
||||
"--filter=label!=important"
|
||||
];
|
||||
};
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
podman-compose
|
||||
];
|
||||
};
|
||||
}
|
1
hosts/common/users/m3tam3re
Symbolic link
1
hosts/common/users/m3tam3re
Symbolic link
@ -0,0 +1 @@
|
||||
../../../home/m3tam3re
|
@ -4,13 +4,13 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./disko-config.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
|
||||
networking.hostName = "m3-kratos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
@ -33,11 +33,5 @@
|
||||
#:w
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
{
|
||||
imports = [
|
||||
../common
|
||||
./configuration.nix
|
||||
./services
|
||||
];
|
||||
|
||||
extraServices.podman.enable = true;
|
||||
imports = [../common ./configuration.nix];
|
||||
}
|
||||
|
@ -1,36 +0,0 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
nixos = {
|
||||
type = "disk";
|
||||
device = "/dev/vda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "1M";
|
||||
type = "EF02"; # for grub MBR
|
||||
};
|
||||
ESP = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,15 +1,11 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
@ -17,6 +13,13 @@
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/b3fbba01-1206-44d9-9b15-72e6313b4f72";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
@ -26,3 +29,4 @@
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./echo.nix
|
||||
];
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
{lib, ...}: {
|
||||
virtualisation.oci-containers.containers."echo-http-service" = {
|
||||
image = "hashicorp/http-echo";
|
||||
extraOptions = ["-text='Hello, World!'" "--network=web"];
|
||||
ports = ["5678:5678"];
|
||||
};
|
||||
system.activationScripts.createPodmanNetworkWeb = lib.mkAfter ''
|
||||
if ! /run/current-system/sw/bin/podman network exists web; then
|
||||
/run/current-system/sw/bin/podman network create web
|
||||
fi
|
||||
'';
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./containers
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user