1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

updates to server config

Signed-off-by: Stefan Ellmauthaler <stefan.ellmauthaler@tu-dresden.de>
This commit is contained in:
Stefan Ellmauthaler 2021-11-09 21:02:26 +01:00
parent 7d89090200
commit dfd8e42907
4 changed files with 62 additions and 17 deletions

View File

@ -1,6 +1,6 @@
{ flakes, flakeOutputs, ...}: { flakes, flakeOutputs, ...}:
let let
mkMachine = args: mkMachine = args:
let let
name = if builtins.isString args then args else args.name; name = if builtins.isString args then args else args.name;
system = if args ? system then args.system else "x86_64-linux"; system = if args ? system then args.system else "x86_64-linux";
@ -10,18 +10,18 @@
pkgs = flakes.nixpkgs; pkgs = flakes.nixpkgs;
configuration = if args ? configuration then args.configuration else import ./baseconfiguration.nix {inherit extraOverlays system pkgs name type flakes flakeOutputs;} ; configuration = if args ? configuration then args.configuration else import ./baseconfiguration.nix {inherit extraOverlays system pkgs name type flakes flakeOutputs;} ;
in in
{ {
inherit name; inherit name;
value = pkgs.lib.nixosSystem { value = pkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
configuration configuration
{ nix.package = pkgs.legacyPackages.${system}.nixUnstable; } { nix.package = pkgs.legacyPackages.${system}.nixUnstable; }
] ++ extraModules ] ++ extraModules
++ flakes.nixpkgs.lib.mapAttrsToList (_: module: module) ++ flakes.nixpkgs.lib.mapAttrsToList (_: module: module)
flakeOutputs.nixosModules; flakeOutputs.nixosModules;
};
}; };
};
in in
flakes.nixpkgs.lib.listToAttrs (map mkMachine [ flakes.nixpkgs.lib.listToAttrs (map mkMachine [
{ {
@ -33,7 +33,7 @@ flakes.nixpkgs.lib.listToAttrs (map mkMachine [
extraModules = [ flakes.home-manager.nixosModules.home-manager ]; extraModules = [ flakes.home-manager.nixosModules.home-manager ];
} }
{ {
name = "ellmauthaler.net"; name = "ellmauthaler";
extraModules = [ flakes.home-manager.nixosModules.home-manager ]; extraModules = [ flakes.home-manager.nixosModules.home-manager ];
type = [ ./layer/server.nix ]; type = [ ./layer/server.nix ];
} }

6
flake.lock generated
View File

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"emacs-overlay": { "emacs-overlay": {
"locked": { "locked": {
"lastModified": 1636450031, "lastModified": 1636478422,
"narHash": "sha256-20fe+sqam5FHDmaxKm4ix55/FPgkWV64V8WdL8DcMQM=", "narHash": "sha256-HvuQabo0MjPudk6Un73Fr49s42JIYaoptzsJ4pTmRBA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "afd2e166179d8ba8c8eb6dc24e23fef8d10ce3ab", "rev": "5dbb662e9ba260eb9c0d83b8dce11a2b6d8a4831",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -0,0 +1,7 @@
{ config, pkgs, ...}:
{
networking ={
hostName = "ellmauthaler";
domain = "net";
};
}

View File

@ -0,0 +1,38 @@
# 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, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/da267a3c-34e3-4218-933f-10738ee61eb6";
fsType = "ext4";
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/9ebd7aff-629b-449b-83d8-6381a04eb708";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/DE6D-C383";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/0069f1fa-dd8e-4c0a-8f01-a576af29909e"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
}