igor: Prepare configuration of igor
This commit is contained in:
parent
ef1f55cd8d
commit
76fbe957a7
4 changed files with 144 additions and 0 deletions
21
flake.lock
generated
21
flake.lock
generated
|
|
@ -60,6 +60,26 @@
|
||||||
"type": "github"
|
"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": {
|
"emacs": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
|
@ -424,6 +444,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"disko": "disko",
|
||||||
"emacs": "emacs",
|
"emacs": "emacs",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"home-manager-unstable": "home-manager-unstable",
|
"home-manager-unstable": "home-manager-unstable",
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,9 @@
|
||||||
url = "github:ryantm/agenix";
|
url = "github:ryantm/agenix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
disko.url = "github:nix-community/disko";
|
||||||
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { home-manager, nixpkgs, nixpkgs-unstable, ... }@inputs: {
|
outputs = { home-manager, nixpkgs, nixpkgs-unstable, ... }@inputs: {
|
||||||
|
|
@ -75,6 +78,12 @@
|
||||||
};
|
};
|
||||||
homeConfigurations = import ./outputs/homeConfigurations inputs;
|
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;
|
nixOnDroidConfigurations.default = with inputs;
|
||||||
nix-on-droid.lib.nixOnDroidConfiguration {
|
nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
modules = [
|
modules = [
|
||||||
|
|
|
||||||
65
hosts/igor/default.nix
Normal file
65
hosts/igor/default.nix
Normal 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";
|
||||||
|
}
|
||||||
49
hosts/igor/disko-config.nix
Normal file
49
hosts/igor/disko-config.nix
Normal 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"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue