4 Commits

Author SHA1 Message Date
32b01c84db mob next [ci-skip] [ci skip] [skip ci]
lastFile:inventories/default.nix
2026-01-12 17:43:05 +07:00
8982b61d79 mob next [ci-skip] [ci skip] [skip ci]
lastFile:machines/rana/configuration.nix
2026-01-12 17:17:23 +07:00
7b48370a1c mob next [ci-skip] [ci skip] [skip ci]
lastFile:modules/clan/home-manager-users/emmie/home.nix
2026-01-12 16:54:10 +07:00
96811a2ac8 mob next [ci-skip] [ci skip] [skip ci]
lastFile:flake.lock
2026-01-12 14:47:18 +07:00
8 changed files with 193 additions and 0 deletions

21
flake.lock generated
View File

@@ -121,6 +121,26 @@
"type": "github" "type": "github"
} }
}, },
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1768068402,
"narHash": "sha256-bAXnnJZKJiF7Xr6eNW6+PhBf1lg2P1aFUO9+xgWkXfA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8bc5473b6bc2b6e1529a9c4040411e1199c43b4c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"import-tree": { "import-tree": {
"locked": { "locked": {
"lastModified": 1752730890, "lastModified": 1752730890,
@@ -224,6 +244,7 @@
"clan-core": "clan-core", "clan-core": "clan-core",
"devshell": "devshell", "devshell": "devshell",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"home-manager": "home-manager",
"import-tree": "import-tree", "import-tree": "import-tree",
"liminix": "liminix", "liminix": "liminix",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",

View File

@@ -15,6 +15,10 @@
inputs.nixpkgs-lib.follows = "nixpkgs"; inputs.nixpkgs-lib.follows = "nixpkgs";
url = "github:hercules-ci/flake-parts"; url = "github:hercules-ci/flake-parts";
}; };
home-manager = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager";
};
import-tree.url = "github:vic/import-tree"; import-tree.url = "github:vic/import-tree";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
treefmt-nix = { treefmt-nix = {

View File

@@ -46,6 +46,14 @@
}; };
}; };
user-emmie = {
module = {
name = "emmie";
input = "self";
};
roles.default.machines."rana" = { };
};
tor = { tor = {
module = { module = {
name = "tor"; name = "tor";

View File

@@ -0,0 +1,8 @@
{ ... }:
{
nixpkgs.hostPlatform = {
system = "x86_64-linux";
};
system.stateVersion = "25.11";
clan.core.sops.defaultGroups = [ "admins" ];
}

90
machines/rana/disko.nix Normal file
View File

@@ -0,0 +1,90 @@
{ ... }:
let
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
os = "/dev/disk/by-id/FIXME";
in
{
boot.loader = {
systemd-boot = {
enable = true;
};
efi = {
canTouchEfiVariables = true;
};
};
disko.devices = {
disk = {
"os-${hashDisk os}" = {
type = "disk";
device = os;
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "nofail" ];
};
};
system = {
size = "100%";
content = {
type = "zfs";
pool = "zroot";
};
};
swap = {
size = "16G";
content = {
type = "swap";
};
};
};
};
};
};
zpool = {
zroot = {
type = "zpool";
rootFsOptions = {
mountpoint = "none";
compression = "lz4";
acltype = "posixacl";
xattr = "sa";
"com.sun:auto-snapshot" = "true";
};
options.ashift = "12";
datasets = {
"root" = {
type = "zfs_fs";
options.mountpoint = "none";
};
"root/nixos" = {
type = "zfs_fs";
options.mountpoint = "/";
mountpoint = "/";
};
"root/home" = {
type = "zfs_fs";
options.mountpoint = "/home";
mountpoint = "/home";
};
"root/tmp" = {
type = "zfs_fs";
mountpoint = "/tmp";
options = {
mountpoint = "/tmp";
sync = "disabled";
};
};
};
};
};
};
}

View File

@@ -0,0 +1,31 @@
{ ... }:
{
_class = "clan.service";
manifest.name = "emmie";
manifest.description = "Home manager for user Emmie";
manifest.categories = [ "System" ];
roles.default = {
perInstance.nixosModule =
{
config,
lib,
inputs,
...
}:
let
username = "emmie";
in
{
imports = [ inputs.home-manager.flakeModules.home-manager ];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = ./home.nix;
home-manager.extraSpecialArgs = {
inherit inputs;
};
};
};
}

View File

@@ -0,0 +1,21 @@
{ osConfig, pkgs, ... }:
let
username = "emmie";
in
{
home = {
inherit username;
homeDirectory = "/home/${username}";
stateVersion = osConfig.system.stateVersion;
packages = with pkgs; [
libreoffice
element-desktop
brave
firefox
keepassxc
drawio
vlc
];
};
programs.home-manager.enable = true;
}

View File

@@ -0,0 +1,10 @@
{ lib, ... }:
let
emmie = lib.modules.importApply ./emmie/default.nix { };
in
{
clan.modules = {
emmie-home = emmie;
};
}