Update main branch #1

Merged
jakalx merged 120 commits from develop into main 2024-02-05 21:51:32 +01:00
4 changed files with 144 additions and 0 deletions
Showing only changes of commit 76fbe957a7 - Show all commits

21
flake.lock generated
View file

@ -60,6 +60,26 @@
"type": "github"
}
},
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1706302763,
"narHash": "sha256-Le1wk75qlzOSfzDk8vqYxSdoEyr/ORIbMhziltVNGYw=",
"owner": "nix-community",
"repo": "disko",
"rev": "f7424625dc1f2e4eceac3009cbd1203d566feebc",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "disko",
"type": "github"
}
},
"emacs": {
"inputs": {
"flake-utils": "flake-utils",
@ -424,6 +444,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"disko": "disko",
"emacs": "emacs",
"home-manager": "home-manager_2",
"home-manager-unstable": "home-manager-unstable",

View file

@ -40,6 +40,9 @@
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { home-manager, nixpkgs, nixpkgs-unstable, ... }@inputs: {
@ -75,6 +78,12 @@
};
homeConfigurations = import ./outputs/homeConfigurations inputs;
nixosConfigurations."igor" = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [ ./hosts/igor ];
};
nixOnDroidConfigurations.default = with inputs;
nix-on-droid.lib.nixOnDroidConfiguration {
modules = [

65
hosts/igor/default.nix Normal file
View file

@ -0,0 +1,65 @@
{ config, inputs, lib, pkgs, ... }:
{
imports = [
inputs.disko.nixosModules.disko
../../modules/security.nix
../../modules/nix-config.nix
../../modules/iohk.nix
../../modules/timezone.nix
../../modules/keybase.nix
../../modules/ssh.nix
./disko-config.nix
];
networking = let extIface = "ens3";
in {
hostName = "igor";
domain = "failco.de";
wireless.enable = false;
useDHCP = false;
enableIPv6 = false;
interfaces.${extIface} = {
ipv4.addresses = [{
address = "192.168.0.2";
prefixLength = 24;
}];
};
defaultGateway = "192.168.0.1";
nameservers = [ "1.1.1.1" "8.8.8.8" ];
firewall = {
allowedTCPPorts = [ 22 80 443 ];
allowedUDPPorts = [ ];
};
};
security.sudo = {
enable = true;
execWheelOnly = true;
};
# Select internationalization properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "dvorak";
};
# Define a user account. Don't forget to set a password with passwd.
users.users.me = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
shell = pkgs.zsh;
};
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
programs.zsh.enable = true;
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,49 @@
{
disko.devices = {
disk.main = {
type = "disk";
device = "/dev/mmcblk0";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/rootfs" = { mountpoint = "/"; };
"/home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/nix";
};
"/swap" = {
mountpoint = "/.swapvol";
swap = { swapfile.size = "2G"; };
};
};
};
};
};
};
};
};
}