flake
This commit is contained in:
parent
3fd65f494d
commit
b3ef8435f7
2 changed files with 37 additions and 14 deletions
|
@ -5,8 +5,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ # Include the results of the hardware scan.
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -23,10 +22,12 @@
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
networking.defaultGateway.address = "192.168.1.1";
|
||||||
networking.interfaces.enp3s0.ipv4.addresses = [{
|
networking.interfaces.enp3s0.ipv4.addresses = [{
|
||||||
address = "192.168.1.25";
|
address = "192.168.1.25";
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
}];
|
}];
|
||||||
|
networking.nameservers = [ "192.168.1.69" "1.1.1.1" ];
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Oslo";
|
time.timeZone = "Europe/Oslo";
|
||||||
|
|
||||||
|
@ -47,17 +48,17 @@
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Hephaestus";
|
description = "Hephaestus";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
packages = with pkgs; [];
|
packages = with pkgs; [ ];
|
||||||
};
|
};
|
||||||
users.users.ansible= {
|
users.users.ansible = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "networkmanager" "sudo"];
|
extraGroups = [ "wheel" "networkmanager" "sudo" ];
|
||||||
packages = with pkgs; [];
|
packages = with pkgs; [ ];
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAGKOGZKJO31YZem1OTZtIg3fKaatbFmqmRNRD+K9GpX rgl002@student.uib.no"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAGKOGZKJO31YZem1OTZtIg3fKaatbFmqmRNRD+K9GpX rgl002@student.uib.no"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
@ -86,7 +87,9 @@
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.openssh.settings.PermitRootLogin = "yes";
|
services.openssh.settings.PermitRootLogin = "no";
|
||||||
|
nix.settings.trusted-users = [ "rolf" ];
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
|
20
nixos/hephaestus/flake.nix
Normal file
20
nixos/hephaestus/flake.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
description = "A simple NixOS flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
# NixOS official package source, using the nixos-24.11 branch here
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, ... }@inputs: {
|
||||||
|
# Please replace my-nixos with your hostname
|
||||||
|
nixosConfigurations.hephaestus = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
# Import the previous configuration.nix we used,
|
||||||
|
# so the old configuration file still takes effect
|
||||||
|
./configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue