Compare commits
4 Commits
main
...
32b01c84db
| Author | SHA1 | Date | |
|---|---|---|---|
| 32b01c84db | |||
| 8982b61d79 | |||
| 7b48370a1c | |||
| 96811a2ac8 |
21
flake.lock
generated
21
flake.lock
generated
@@ -121,6 +121,26 @@
|
||||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1752730890,
|
||||
@@ -224,6 +244,7 @@
|
||||
"clan-core": "clan-core",
|
||||
"devshell": "devshell",
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager",
|
||||
"import-tree": "import-tree",
|
||||
"liminix": "liminix",
|
||||
"nixpkgs": "nixpkgs",
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
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";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
treefmt-nix = {
|
||||
|
||||
@@ -46,6 +46,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
user-emmie = {
|
||||
module = {
|
||||
name = "emmie";
|
||||
input = "self";
|
||||
};
|
||||
roles.default.machines."rana" = { };
|
||||
};
|
||||
|
||||
tor = {
|
||||
module = {
|
||||
name = "tor";
|
||||
|
||||
8
machines/rana/configuration.nix
Normal file
8
machines/rana/configuration.nix
Normal 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
90
machines/rana/disko.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
31
modules/clan/home-manager-users/emmie/default.nix
Normal file
31
modules/clan/home-manager-users/emmie/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
21
modules/clan/home-manager-users/emmie/home.nix
Normal file
21
modules/clan/home-manager-users/emmie/home.nix
Normal 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;
|
||||
}
|
||||
10
modules/clan/home-manager-users/flake-module.nix
Normal file
10
modules/clan/home-manager-users/flake-module.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
emmie = lib.modules.importApply ./emmie/default.nix { };
|
||||
in
|
||||
{
|
||||
clan.modules = {
|
||||
emmie-home = emmie;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user