Last active
October 16, 2023 19:16
-
-
Save PedroHLC/c54c69f6bc4d797e41a328512a355c92 to your computer and use it in GitHub Desktop.
Useless NixOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, lib, ... }: | |
{ | |
# Docker is already initialized | |
boot = { | |
isContainer = true; | |
initrd.enable = false; | |
kernel.enable = false; | |
loader.grub.enable = false; | |
modprobeConfig.enable = false; | |
}; | |
system.build.installBootLoader = "${pkgs.coreutils}/bin/true"; | |
console.enable = false; | |
# No need to set network | |
environment.etc = { | |
hosts.enable = false; | |
"resolv.conf".enable = false; | |
}; | |
networking.dhcpcd.enable = false; | |
services.resolved.enable = false; | |
# No need for this too | |
powerManagement.enable = false; | |
services.udev.enable = lib.mkDefault false; | |
systemd = { | |
services = { | |
firewall.enable = false; | |
systemd-resolved.enable = lib.mkDefault false; | |
}; | |
enableEmergencyMode = false; | |
}; | |
# User is god | |
users.users.god = { | |
isNormalUser = true; | |
uid = 1000; | |
extraGroups = [ "wheel" ]; | |
}; | |
users.users.root.extraGroups = [ "root" ]; | |
security.sudo.wheelNeedsPassword = lib.mkDefault false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nodes": { | |
"nixpkgs": { | |
"locked": { | |
"narHash": "sha256-cumLLb1QOUtWieUnLGqo+ylNt3+fU8Lcv5Zl+tYbRUE=", | |
"rev": "898cb2064b6e98b8c5499f37e81adbdf2925f7c5", | |
"revCount": 491699, | |
"type": "tarball", | |
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2305.491699%2Brev-898cb2064b6e98b8c5499f37e81adbdf2925f7c5/018b336b-35f9-7d98-bda1-0293f2b67c76/source.tar.gz" | |
}, | |
"original": { | |
"type": "tarball", | |
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.2305.%2A.tar.gz" | |
} | |
}, | |
"root": { | |
"inputs": { | |
"nixpkgs": "nixpkgs" | |
} | |
} | |
}, | |
"root": "root", | |
"version": 7 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2305.*.tar.gz"; | |
outputs = { nixpkgs, self }: { | |
defaultPackage.x86_64-linux = (import "${nixpkgs}/nixos/lib/eval-config.nix" { | |
system = "x86_64-linux"; | |
modules = [ | |
./core.nix | |
]; | |
}).config.system.build.toplevel; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment