Compare commits

...

17 commits

Author SHA1 Message Date
2b2326a65c
Emacs stuff
Some checks failed
EVAL x86_64-linux.picard
BUILD x86_64-linux.picard
UPLOAD x86_64-linux.picard
DOWNLOAD x86_64-linux.picard
CACHIX x86_64-linux.picard
ATTIC x86_64-linux.picard
/ test (push) Successful in 1m22s
2024-12-06 11:44:46 +01:00
e8e1f8e7ce
Format 2024-12-06 11:44:30 +01:00
cec92da687
Add ccr to plugdev user group 2024-12-06 11:44:00 +01:00
4c6ecb05bd
Add sdrangel home-manager module 2024-12-06 11:43:15 +01:00
9191b17bff
Mara's laptop 2024-12-06 11:43:08 +01:00
26187a521b
nerdfonts became nerd-fonts 2024-12-06 11:41:56 +01:00
984ba9267d
Enable rtl-sdr on kirk 2024-12-06 11:40:00 +01:00
017b19cd17
Add chirp and sdrangel modules to kirk 2024-12-06 11:39:46 +01:00
796ecadf90
Do not use hardcoded ccr username 2024-12-06 11:39:30 +01:00
8ee594e06b
Disable autologin for kirk 2024-12-06 11:39:16 +01:00
72461214d8
Format sisko's hd to xfs 2024-12-06 11:38:59 +01:00
8efbd6f577
Enable binfmt also for armv6l-linux 2024-12-06 11:38:42 +01:00
9dfb48ba0c
Set networkmanager group in the ccr module 2024-12-06 11:38:21 +01:00
73449da88f
Options renamed 2024-12-06 11:37:35 +01:00
9dbc963840
Add mixed-pitch to Emacs packages 2024-12-06 11:37:22 +01:00
4d8da4b646
Argument renamed 2024-12-06 11:37:08 +01:00
b25018e39e
Update some inputs 2024-12-06 11:36:59 +01:00
21 changed files with 300 additions and 54 deletions

53
flake.lock generated
View file

@ -209,11 +209,11 @@
]
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"type": "github"
},
"original": {
@ -287,11 +287,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -485,11 +485,11 @@
]
},
"locked": {
"lastModified": 1731535640,
"narHash": "sha256-2EckCJn4wxran/TsRiCOFcmVpep2m9EBKl99NBh2GnM=",
"lastModified": 1733389730,
"narHash": "sha256-KZMu4ddMll5khS0rYkJsVD0hVqjMNHlhTM3PCQar0Ag=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "35b055009afd0107b69c286fca34d2ad98940d57",
"rev": "65912bc6841cf420eb8c0a20e03df7cbbff5963f",
"type": "github"
},
"original": {
@ -564,7 +564,6 @@
"locked": {
"lastModified": 1728951119,
"narHash": "sha256-vUBgL8zJBDyj2serxdEVbNqe6pBN4YgWwhtg3XP8mpQ=",
"ref": "refs/heads/main",
"rev": "f6077314fa6aff862758095bb55fe844e9162a1d",
"revCount": 16344,
"type": "git",
@ -589,11 +588,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1731185443,
"narHash": "sha256-9qkRZFTgbMonlBaLqL+OW6iiHLWXuBJlThISMhwQuGg=",
"lastModified": 1732351635,
"narHash": "sha256-H94CcQ3yamG5+RMxtxXllR02YIlxQ5WD/8PcolO9yEA=",
"ref": "refs/heads/main",
"rev": "57ddb99e781d19704f8a84036f9890e6ca554c41",
"revCount": 613,
"rev": "dfc286ca3dc49118c30d8d6205d6d6af76c62b7a",
"revCount": 617,
"type": "git",
"url": "https://git.lix.systems/lix-project/nix-eval-jobs"
},
@ -614,11 +613,11 @@
]
},
"locked": {
"lastModified": 1731185731,
"narHash": "sha256-RNaIu43b9PoXEhW4OqXUNZKY/jezQyCYWwdv1M0VjsA=",
"lastModified": 1732603698,
"narHash": "sha256-Jw2MhzgCCrKV2MJytehG0cCLIAosBX71p8qmQ6XQlR4=",
"ref": "refs/heads/main",
"rev": "691193879d96bdfd1e6ab5ebcca2fadc7604cf34",
"revCount": 117,
"rev": "15b999f9c958c475f71fb8c543b9fc2f36ae8730",
"revCount": 123,
"type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module"
},
@ -699,11 +698,11 @@
]
},
"locked": {
"lastModified": 1729742964,
"narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=",
"lastModified": 1731952509,
"narHash": "sha256-p4gB3Rhw8R6Ak4eMl8pqjCPOLCZRqaehZxdZ/mbFClM=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "e04df33f62cdcf93d73e9a04142464753a16db67",
"rev": "7b5f051df789b6b20d259924d349a9ba3319b226",
"type": "github"
},
"original": {
@ -996,11 +995,11 @@
},
"nixpkgs_7": {
"locked": {
"lastModified": 1731319897,
"narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=",
"lastModified": 1733212471,
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dc460ec76cbff0e66e269457d7b728432263166c",
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776",
"type": "github"
},
"original": {
@ -1284,11 +1283,11 @@
]
},
"locked": {
"lastModified": 1729613947,
"narHash": "sha256-XGOvuIPW1XRfPgHtGYXd5MAmJzZtOuwlfKDgxX5KT3s=",
"lastModified": 1732292307,
"narHash": "sha256-5WSng844vXt8uytT5djmqBCkopyle6ciFgteuA9bJpw=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "aac86347fb5063960eccb19493e0cadcdb4205ca",
"rev": "705df92694af7093dfbb27109ce16d828a79155f",
"type": "github"
},
"original": {

View file

@ -4,7 +4,7 @@
(
let
cura5 = pkgs.appimageTools.wrapType2 rec {
name = "cura5";
pname = "cura5";
version = "5.8.0";
src = pkgs.fetchurl {
url = "https://github.com/Ultimaker/Cura/releases/download/${version}/UltiMaker-Cura-${version}-linux-X64.AppImage";

View file

@ -881,6 +881,8 @@ This is meant to be an helper to be called from the window manager."
:custom
(gptel-api-key (lambda () (require 'f) (f-read-text (getenv "OPENAI_API_KEY_PATH"))))
(gptel-model 'gpt-4o)
(gptel-default-mode 'org-mode)
(gptel-org-branching-context 't)
:config
(require 'gptel-curl)
@ -919,6 +921,9 @@ This is meant to be an helper to be called from the window manager."
) ;; destroy frame on exit
)
(use-package mixed-pitch
:hook (text-mode . mixed-pitch-mode))
(use-package pass
:config
(require 'password-store-otp) ;; FIXME use `use-pacakge' idiomatic way
@ -967,5 +972,26 @@ This is meant to be an helper to be called from the window manager."
(:name "GitHub" :query "tag:github" :key "g")
(:name "Trash" :query "tag:trash" :key "t"))))
;;; Experiments, remove from here
(defun ccr/test ()
"test"
(interactive)
(with-selected-frame
(make-frame '((name . "emacs-run-launcher")
(minibuffer . only)
(fullscreen . 0) ; no fullscreen
(undecorated . t) ; remove title bar
;;(auto-raise . t) ; focus on this frame
;;(tool-bar-lines . 0)
;;(menu-bar-lines . 0)
(internal-border-width . 10)
(width . 80)
(height . 11)))
(unwind-protect
(completing-read "ciao " '("foo" "bar") nil t "")
(delete-frame))))
(provide 'init)
;;; init.el ends here

View file

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
home.packages = [
pkgs.sdrangel
pkgs.kdePackages.qtlocation
];
}

View file

@ -4,6 +4,7 @@
age,
hostname,
config,
username,
...
}:
{
@ -59,7 +60,7 @@
settings = {
daemon = {
enabled = true;
socket_path = "/home/ccr/.local/share/atuin/atuin.sock"; # FIXME using ~ or $HOME doesn't work: https://github.com/atuinsh/atuin/issues/2289
socket_path = "/home/${username}/.local/share/atuin/atuin.sock"; # FIXME using ~ or $HOME doesn't work: https://github.com/atuinsh/atuin/issues/2289
};
auto_sync = true;
sync_frequency = "5m";

View file

@ -119,6 +119,20 @@
};
};
tpol = {
extraModules = with inputs; [
lix-module.nixosModules.default
];
secrets = {
"tpol-wireguard-private-key" = { };
};
vpn = {
ip = "10.100.0.7";
publicKey = "b/Pi7koTFo5CMAAzcL2ulvQ/0dUjKzbmXpvh4Lb/Bgo=";
};
extraHmModulesUser = "mara";
};
};
vpnExtra = {

View file

@ -40,7 +40,7 @@
ccr = {
enable = true;
autologin = true;
autologin = false;
modules = [
"git"
"git-workspace"
@ -72,6 +72,8 @@
"catppuccin"
"libreoffice"
"emacs"
"chirp"
"sdrangel"
];
extraGroups = [ ];
backupPaths = [ ];
@ -99,6 +101,7 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil";
hardware.enableRedistributableFirmware = lib.mkDefault true;
hardware.rtl-sdr.enable = true;
hardware.graphics = {
enable = true;

View file

@ -91,8 +91,9 @@
"emacs"
"vial"
"chirp"
"sdrangel"
];
extraGroups = [ ];
extraGroups = [ "plugdev" ];
backupPaths = [ ];
};

View file

@ -66,8 +66,11 @@ in
size = "100%";
content = {
type = "filesystem";
format = "bcachefs";
format = "xfs";
mountpoint = "/mnt/hd";
mountOptions = [
"nofail"
];
};
};
};

48
hosts/spock/default.nix Normal file
View file

@ -0,0 +1,48 @@
{
lib,
modulesPath,
...
}:
{
imports = [
"${modulesPath}/installer/sd-card/sd-image-aarch64.nix"
];
sdImage.compressImage = false;
nixpkgs = {
# hostPlatform = lib.mkDefault "armv6-linux";
# config = {
# allowUnfree = true;
# };
# overlays = [
# # Workaround: https://github.com/NixOS/nixpkgs/issues/154163
# # modprobe: FATAL: Module sun4i-drm not found in directory
# (final: super: {
# makeModulesClosure = x:
# super.makeModulesClosure (x // {allowMissing = true;});
# })
# ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
};
networking = {
networkmanager.enable = false;
};
# Set your time zone.
time.timeZone = "Europe/Rome";
# Allow the user to log in as root without a password.
users.users.root.initialHashedPassword = "";
hardware.enableRedistributableFirmware = true;
system.stateVersion = "24.11";
}

94
hosts/tpol/default.nix Normal file
View file

@ -0,0 +1,94 @@
{
modulesPath,
fleetModules,
pkgs,
lib,
vpn,
config,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix") ]
++ fleetModules [
"common"
"ssh"
"nix"
"networkmanager"
"dbus"
"udisks2"
"xdg"
"printing"
"mara"
"xfce"
"battery"
"printing"
"wireguard-client"
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"sr_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.loader.grub.device = "/dev/sda";
fileSystems."/" = {
device = "/dev/disk/by-uuid/1522f8d9-5251-408d-9b6e-ed6da7da916a";
fsType = "btrfs";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/e111fbc7-8e5d-4fcb-95c9-249f53ab0adc"; }
];
mara = {
enable = true;
modules = [
"shell"
"mpv"
"firefox"
"git"
"chrome"
"udiskie"
"helix"
"remmina"
];
};
# nevertheless this is a laptop the battery is completely gone, so it works only attached to electrictiy
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
networking.firewall.allowedTCPPorts = [ 1234 ];
hardware.rtl-sdr.enable = true;
systemd.services.rtl-tcp = {
description = "rtl_sdr over TCP";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
${lib.getExe' pkgs.rtl-sdr "rtl_tcp"} -a ${vpn.${config.networking.hostName}}
'';
};
};
systemd.services.sdrangelsrv = {
description = "sdrangelsrv";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
${lib.getExe' pkgs.sdrangel "sdrangelsrv"} --remote-tcp-hwtype RTLSDR --remote-tcp-port 1234 --remote-tcp-address ${
vpn.${config.networking.hostName}
} --remote-tcp
'';
};
};
}

View file

@ -12,6 +12,7 @@
pbp = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFF05LScu9m5BXMlFAT1g+g/AkAi7kvq1dY6W3Rzqq3f";
picard = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ1+1z1IsLVJ6aGarMgzw3NbmFKcpYVgdUjl7xDsewxT";
deltaflyer = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPETMwELvGTnhKJbpK0oFs4lK8vm/kV9KdgL9wufYDDQ";
tpol = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIQxHSow2l0TDWTonBPPaGvTgVvMS/xsQOf1nHnvLSwV";
};
};
}

View file

@ -3,9 +3,10 @@
"i686-linux"
"aarch64-linux"
"riscv64-linux"
"armv6l-linux"
];
nix.extraOptions = ''
extra-platforms = aarch64-linux arm-linux i686-linux riscv64-linux
extra-platforms = aarch64-linux arm-linux i686-linux riscv64-linux armv6l-linux
'';
# XXX For some reason `docker buildx` isn't aware of this:

View file

@ -86,6 +86,7 @@ in
"dialout"
"systemd-journal"
"camera"
"networkmanager"
];
ccr.modules = [
"shell"

View file

@ -1,19 +1,21 @@
{ pkgs, ... }:
{
fonts = {
packages = with pkgs; [
powerline-fonts
dejavu_fonts
fira-code
fira-code-symbols
iosevka
iosevka-comfy.comfy
emacs-all-the-icons-fonts
nerdfonts
joypixels
etBook
vegur
];
packages =
with pkgs;
[
powerline-fonts
dejavu_fonts
fira-code
fira-code-symbols
iosevka
iosevka-comfy.comfy
emacs-all-the-icons-fonts
joypixels
etBook
vegur
]
++ (builtins.filter lib.attrsets.isDerivation (builtins.attrValues nerd-fonts));
fontconfig.defaultFonts = {
monospace = [ "DejaVu Sans Mono for Powerline" ];
sansSerif = [ "DejaVu Sans" ];

View file

@ -4,6 +4,7 @@
pkgs,
fleetHmModules,
fleetFlake,
vpn,
...
}:
{
@ -46,20 +47,33 @@
default = [
"wheel"
"fuse"
"networkmanager"
"video"
"dialout"
"systemd-journal"
"camera"
"networkmanager"
];
};
};
config = lib.mkIf config.mara.enable {
programs.fish.enable = true;
mara.modules = [
"shell"
"git"
"nix-index"
"btop"
];
users.users.mara = {
uid = 1001;
inherit (config.mara) hashedPassword;
description = "Mara Savastano";
isNormalUser = true;
inherit (config.mara) extraGroups;
shell = pkgs.nushell;
shell = pkgs.fish;
openssh.authorizedKeys.keys = config.mara.authorizedKeys;
};
@ -68,7 +82,16 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mara = {
imports = fleetHmModules config.mara.modules;
imports = fleetHmModules config.mara.modules ++ [
{
_module.args = {
inherit (config.age) secrets;
inherit vpn;
username = "mara";
hostname = config.networking.hostName;
};
}
];
home.packages = config.mara.packages;
home.stateVersion = config.system.stateVersion;
};

View file

@ -1,6 +1,5 @@
{ lib, ... }:
{
networking.networkmanager.enable = true;
ccr.extraGroups = [ "networkmanager" ];
networking.useDHCP = lib.mkDefault true;
}

View file

@ -5,10 +5,11 @@
xterm.enable = false;
xfce.enable = true;
};
displayManager = {
defaultSession = "xfce";
autoLogin.user = "mara";
};
};
services.displayManager = {
defaultSession = "xfce";
autoLogin.user = "mara";
};
home-manager.users.mara.home.file."background-image" = {

View file

@ -118,6 +118,7 @@ let
solidity-mode
telega
aggressive-indent
mixed-pitch
# org-re-reveal # FIXME very not nice hash mismatch when building
]
)

View file

@ -182,4 +182,8 @@ with keys.users;
deltaflyer
];
"tpol-wireguard-private-key.age".publicKeys = [
ccr-ssh
tpol
];
}

View file

@ -0,0 +1,17 @@
age-encryption.org/v1
-> ssh-rsa /AagBw
qUiTcrs0L+daa9FAsa80rdJsZCKCJN76KREz7mU7FF3ZBGp4VvisP4hJSjNKheWW
pfVaefXfuIsw2GvGqUjNZMGHj650gGEqMtO6nLuetMuCIWF7uTdPpnNQMK6BB2ni
Wlfu2g4rul6aV+S6KNiVBqlKJn521TOkEutsXFjaAJpnRVOG50P/8k9fPzjXNZnj
NqmMhGjOE8tDs9TM1nWM4yYDX3KMDULvcBHycV3yQRzswEJc4jq9oLS8SbyE+4Hy
dH6hkWLiRMz06Xg4F0XifGY4lglcMiQqNdNe5xMZtuR33Z1GUiY9HGU5FvXmUbQx
HTWTklzH8q0vdEmb2tFftCM8AMeodI3CLBt+DNlQ3V0+izUmOJwTGz5OGfT6SiWY
epMF5kXmZipWu5KsEoY1hv1INvGR84LyicpOT2vPV7cakx9ahlCgV5vhdmcAZy5F
CRAhnvIsZZMHwGV9lmAMI93wgPyU0ybtwjSpPbHAqv0DQj+CBrEY5ict3+HhSe5J
QrfcLRsQRox3QuR/jQvixBX63qNaezYFmpBuWP7XI7PuPj7KdUgECNfMctcVmCSb
xHKmYkf8I8Si1doFOZbYOXheiI/zNk0xLAONPI+LQ6ZemUODhpcpRSSkhcDKQdtC
srxvyTvYOk4IFjmjuk2JyE1Vp6wg+aiySZlyfFA7WQY
-> ssh-ed25519 X7Q5KQ UoryJKCMOKeAkI1dbz8On5q0wSd+XIUCdWI31gyS6D4
exrVhh9tGzQyToDKcv5sspbeKhdTp1q0wKuHWo+onKQ
--- QkkySHHmaJFZu2BNT0ZZ9NZipUbFqyzxL32YZx5DRbQ
wc¿^«Ò[v$jªš”ž7Lmt´{<7B>øù`¾ü0©—]ÿ¸<6C>¾…3¢ñ<C2A2>…ã šð{C²\µ±ßXƒZ§Œ°¸)Z$¿4d„/.L