mirror of
https://github.com/kmein/niveum
synced 2026-03-18 11:01:07 +01:00
kropsify some more
This commit is contained in:
@@ -8,7 +8,7 @@ in {
|
||||
imports = [
|
||||
<system/hardware-configuration.nix>
|
||||
<system/containers.nix>
|
||||
<niveum/modules/retiolum.nix>
|
||||
<modules/retiolum.nix>
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
@@ -24,7 +24,7 @@ in {
|
||||
};
|
||||
|
||||
environment.variables.TERM = "linux";
|
||||
environment.variables.HTOPRC = toString <niveum/dot/htoprc>;
|
||||
environment.variables.HTOPRC = toString <dot/htoprc>;
|
||||
|
||||
documentation.enable = false;
|
||||
documentation.doc.enable = false;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
telegram-reverse = pkgs.python3Packages.callPackage <niveum/packages/telegram-reverse.nix> {};
|
||||
telegram-betacode = pkgs.python3Packages.callPackage <niveum/packages/telegram-betacode.nix> {};
|
||||
telegram-horoscope = pkgs.python3Packages.callPackage <niveum/packages/telegram-horoscope.nix> {};
|
||||
telegram-reverse = pkgs.python3Packages.callPackage <packages/telegram-reverse.nix> {};
|
||||
telegram-betacode = pkgs.python3Packages.callPackage <packages/telegram-betacode.nix> {};
|
||||
telegram-horoscope = pkgs.python3Packages.callPackage <packages/telegram-horoscope.nix> {};
|
||||
in {
|
||||
containers.telegram-bots = {
|
||||
autoStart = true;
|
||||
|
||||
120
systems/generic.nix
Normal file
120
systems/generic.nix
Normal file
@@ -0,0 +1,120 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
helpers = import <lib>;
|
||||
in {
|
||||
imports = [
|
||||
"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/release-18.09.tar.gz}/nixos"
|
||||
<modules/defaultApplications.nix>
|
||||
<configs/hu-berlin.nix>
|
||||
<configs/shells.nix>
|
||||
<configs/editors.nix>
|
||||
<configs/graphics.nix>
|
||||
<configs/packages.nix>
|
||||
<configs/networks.nix>
|
||||
<configs/scripts.nix>
|
||||
<configs/retiolum.nix>
|
||||
];
|
||||
|
||||
boot.cleanTmpDir = true;
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull; # for bluetooth sound output
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
[General]
|
||||
Enable=Source,Sink,Media,Socket
|
||||
'';
|
||||
};
|
||||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.hplipWithPlugin ];
|
||||
};
|
||||
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Defaults pwfeedback
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.google-drive = {
|
||||
description = "Google Drive synchronisation service";
|
||||
wants = [ "network-online.target" ];
|
||||
script = ''
|
||||
${pkgs.grive2}/bin/grive -p ${config.users.users.kfm.home}/cloud/gdrive
|
||||
'';
|
||||
startAt = "*:0/5";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = config.users.users.kfm.name;
|
||||
};
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
extraTmuxConf = import <dot/tmux.nix>;
|
||||
keyMode = "vi";
|
||||
terminal = "screen-256color";
|
||||
};
|
||||
|
||||
users.mutableUsers = false;
|
||||
|
||||
users.users.kfm = {
|
||||
name = "kfm";
|
||||
description = config.constants.user.name;
|
||||
home = "/home/kfm";
|
||||
createHome = true;
|
||||
group = "users";
|
||||
extraGroups = [ "wheel" "audio" "docker" ];
|
||||
hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
home-manager.users.kfm = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = config.constants.user.name;
|
||||
userEmail = config.constants.user.email;
|
||||
aliases = {
|
||||
br = "branch";
|
||||
co = "checkout";
|
||||
ci = "commit";
|
||||
cm = "commit -m";
|
||||
amend = "commit --amend";
|
||||
st = "status";
|
||||
unstage = "reset HEAD --";
|
||||
diffs = "diff --staged";
|
||||
last = "log -1 HEAD";
|
||||
logs = "log --pretty=oneline";
|
||||
pull-all = "!pull-all"; # from dot/scripts.nix
|
||||
};
|
||||
ignores = config.constants.ignore;
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"mpv/input.conf".text = import <niveum/dot/mpv.nix>;
|
||||
"htop/htoprc".text = builtins.readFile <niveum/dot/htoprc>;
|
||||
"zathura/zathurarc".text = "set selection-clipboard clipboard";
|
||||
"pycodestyle".text = ''
|
||||
[pycodestyle]
|
||||
max-line-length = 110
|
||||
'';
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".ghc/ghci.conf".text = import <niveum/dot/ghci.nix> { inherit pkgs; };
|
||||
".stack/config.yaml".text = import <niveum/dot/stack.nix> { user = config.constants.user; };
|
||||
".zshrc".text = "# nothing to see here";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
[ <niveum/main.nix>
|
||||
[ <systems/generic.nix>
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
@@ -6,7 +6,6 @@
|
||||
{
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
./config.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ];
|
||||
@@ -1,47 +0,0 @@
|
||||
{ catullus-ssh ? "root@catullus.r"
|
||||
, scardanelli-ssh ? "root@scardanelli.r:22022"
|
||||
, homeros-ssh ? "root@homeros.r:22022"
|
||||
}:
|
||||
let
|
||||
krops = builtins.fetchGit {
|
||||
url = "https://cgit.krebsco.de/krops/";
|
||||
};
|
||||
lib = import "${krops}/lib";
|
||||
pkgs = import "${krops}/pkgs" {};
|
||||
|
||||
source = name: path: lib.evalSource [{
|
||||
nixpkgs.git = {
|
||||
url = https://github.com/NixOS/nixpkgs-channels;
|
||||
# ref = "6a3f5bcb061e1822f50e299f5616a0731636e4e7"; # 18.09
|
||||
ref = "22a606e20d662e2575552ab9b5e7c31aa8331e0e";
|
||||
};
|
||||
# stockholm.git = {
|
||||
# url = https://cgit.krebsco.de/stockholm;
|
||||
# ref = "9b2355521f8447e7da3af30bce8fb7ba6f83ed69";
|
||||
# };
|
||||
system.file = toString path;
|
||||
niveum.file = toString ../.;
|
||||
nixos-config.symlink = "system/physical.nix";
|
||||
# secrets.pass = {
|
||||
# dir = toString ~/.password-store;
|
||||
# name = name;
|
||||
# };
|
||||
}];
|
||||
|
||||
systems.scardanelli = pkgs.krops.writeDeploy "deploy-scardanelli" {
|
||||
source = source "scardanelli" ./scardanelli;
|
||||
target = scardanelli-ssh;
|
||||
};
|
||||
|
||||
systems.homeros = pkgs.krops.writeDeploy "deploy-homeros" {
|
||||
source = source "homeros" ./homeros;
|
||||
target = homeros-ssh;
|
||||
};
|
||||
|
||||
systems.catullus = pkgs.krops.writeDeploy "deploy-catullus" {
|
||||
source = source "catullus" ./catullus;
|
||||
target = catullus-ssh;
|
||||
};
|
||||
in systems // {
|
||||
all = pkgs.writeScript "deploy-all" (lib.concatStringsSep "\n" (lib.attrValues systems));
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
[ <niveum/main.nix>
|
||||
[ <systems/generic.nix>
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
@@ -6,7 +6,6 @@
|
||||
{
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
./config.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_acpi" "rtsx_usb_sdmmc" ];
|
||||
Reference in New Issue
Block a user