1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-20 09:39:39 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
fe8615e3ed
Upgrade to nixos 23.05 2023-05-31 17:02:01 +02:00
23ae6cc58f
flake.lock: Update
Flake lock file updates:

• Updated input 'emacs-overlay':
    'github:nix-community/emacs-overlay/04f25058fbe3ae1aadd435aba49b66493e939f83' (2023-05-30)
  → 'github:nix-community/emacs-overlay/d0fc4dae0e0248453324e8d05733163a6a2f102e' (2023-05-31)
• Updated input 'emacs-overlay/flake-utils':
    'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
  → 'github:numtide/flake-utils/a1720a10a6cfe8234c0e93907ffe81be440f4cef' (2023-05-31)
• Added input 'emacs-overlay/flake-utils/systems':
    'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/3e016341d4dca6ce7c62316f90e66341841a30f9' (2023-05-28)
  → 'github:Mic92/sops-nix/876846cde9762ae563f018c17993354875e2538e' (2023-05-30)
2023-05-31 16:44:02 +02:00
9 changed files with 139 additions and 198 deletions

60
flake.lock generated
View File

@ -71,11 +71,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1685412232, "lastModified": 1685527918,
"narHash": "sha256-Oifn6uAP+IS0jEGs50tlRBCIwtUVIN4f+8RdlxbvK88=", "narHash": "sha256-rlnBRZVOkytw02LflK+rAJ4XJ0TGuqGjrYGBMWgyaKA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "04f25058fbe3ae1aadd435aba49b66493e939f83", "rev": "d0fc4dae0e0248453324e8d05733163a6a2f102e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -101,12 +101,15 @@
} }
}, },
"flake-utils": { "flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1685518550,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -152,20 +155,19 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1681092193, "lastModified": 1685480784,
"narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=", "narHash": "sha256-pkk3J9gX745LEkkeTGhSRJqPJkmCPQzwI/q7a720XaY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af", "rev": "54a9d6456eaa6195998a0f37bdbafee9953ca0fb",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-22.11", "ref": "release-23.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -324,16 +326,16 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1685314633, "lastModified": 1685451684,
"narHash": "sha256-8LXBPqTQXl5ofkjpJ18JcbmLJ/lWDoMxtUwiDYv0wro=", "narHash": "sha256-Y5iqtWkO82gHAnrBvNu/yLQsiVNJRCad4wWGz2a1urk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c8a17ce7abc03c50cd072e9e6c9b389c5f61836b", "rev": "6b0edc9c690c1d8a729f055e0d73439045cfda55",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-22.11", "ref": "nixos-23.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -359,7 +361,7 @@
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-22_11": "nixpkgs-22_11", "nixpkgs-22_11": "nixpkgs-22_11",
"utils": "utils_2" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1671659164, "lastModified": 1671659164,
@ -384,11 +386,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1685242617, "lastModified": 1685434555,
"narHash": "sha256-UBPXGfGwGMJm2Wj9kDj8+TMMK2PTouSM/TpiXYtaqtQ=", "narHash": "sha256-aZl0yeaYX3T2L3W3yXOd3S9OfpS+8YUOT2b1KwrSf6E=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "3e016341d4dca6ce7c62316f90e66341841a30f9", "rev": "876846cde9762ae563f018c17993354875e2538e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -398,22 +400,22 @@
"type": "github" "type": "github"
} }
}, },
"utils": { "systems": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1681028828,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "numtide", "owner": "nix-systems",
"repo": "flake-utils", "repo": "default",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "nix-systems",
"repo": "flake-utils", "repo": "default",
"type": "github" "type": "github"
} }
}, },
"utils_2": { "utils": {
"locked": { "locked": {
"lastModified": 1605370193, "lastModified": 1605370193,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",

View File

@ -3,7 +3,7 @@
"Flake to define configurations of 'elss' - ellmauthaler stefan's systems"; "Flake to define configurations of 'elss' - ellmauthaler stefan's systems";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
#nix = { #nix = {
@ -15,7 +15,7 @@
nixos-hardware = { url = "github:NixOS/nixos-hardware/master"; }; nixos-hardware = { url = "github:NixOS/nixos-hardware/master"; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-22.11"; url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -79,6 +79,8 @@
"vscode-extension-ms-vscode-cpptools" "vscode-extension-ms-vscode-cpptools"
"zoom" "zoom"
]; ];
# testing purposes till https://github.com/NixOS/nixpkgs/issues/224505 is resolved
permittedInsecurePackages = [ "openssl-1.1.1t" ];
}; };
channels.nixpkgs.overlaysBuilder = channels: [ channels.nixpkgs.overlaysBuilder = channels: [

View File

@ -1,21 +1,14 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }: {
config, imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; boot.initrd.availableKernelModules =
boot.initrd.kernelModules = []; [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.kernelModules = ["kvm-intel"]; boot.initrd.kernelModules = [ ];
boot.extraModulePackages = []; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/da267a3c-34e3-4218-933f-10738ee61eb6"; device = "/dev/disk/by-uuid/da267a3c-34e3-4218-933f-10738ee61eb6";
@ -32,11 +25,8 @@
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ swapDevices =
{device = "/dev/disk/by-uuid/0069f1fa-dd8e-4c0a-8f01-a576af29909e";} [{ device = "/dev/disk/by-uuid/0069f1fa-dd8e-4c0a-8f01-a576af29909e"; }];
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
} }

View File

@ -1,39 +1,30 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }: {
config, imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; boot.initrd.availableKernelModules =
boot.initrd.kernelModules = []; [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.kernelModules = ["kvm-intel"]; boot.initrd.kernelModules = [ ];
boot.extraModulePackages = []; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/6b7f9f80-af34-4317-b017-f883a2316674"; device = "/dev/disk/by-uuid/6b7f9f80-af34-4317-b017-f883a2316674";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/9c84f143-023d-4fcb-a49c-ca78ce69e0e0"; boot.initrd.luks.devices."crypted".device =
"/dev/disk/by-uuid/9c84f143-023d-4fcb-a49c-ca78ce69e0e0";
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/39E0-047B"; device = "/dev/disk/by-uuid/39E0-047B";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ swapDevices =
{device = "/dev/disk/by-uuid/93381a25-6704-408e-b091-cfda6cddbda0";} [{ device = "/dev/disk/by-uuid/93381a25-6704-408e-b091-cfda6cddbda0"; }];
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
} }

View File

@ -1,38 +1,27 @@
{ { config, pkgs, lib, ... }:
config,
pkgs,
lib,
...
}:
with lib; { with lib; {
config = let config = let cfg = config.elss.server.gitea;
cfg = config.elss.server.gitea; in mkIf cfg.enable {
in
mkIf cfg.enable {
services.nginx.virtualHosts."git.ellmauthaler.net" = { services.nginx.virtualHosts."git.ellmauthaler.net" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = { proxyPass = "http://localhost:3001"; };
proxyPass = "http://localhost:3001";
};
}; };
services.gitea = { services.gitea = {
enable = true; enable = true;
settings.service = { settings.service = { DISABLE_REGISTRATION = true; };
DISABLE_REGISTRATION = true;
};
appName = "gitea: ellmauthaler.net gitea service"; appName = "gitea: ellmauthaler.net gitea service";
database = { database = {
type = "postgres"; type = "postgres";
host = "/run/posgresql"; host = "/run/posgresql";
}; };
domain = "git.ellmauthaler.net";
rootUrl = "https://git.ellmauthaler.net";
httpPort = 3001;
settings = { settings = {
repository = { repository = { DEFAULT_BRANCH = "main"; };
DEFAULT_BRANCH = "main"; server = {
ROOT_URL = "https://git.ellmauthaler.net";
HTTP_PORT = 3001;
DOMAIN = "git.ellmauthaler.net";
}; };
}; };
}; };

View File

@ -1,18 +1,11 @@
{ { config, pkgs, lib, ... }:
config,
pkgs,
lib,
...
}:
with lib; { with lib; {
config = let config = let cfg = config.elss.server.nextcloud;
cfg = config.elss.server.nextcloud; in mkIf cfg.enable {
in
mkIf cfg.enable {
elss.server.sql.enable = mkDefault true; elss.server.sql.enable = mkDefault true;
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud25; package = pkgs.nextcloud26;
hostName = "cloudstore.ellmauthaler.net"; hostName = "cloudstore.ellmauthaler.net";
https = true; https = true;
enableBrokenCiphersForSSE = false; enableBrokenCiphersForSSE = false;
@ -33,8 +26,8 @@ with lib; {
}; };
systemd.services."nextcloud-setup" = { systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"]; requires = [ "postgresql.service" ];
after = ["postrgresql.service"]; after = [ "postrgresql.service" ];
}; };
sops.secrets = { sops.secrets = {
storemin = { storemin = {

View File

@ -1,20 +1,15 @@
{ { config, lib, pkgs, ... }:
config,
lib,
pkgs,
...
}:
with lib; { with lib; {
options.elss.sshd.enable = mkEnableOption "Set up sshd"; options.elss.sshd.enable = mkEnableOption "Set up sshd";
config = let config = let cfg = config.elss.sshd;
cfg = config.elss.sshd; in mkIf cfg.enable {
in
mkIf cfg.enable {
services.openssh = { services.openssh = {
enable = true; enable = true;
passwordAuthentication = false; settings = {
permitRootLogin = "no"; PasswordAuthentication = false;
PermitRootLogin = "no";
};
}; };
}; };
} }

View File

@ -2,29 +2,18 @@
description = "basic tool setup flake"; description = "basic tool setup flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
flake-utils-plus.url = "github:gytis-ivaskevicius/flake-utils-plus"; flake-utils-plus.url = "github:gytis-ivaskevicius/flake-utils-plus";
}; };
outputs = { outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, flake-utils-plus
self, , ... }@inputs:
nixpkgs, { } // (flake-utils.lib.eachDefaultSystem (system:
nixpkgs-unstable, let
flake-utils, unstable = import nixpkgs-unstable { inherit system; };
flake-utils-plus, pkgs = import nixpkgs { inherit system; };
...
} @ inputs:
{}
// (flake-utils.lib.eachDefaultSystem (
system: let
unstable = import nixpkgs-unstable {
inherit system;
};
pkgs = import nixpkgs {
inherit system;
};
in rec { in rec {
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
buildInputs = [ buildInputs = [
@ -32,6 +21,5 @@
# pkgs.clingo # pkgs.clingo
]; ];
}; };
} }));
));
} }

View File

@ -2,7 +2,7 @@
description = "basic rust flake"; description = "basic rust flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay = { rust-overlay = {
url = "github:oxalica/rust-overlay"; url = "github:oxalica/rust-overlay";
@ -18,24 +18,16 @@
}; };
}; };
outputs = { outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, gitignoresrc
self, , rust-overlay, ... }@inputs:
nixpkgs,
nixpkgs-unstable,
flake-utils,
gitignoresrc,
rust-overlay,
...
} @ inputs:
{ {
#overlay = import ./nix { inherit gitignoresrc; }; #overlay = import ./nix { inherit gitignoresrc; };
} } // (flake-utils.lib.eachDefaultSystem (system:
// (flake-utils.lib.eachDefaultSystem ( let
system: let unstable = import nixpkgs-unstable { inherit system; };
unstable = import nixpkgs-unstable {inherit system;};
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [(import rust-overlay)]; overlays = [ (import rust-overlay) ];
}; };
in rec { in rec {
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
@ -54,6 +46,5 @@
pkgs.kcov pkgs.kcov
]; ];
}; };
} }));
));
} }