mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
add nixdev
This commit is contained in:
parent
b98549f36a
commit
31b83182dc
4 changed files with 69 additions and 1 deletions
16
flake.lock
16
flake.lock
|
@ -1,5 +1,20 @@
|
|||
{
|
||||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1628607662,
|
||||
|
@ -17,6 +32,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"impermanence": "impermanence",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"unstable": "unstable"
|
||||
}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-21.05";
|
||||
inputs.unstable.url = "nixpkgs/nixos-unstable";
|
||||
inputs.impermanence.url = "github:nix-community/impermanence";
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
outputs = { self, nixpkgs, impermanence, ... }@inputs:
|
||||
{
|
||||
nixosModules = {
|
||||
inherit (impermanence.nixosModules) impermanence;
|
||||
|
||||
baseline = import ./modules/baseline.nix;
|
||||
cli = import ./modules/cli.nix;
|
||||
gnome = import ./modules/gnome.nix;
|
||||
|
|
43
hosts/nixdev/configuration.nix
Normal file
43
hosts/nixdev/configuration.nix
Normal 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
6
hosts/nixdev/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
pkgs = "nixpkgs";
|
||||
system = "x86_64-linux";
|
||||
hardware = "qemu";
|
||||
module = ./configuration.nix;
|
||||
}
|
Loading…
Reference in a new issue