add nixdev

This commit is contained in:
Sean Buckley 2021-08-13 12:14:42 -04:00
parent b98549f36a
commit 31b83182dc
4 changed files with 69 additions and 1 deletions

View file

@ -1,5 +1,20 @@
{ {
"nodes": { "nodes": {
"impermanence": {
"locked": {
"lastModified": 1611747548,
"narHash": "sha256-2z5wmWda1uI4IkTZrW52jiHq3bzhYLc+GgjvaSd544M=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "58558845bc68dcf2bb32caa80564f7fe3f6cbc61",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1628607662, "lastModified": 1628607662,
@ -17,6 +32,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"impermanence": "impermanence",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"unstable": "unstable" "unstable": "unstable"
} }

View file

@ -1,10 +1,13 @@
{ {
inputs.nixpkgs.url = "nixpkgs/nixos-21.05"; inputs.nixpkgs.url = "nixpkgs/nixos-21.05";
inputs.unstable.url = "nixpkgs/nixos-unstable"; inputs.unstable.url = "nixpkgs/nixos-unstable";
inputs.impermanence.url = "github:nix-community/impermanence";
outputs = { self, nixpkgs, ... }@inputs: outputs = { self, nixpkgs, impermanence, ... }@inputs:
{ {
nixosModules = { nixosModules = {
inherit (impermanence.nixosModules) impermanence;
baseline = import ./modules/baseline.nix; baseline = import ./modules/baseline.nix;
cli = import ./modules/cli.nix; cli = import ./modules/cli.nix;
gnome = import ./modules/gnome.nix; gnome = import ./modules/gnome.nix;

View file

@ -0,0 +1,43 @@
{ ... }:
{
sconfig = {
profile = "server";
};
environment.persistence."/nix/persist" = {
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_rsa_key"
];
directories = [
"/home"
"/var/log"
];
};
security.sudo.wheelNeedsPassword = false;
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
};
networking = {
useDHCP = false;
interfaces.enp6s18.ipv4.addresses = [{ address = "10.5.7.160"; prefixLength = 24; }];
defaultGateway = "10.5.7.1";
nameservers = [ "1.1.1.1" ];
};
fileSystems =
{
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" ]; };
"/boot" = { device = "/dev/disk/by-partlabel/_esp"; fsType = "vfat"; options = [ "discard" "noatime" ]; };
"/nix" = { device = "/dev/disk/by-partlabel/_nix"; fsType = "ext4"; options = [ "discard" "noatime" ]; };
};
system.stateVersion = "21.05";
}

6
hosts/nixdev/default.nix Normal file
View file

@ -0,0 +1,6 @@
{
pkgs = "nixpkgs";
system = "x86_64-linux";
hardware = "qemu";
module = ./configuration.nix;
}