Compare commits

...

10 commits

18 changed files with 298 additions and 387 deletions

View file

@ -31,11 +31,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1701025348, "lastModified": 1709610799,
"narHash": "sha256-42GHmYH+GF7VjwGSt+fVT1CQuNpGanJbNgVHTAZppUM=", "narHash": "sha256-5jfLQx0U9hXbi2skYMGodDJkIgffrjIOgMRjZqms2QE=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "42afaeb1a0325194a7cdb526332d2cb92fddd07b", "rev": "81c393c776d5379c030607866afef6406ca1be57",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -52,11 +52,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1703245373, "lastModified": 1710073490,
"narHash": "sha256-diJVcEb5RzMQqrXl2hXUUY1SvSSJEg4ttpzij6skyew=", "narHash": "sha256-4B3McqiXy8TaNp8G134BQMx+m/A/VidMYRGcD4bda0k=",
"owner": "michaelshmitty", "owner": "michaelshmitty",
"repo": "cryptpad-flake", "repo": "cryptpad-flake",
"rev": "369a95c89e1448a1bc26ad8d0e57618fc0a5dc90", "rev": "6657541cfcd18ca328c8d3a41b9bf18bc5f10099",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -72,11 +72,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1708737761, "lastModified": 1710281379,
"narHash": "sha256-sR/1cYjpgr71ZSrt6Kp5Dg4Ul3mo6pZIG400tuzYks8=", "narHash": "sha256-uFo9hxt982L3nFJeweW4Gip2esiGrIQlbvEGrNTh4AY=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "bbde06bed1b72eddff063fa42f18644e90a0121e", "rev": "d9ea313bc4851670dc99c5cc979cb79750e7d670",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -93,11 +93,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1708564520, "lastModified": 1710427903,
"narHash": "sha256-juduDTYBhGN6jNfQ5RMDpbQF+MkO0pj3k7XGDSTjAbs=", "narHash": "sha256-sV0Q5ndvfjK9JfCg/QM/HX/fcittohvtq8dD62isxdM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "23d308f0059955e3719efc81a34d1fc0369fbb74", "rev": "21d89b333ca300bef82c928c856d48b94a9f997c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -183,11 +183,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1705309234, "lastModified": 1710146030,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -225,11 +225,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1708745305, "lastModified": 1710393236,
"narHash": "sha256-AxBvMahNT310JVOSLT8MFjUXhpPzDXaSxNluNTod36A=", "narHash": "sha256-3XUAUU170gvD8FZ5VnAYKzYLeC6PQHG2aBVW2d4BmHk=",
"owner": "helix-editor", "owner": "helix-editor",
"repo": "helix", "repo": "helix",
"rev": "ec9efdef3b2f613a86098058f5705e7863e375e2", "rev": "6c4d986c1b1ac4e350dced513b6608ba4464cde3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -242,20 +242,20 @@
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs-stable" "nixpkgs-nixos-unstable"
] ]
}, },
"locked": { "locked": {
"lastModified": 1706981411, "lastModified": 1710532761,
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", "narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "652fda4ca6dafeb090943422c34ae9145787af37", "rev": "206f457fffdb9a73596a4cb2211a471bd305243d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.11", "ref": "master",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -308,11 +308,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1708594753, "lastModified": 1710123225,
"narHash": "sha256-c/gH7iXS/IYH9NrFOT+aJqTq+iEBkvAkpWuUHGU3+f0=", "narHash": "sha256-j3oWlxRZxB7cFsgEntpH3rosjFHRkAo/dhX9H3OfxtY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "3f7d0bca003eac1a1a7f4659bbab9c8f8c2a0958", "rev": "ad2fd7b978d5e462048729a6c635c45d3d33c9ba",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -324,11 +324,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1708770680, "lastModified": 1710494698,
"narHash": "sha256-uS1Jji64SPBKu5/VdNYj3volc/xAmDgsBguq4zgBWDw=", "narHash": "sha256-oMilsMpnRFzG7kpoWLoZePt4lttZGkN36OAf8DGnE00=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d01044ecfa9c89a925bebb76cf60f2e3b9cea667", "rev": "453b69da7a400af2c669793ee504b016b3fd3639",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -340,11 +340,11 @@
}, },
"nixpkgs-nixos-unstable": { "nixpkgs-nixos-unstable": {
"locked": { "locked": {
"lastModified": 1708655239, "lastModified": 1710272261,
"narHash": "sha256-ZrP/yACUvDB+zbqYJsln4iwotbH6CTZiTkANJ0AgDv4=", "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cbc4211f0afffe6dfd2478a62615dd5175a13f9a", "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -356,11 +356,11 @@
}, },
"nixpkgs-rust-analyzer": { "nixpkgs-rust-analyzer": {
"locked": { "locked": {
"lastModified": 1708770680, "lastModified": 1710494698,
"narHash": "sha256-uS1Jji64SPBKu5/VdNYj3volc/xAmDgsBguq4zgBWDw=", "narHash": "sha256-oMilsMpnRFzG7kpoWLoZePt4lttZGkN36OAf8DGnE00=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d01044ecfa9c89a925bebb76cf60f2e3b9cea667", "rev": "453b69da7a400af2c669793ee504b016b3fd3639",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -372,11 +372,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1708566995, "lastModified": 1710420202,
"narHash": "sha256-e/THimsoxxMAHSbwMKov5f5Yg+utTj6XVGEo24Lhx+0=", "narHash": "sha256-MvFKESbq4rUWuaf2RKPNYENaSZEw/jaCLo2gU6oREcM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3cb4ae6689d2aa3f363516234572613b31212b78", "rev": "878ef7d9721bee9f81f8a80819f9211ad1f993da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -388,11 +388,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1708771490, "lastModified": 1710494722,
"narHash": "sha256-HYFlXYMWDHZmwazXGNu0DT5M/ZNkYTOMtUxh40onEGA=", "narHash": "sha256-rjYCRxjuNJYH8/YJ3G3fQsdq17pVIdyH5yMSNDQznBg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "7f0cad37958f31e19255fcc50683c638caa3149e", "rev": "e1d526df83b9ef104150b67d89afb4d4c20975d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -454,11 +454,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1701137803, "lastModified": 1709604635,
"narHash": "sha256-0LcPAdql5IhQSUXJx3Zna0dYTgdIoYO7zUrsKgiBd04=", "narHash": "sha256-le4fwmWmjGRYWwkho0Gr7mnnZndOOe4XGbLw68OvF40=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "9dd940c967502f844eacea52a61e9596268d4f70", "rev": "e86c0fb5d3a22a5f30d7f64ecad88643fe26449d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -502,11 +502,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1708500294, "lastModified": 1710433464,
"narHash": "sha256-mvJIecY3tDKZh7297mqOtOuAvP7U1rqjfLNfmfkjFpU=", "narHash": "sha256-IXlPoWgIRovZ32mYvqqdBgOQln71LouE/HBhbKc1wcw=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "f6b80ab6cd25e57f297fe466ad689d8a77057c11", "rev": "6c32d3b9c7593f4b466ec5404e59fc09a803a090",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -159,7 +159,7 @@
}; };
nixosConfigurations = { nixosConfigurations = {
foryog = mkWorkstation nixpkgs-stable "x86_64-linux" "foryog"; foryog = mkWorkstation nixpkgs-nixos-unstable "x86_64-linux" "foryog";
thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky"; thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky";
bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty"; bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty";
vpsfree1 = mkServer nixpkgs-stable "x86_64-linux" "vpsfree1"; vpsfree1 = mkServer nixpkgs-stable "x86_64-linux" "vpsfree1";
@ -274,8 +274,8 @@
type = "github"; type = "github";
owner = "nix-community"; owner = "nix-community";
repo = "home-manager"; repo = "home-manager";
ref = "release-23.11"; ref = "master";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs-nixos-unstable";
}; };
flake-utils = { flake-utils = {
type = "github"; type = "github";

View file

@ -15,7 +15,6 @@
]; ];
timerConfig = {OnCalendar = "daily";}; timerConfig = {OnCalendar = "daily";};
pruneOpts = [ pruneOpts = [
"--keep-hourly 25"
"--keep-daily 8" "--keep-daily 8"
"--keep-weekly 5" "--keep-weekly 5"
"--keep-monthly 13" "--keep-monthly 13"

View file

@ -1,10 +1,4 @@
{ { config, pkgs, inputs, lib, ... }: {
config,
pkgs,
inputs,
lib,
...
}: {
imports = [ imports = [
"${inputs.nixpkgs-stable}/nixos/modules/profiles/qemu-guest.nix" "${inputs.nixpkgs-stable}/nixos/modules/profiles/qemu-guest.nix"
../cli.nix ../cli.nix
@ -13,7 +7,7 @@
./cryptpad.nix ./cryptpad.nix
./disks.nix ./disks.nix
./foundryvtt.nix ./foundryvtt.nix
./gitea.nix ./forgejo.nix
./mastodon.nix ./mastodon.nix
./rss.nix ./rss.nix
./ssh.nix ./ssh.nix

View file

@ -0,0 +1,103 @@
{ config, pkgs, inputs, lib, system, ... }:
let
unstable = inputs.nixpkgs-nixos-unstable;
package = unstable.legacyPackages."${system}".forgejo;
httpPort = 8083;
sshPort = 22;
domain = "git.cyplo.dev";
emailDomain = "peninsula.industries";
baseurl = "https://${domain}";
mailgunSmtpSecretName = "forgejo-mailgun-smtp-password";
mailgunSmtpPasswordPath = "/run/secrets/${mailgunSmtpSecretName}";
uid = 2051;
gid = 3051;
systemUserName = "forgejo";
systemGroupName = "forgejo";
users = {
users."${systemUserName}" = {
inherit uid;
isSystemUser = true;
isNormalUser = false;
group = systemGroupName;
};
groups."${systemGroupName}" = {
inherit gid;
members = [ "${systemUserName}" "nginx" ];
};
};
in {
imports =
[ ../nginx.nix "${unstable}/nixos/modules/services/misc/forgejo.nix" ];
disabledModules = [ "services/misc/forgejo.nix" ];
inherit users;
boot.kernel.sysctl = { "net.ipv4.ip_unprivileged_port_start" = 0; };
systemd.services.systemd-sysctl.enable = lib.mkForce true;
networking.firewall.allowedTCPPorts = [ sshPort ];
services.nginx = {
virtualHosts = {
"${domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:" + toString httpPort;
};
};
};
};
sops.secrets."${mailgunSmtpSecretName}" = {
sopsFile = ./mailgun.sops.yaml;
path = mailgunSmtpPasswordPath;
owner = systemUserName;
group = systemGroupName;
};
services.forgejo = {
enable = true;
inherit package;
user = systemUserName;
mailerPasswordFile = mailgunSmtpPasswordPath;
lfs.enable = true;
database.type = "sqlite3";
settings = {
service.DISABLE_REGISTRATION = true;
security.INSTALL_LOCK = true;
oauth2.ENABLE = false;
log.LEVEL = "Info";
actions.ENABLED = true;
"git.timeout" = {
DEFAULT = 600;
MIGRATE = 3600;
MIRROR = 3600;
CLONE = 600;
PULL = 600;
GC = 600;
};
"cron".ENABLED = true;
"cron.git_gc_repos".ENABLED = true;
"cron.delete_old_actions".ENABLED = true;
"cron.delete_old_system_notices".ENABLED = true;
"cron.gc_lfs".ENABLED = true;
server = {
ROOT_URL = baseurl;
DOMAIN = domain;
START_SSH_SERVER = true;
SSH_PORT = sshPort;
HTTP_PORT = httpPort;
SSH_LISTEN_PORT = sshPort;
DISABLE_SSH = false;
};
mailer = {
ENABLED = true;
FROM = "git.cyplo.dev <forgejo@${emailDomain}>";
PROTOCOL = "smtps";
SMTP_ADDR = "smtp.eu.mailgun.org";
SMTP_PORT = 465;
USER = "postmaster@${emailDomain}";
};
};
};
}

View file

@ -1,148 +0,0 @@
{
config,
pkgs,
inputs,
lib,
system,
...
}: let
unstable = inputs.nixpkgs-nixos-unstable;
package = unstable.legacyPackages."${system}".forgejo;
httpPort = 8083;
sshPort = 22;
domain = "git.cyplo.dev";
emailDomain = "peninsula.industries";
baseurl = "https://${domain}";
path = "/var/lib/gitea";
mailgunSmtpSecretName = "gitea-mailgun-smtp-password";
mailgunSmtpPasswordPath = "/run/secrets/${mailgunSmtpSecretName}";
uid = 2051;
gid = 3051;
systemUserName = "gitea";
systemGroupName = "gitea";
users = {
users."${systemUserName}" = {
inherit uid;
isSystemUser = true;
isNormalUser = false;
group = systemGroupName;
};
groups."${systemGroupName}" = {
inherit gid;
members = ["${systemUserName}" "nginx"];
};
};
in {
imports = [../nginx.nix];
inherit users;
boot.kernel.sysctl = {"net.ipv4.ip_unprivileged_port_start" = 0;};
systemd.services.systemd-sysctl.enable = lib.mkForce true;
networking.firewall.allowedTCPPorts = [sshPort];
services.nginx = {
virtualHosts = {
"${domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:" + toString httpPort;
};
};
};
};
sops.secrets."${mailgunSmtpSecretName}" = {
sopsFile = ./mailgun.sops.yaml;
path = mailgunSmtpPasswordPath;
owner = systemUserName;
group = systemGroupName;
};
containers.gitea = {
autoStart = true;
forwardPorts = [
{
inherit httpPort;
containerPort = httpPort;
}
{
containerPort = sshPort;
hostPort = sshPort;
}
];
bindMounts = {
"${path}" = {
hostPath = "${path}";
isReadOnly = false;
};
"${mailgunSmtpPasswordPath}" = {
hostPath = "${mailgunSmtpPasswordPath}";
isReadOnly = true;
};
};
config = {
config,
pkgs,
lib,
...
}: {
system.stateVersion = "23.11";
users =
users
// {
mutableUsers = false;
allowNoPasswordLogin = true;
};
disabledModules = ["services/misc/gitea.nix"];
imports = ["${unstable}/nixos/modules/services/misc/gitea.nix"];
services.gitea = {
enable = true;
inherit package;
stateDir = path;
user = systemUserName;
mailerPasswordFile = mailgunSmtpPasswordPath;
lfs.enable = true;
database.type = "sqlite3";
settings = {
service.DISABLE_REGISTRATION = true;
security.INSTALL_LOCK = true;
oauth2.ENABLE = false;
log.LEVEL = "Info";
actions.ENABLED = true;
"git.timeout" = {
DEFAULT = 600;
MIGRATE = 3600;
MIRROR = 3600;
CLONE = 600;
PULL = 600;
GC = 600;
};
"cron".ENABLED = true;
"cron.git_gc_repos".ENABLED = true;
"cron.delete_old_actions".ENABLED = true;
"cron.delete_old_system_notices".ENABLED = true;
"cron.gc_lfs".ENABLED = true;
server = {
ROOT_URL = baseurl;
DOMAIN = domain;
START_SSH_SERVER = true;
SSH_PORT = sshPort;
HTTP_PORT = httpPort;
SSH_LISTEN_PORT = sshPort;
DISABLE_SSH = false;
};
mailer = {
ENABLED = true;
FROM = "git.cyplo.dev <gitea@${emailDomain}>";
PROTOCOL = "smtps";
SMTP_ADDR = "smtp.eu.mailgun.org";
SMTP_PORT = 465;
USER = "postmaster@${emailDomain}";
};
};
};
};
};
}

View file

@ -1,4 +1,4 @@
gitea-mailgun-smtp-password: ENC[AES256_GCM,data:dIfcxK5ZQGNqnOfTdVI7FzR9RgP3Ao/bk7XDZULHby58MJumhESELRCkHgKhOSqTAQE=,iv:xjtVQEILVl+XFel+thoS8OvF/fpFYSNtt5MTRUhgyrI=,tag:TJPBQG4xsbHrcdXCbDdejg==,type:str] forgejo-mailgun-smtp-password: ENC[AES256_GCM,data:bZfUTNOta/TuHpR1bsAHV8NFZSFgU1szzN9Ue/mzwMMGRqdh9ORUO8gIT+B3JMVEqNo=,iv:SVaMY2QK8lWGtLuUAXKWKxpfkRrvPBh3jhH9PFMFsuM=,tag:OwdGA0lieHTxe4GfDWqQXg==,type:str]
mastodon-mailgun-smtp-password: ENC[AES256_GCM,data:h2SSa/053BBIo3Y03TB+1SW6C9DFighMVgY1jzGcUZLhiZ/jd2YbTYlq83Nbb5GBZAY=,iv:9BJuVSfOC48K69kDLUjr1oK3g0xSKAxlzDI/py3STt8=,tag:DTE2OemwbZ0U59wF/9NQjA==,type:str] mastodon-mailgun-smtp-password: ENC[AES256_GCM,data:h2SSa/053BBIo3Y03TB+1SW6C9DFighMVgY1jzGcUZLhiZ/jd2YbTYlq83Nbb5GBZAY=,iv:9BJuVSfOC48K69kDLUjr1oK3g0xSKAxlzDI/py3STt8=,tag:DTE2OemwbZ0U59wF/9NQjA==,type:str]
sops: sops:
kms: [] kms: []
@ -96,8 +96,8 @@ sops:
cHhHRGJIRDlsMEp2RzgxTWkyaWovbkEKnEzQrhYmdxjwa8bDGgVnHBoNXrdb8JDy cHhHRGJIRDlsMEp2RzgxTWkyaWovbkEKnEzQrhYmdxjwa8bDGgVnHBoNXrdb8JDy
EOkYPEiHlscMfsGnUhbujoLXEveIrLzukWgKcRNmS5fTyG4e2eP/cw== EOkYPEiHlscMfsGnUhbujoLXEveIrLzukWgKcRNmS5fTyG4e2eP/cw==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-01-01T16:13:02Z" lastmodified: "2024-03-16T11:03:13Z"
mac: ENC[AES256_GCM,data:YMQ2xiuiXoCAzuGGlm/KiEEjjZBHu7i+5Px2YibwSATBeEais9SZFqQx0qmIQw+VGdGAwVo8tQQ5Ikg5YJbHNEetanXbV1UJtMBBUb8m35lras+yXmeveOeKC/f46oa0DCPVuCDqkzEWOAk2NMZnfR5iuWBaZ6rvIhGnqlXodK8=,iv:UkTovxMi25Jfz8JzQE3W+Ar6w7ybBAJQG+9j6RWj/2M=,tag:RRSqNAv3OiMahG2oYZSJvA==,type:str] mac: ENC[AES256_GCM,data:XlpAHjvUnnz3NxZnNxlMGELsPjHL648fcs1mbP3KZQLthkLdERjT0BcuqKsY6X+s3CNEET18IKWGiBZPA+iFLAWAzHl+qNDm0WNZv05ECgz+BeNGH6e9FqqtSNIPmnSYfXqyHz/Psg1T5l+N6QK1dRl5PVeO8Bxs3G3H6iZgLOM=,iv:wswvHl6yK/BYW8zf53t18gYz5WNvULaRj2lyHVeuO2A=,tag:pJzh11seJQ64HCiIMhtzdQ==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.7.3 version: 3.8.1

View file

@ -1,36 +1,26 @@
{ { config, pkgs, inputs, lib, system, ... }: {
config,
pkgs,
inputs,
lib,
system,
...
}: {
networking.hostName = "foryog"; networking.hostName = "foryog";
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../backups.nix ../../backups.nix
../../boot.nix ../../boot.nix
../../emacs
../../git ../../git
../../gnome
../../gui ../../gui
../../gui/vscode ../../kde
../../libvirt.nix
../../mercurial
../../vim ../../vim
../../zsh ../../zsh
]; ];
fileSystems."/" = {options = ["compress=zstd"];}; fileSystems."/" = { options = [ "compress=zstd" ]; };
services.restic.backups.home-to-b2 = { services.restic.backups.home-to-b2 = {
repository = lib.mkForce "b2:cyplo-restic-foureighty:/"; repository = lib.mkForce "b2:cyplo-restic-foureighty:/";
}; };
boot.kernelParams = ["initcall_debug" ''dyndbg="file suspend.c +p"'' "no_console_suspend"]; boot.kernelParams =
[ "initcall_debug" ''dyndbg="file suspend.c +p"'' "no_console_suspend" ];
boot.tmp.cleanOnBoot = true; boot.tmp.cleanOnBoot = true;
boot.binfmt.emulatedSystems = ["aarch64-linux"]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.plymouth = { boot.plymouth = {
enable = true; enable = true;
logo = ./boot.png; logo = ./boot.png;
@ -46,21 +36,10 @@
hardware.trackpoint.enable = true; hardware.trackpoint.enable = true;
hardware.keyboard.qmk.enable = true; hardware.keyboard.qmk.enable = true;
services.udev.packages = [pkgs.qmk-udev-rules]; services.udev.packages = [ pkgs.qmk-udev-rules ];
services.xserver = { services.fprintd = { enable = true; };
libinput = {
enable = true;
touchpad = {
tapping = true;
naturalScrolling = false;
middleEmulation = false;
disableWhileTyping = true;
};
};
};
services.fprintd = {enable = true;};
programs.ccache.enable = true; programs.ccache.enable = true;
hardware.opengl.extraPackages = with pkgs; [libva]; hardware.opengl.extraPackages = with pkgs; [ libva ];
programs.steam.enable = true; programs.steam.enable = true;
nixpkgs.config.allowUnfreePredicate = pkg: nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [ builtins.elem (lib.getName pkg) [
@ -74,14 +53,11 @@
"vscode" "vscode"
]; ];
home-manager.users.cyryl = {...}: { home-manager.users.cyryl = { ... }: {
imports = [ imports = [ ../../home-manager/programs/kitty.nix ];
../../home-manager/programs/kitty.nix
../../home-manager/programs/helix.nix
];
home.packages = home.packages =
(with inputs.nixpkgs-master.legacyPackages."${system}"; [bisq-desktop]) (with inputs.nixpkgs-master.legacyPackages."${system}"; [ bisq-desktop ])
++ (with pkgs; [lutris]) ++ (with pkgs; [ lutris ])
++ (with inputs.endless-sky.legacyPackages."${system}"; [endless-sky]); ++ (with inputs.endless-sky.legacyPackages."${system}"; [ endless-sky ]);
}; };
} }

View file

@ -1,12 +1,8 @@
{ { config, pkgs, ... }: {
config,
pkgs,
...
}: {
console.keyMap = "pl2"; console.keyMap = "pl2";
imports = [./tailscale]; imports = [ ./tailscale ];
services = { services = {
udev.packages = [pkgs.android-udev-rules]; udev.packages = [ pkgs.android-udev-rules ];
ratbagd.enable = true; ratbagd.enable = true;
gvfs.enable = true; gvfs.enable = true;
@ -25,23 +21,5 @@
}; };
geoclue2.enable = true; geoclue2.enable = true;
xserver = {
enable = true;
layout = "pl";
xkbOptions = "caps:ctrl_modifier";
xkbVariant = "";
libinput = {
enable = true;
touchpad = {
naturalScrolling = false;
disableWhileTyping = true;
};
};
deviceSection = ''
Option "TearFree" "true"
Option "AccelMethod" "sna"
'';
};
}; };
} }

View file

@ -1,16 +1,8 @@
{ { config, pkgs, discord, inputs, nixpkgs-nixos-unstable
config, , nixpkgs-nixos-stable-and-unfree, nixpkgs-nixos-unstable-and-unfree, ... }: {
pkgs,
discord,
inputs,
nixpkgs-nixos-unstable,
nixpkgs-nixos-stable-and-unfree,
nixpkgs-nixos-unstable-and-unfree,
...
}: {
security.chromiumSuidSandbox.enable = true; security.chromiumSuidSandbox.enable = true;
home-manager.users.cyryl = {...}: { home-manager.users.cyryl = { ... }: {
gtk = { gtk = {
enable = true; enable = true;
iconTheme = { iconTheme = {
@ -18,76 +10,73 @@
package = pkgs.gnome3.adwaita-icon-theme; package = pkgs.gnome3.adwaita-icon-theme;
}; };
}; };
qt = { qt = { enable = true; };
enable = true;
platformTheme = "gnome";
style.name = "adwaita-dark";
style.package = pkgs.adwaita-qt;
};
imports = []; imports = [ ];
programs.chromium.enable = true; programs.chromium.enable = true;
programs.firefox.enable = true; programs.firefox.enable = true;
home.packages = home.packages = (with pkgs;
(with pkgs; with pkgs.gnome3;
with pkgs.gnome3; with pkgs.python39Packages; [
with pkgs.python38Packages; [ anarchism
anarchism calibre
calibre cheese
cheese digikam
digikam electrum
electrum element-desktop
element-desktop eog
eog evince
evince fontconfig
fontconfig freecad
freecad ghidra-bin
ghidra-bin gimp
gimp glxinfo
glxinfo gnome-screenshot
gnome-screenshot gparted
gparted inkscape
inkscape kdenlive
kdenlive koreader
koreader krusader
krusader libreoffice
libreoffice mediainfo
mediainfo mindforger
mindforger modem-manager-gui
modem-manager-gui nautilus
nautilus nyxt
nyxt obs-studio
obs-studio openscad
openscad passff-host
passff-host pdfarranger
pdfarranger pkgs.gsettings-desktop-schemas
pkgs.gsettings-desktop-schemas pkgs.shotwell
pkgs.shotwell qcad
qcad qemu
qemu remmina
remmina signal-desktop
signal-desktop simple-scan
simple-scan spotify
spotify ssb-patchwork
ssb-patchwork tigervnc
tigervnc tlaplusToolbox
tlaplusToolbox tlaps
tlaps uefitool
uefitool vlc
vlc winePackages.full
winePackages.full wireshark
wireshark wsjtx
wsjtx xclip
xclip xidlehook
xidlehook yubico-piv-tool
yubico-piv-tool yubikey-manager-qt
yubikey-manager-qt yubikey-personalization
yubikey-personalization yubikey-personalization-gui
yubikey-personalization-gui ]) ++ (with nixpkgs-nixos-unstable; [ gnucash thunderbird ])
]) ++ [ nixpkgs-nixos-stable-and-unfree.discord ]
++ (with nixpkgs-nixos-unstable; [gnucash thunderbird]) ++ (with nixpkgs-nixos-unstable-and-unfree; [
++ [nixpkgs-nixos-stable-and-unfree.discord] hopper
++ (with nixpkgs-nixos-unstable-and-unfree; [hopper jetbrains.rust-rover jetbrains.clion]); jetbrains.rust-rover
jetbrains.clion
]);
}; };
} }

View file

@ -31,7 +31,7 @@
url = "https://github.com/vadimcn/vscode-lldb/releases/download/v1.6.10/codelldb-${pkgs.system}.vsix"; url = "https://github.com/vadimcn/vscode-lldb/releases/download/v1.6.10/codelldb-${pkgs.system}.vsix";
sha256 = "sha256-QWbpe6ofacjrTCyWSKljwHDWWeHGmKNqi7cpw8Qy5Tw="; sha256 = "sha256-QWbpe6ofacjrTCyWSKljwHDWWeHGmKNqi7cpw8Qy5Tw=";
}; };
buildInputs = with pkgs; [llvm lldb python38 autoPatchelfHook]; buildInputs = with pkgs; [llvm lldb python39 autoPatchelfHook];
}) })
] ]
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [

View file

@ -6,7 +6,6 @@
}: { }: {
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
pinentryFlavor = "curses";
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
appimage-run appimage-run

View file

@ -28,19 +28,16 @@
sync_address = "https://atuin.cyplo.dev"; sync_address = "https://atuin.cyplo.dev";
search_mode = "fuzzy"; search_mode = "fuzzy";
}; };
# flags = [ "--disable-up-arrow" ]; flags = ["--disable-up-arrow"];
}; };
go.enable = true; go.enable = true;
bat.enable = true; bat.enable = true;
browserpass.enable = true; browserpass.enable = true;
lsd.enable = true;
lsd.enableAliases = true;
#eza = { eza = {
# enable = true; enable = true;
# enableAliases = true; git = true;
# git = true; icons = true;
# icons = true; };
#};
}; };
} }

View file

@ -1,16 +0,0 @@
{
config,
pkgs,
...
}: {
services.xserver = {
enable = true;
displayManager.sddm = {
enable = true;
enableHidpi = true;
};
desktopManager.default = "plasma5";
desktopManager.plasma5.enable = true;
};
users.users.cyryl.packages = with pkgs; [];
}

9
nixos/kde/default.nix Normal file
View file

@ -0,0 +1,9 @@
{
config,
pkgs,
...
}: {
imports = [./system.nix];
home-manager.users.cyryl = {...}: {imports = [./home.nix];};
}

11
nixos/kde/home.nix Normal file
View file

@ -0,0 +1,11 @@
{ config, pkgs, ... }: {
services = {
kdeconnect.enable = true;
kdeconnect.indicator = true;
};
home.packages = [ ];
dconf.settings = { };
}

24
nixos/kde/system.nix Normal file
View file

@ -0,0 +1,24 @@
{ config, pkgs, inputs, system, ... }:
let
master = inputs.nixpkgs-master;
pkgs = master.legacyPackages."${system}";
in {
disabledModules = [ ];
imports = [ ];
services.flatpak.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver = {
enable = true;
displayManager.sddm = {
enable = true;
enableHidpi = true;
wayland.enable = true;
};
};
users.users.cyryl.packages = with pkgs; [ ];
programs.kdeconnect.enable = true;
}

View file

@ -1,8 +1,4 @@
{ { config, pkgs, ... }: {
config,
pkgs,
...
}: {
programs.atuin.enableZshIntegration = true; programs.atuin.enableZshIntegration = true;
programs.zsh = { programs.zsh = {
enable = true; enable = true;
@ -14,12 +10,12 @@
share = true; share = true;
}; };
enableAutosuggestions = true; autosuggestion.enable = true;
enableCompletion = true; enableCompletion = true;
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
plugins = ["vi-mode" "git" "python" "history-substring-search" "tmux"]; plugins = [ "vi-mode" "git" "python" "history-substring-search" "tmux" ];
}; };
initExtra = '' initExtra = ''
@ -69,7 +65,7 @@
programs.direnv = { programs.direnv = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
nix-direnv = {enable = true;}; nix-direnv = { enable = true; };
}; };
home.file.".config/starship.toml".text = '' home.file.".config/starship.toml".text = ''