forked from Yuka/c3h-nixfiles
Compare commits
No commits in common. "90f258df0539b511d6fb2b8e78f6b7189c30f406" and "e72d22c5bc2767b47c4f68b843ca3517c9c83167" have entirely different histories.
90f258df05
...
e72d22c5bc
14 changed files with 42 additions and 132 deletions
|
@ -49,6 +49,5 @@
|
||||||
ll = "exa -l";
|
ll = "exa -l";
|
||||||
la = "exa -la";
|
la = "exa -la";
|
||||||
tree = "exa -T";
|
tree = "exa -T";
|
||||||
apt = "echo 'please use nix-env -iA <packagename> instead to install packages.'";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
14
deploy.sh
14
deploy.sh
|
@ -11,16 +11,12 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mode="${1:-switch}"
|
mode="${1:-switch}"
|
||||||
host="${2:-nuc}"
|
host="nuc"
|
||||||
target="${3:-$host.c3h}"
|
target="nuc@nuc.c3h"
|
||||||
|
#host="${2:-nuc}"
|
||||||
echo "deploying $host to $target"
|
#target="${3:-$host.c3h}"
|
||||||
sleep 1
|
|
||||||
|
|
||||||
sources=$(nix-build nix/sources-dir.nix --no-out-link)
|
sources=$(nix-build nix/sources-dir.nix --no-out-link)
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
system_drv=$(nix-instantiate "<nixpkgs/nixos>" -I $sources -I "nixos-config=$PWD/hosts/$host/configuration.nix" | head -n1)
|
nixos-rebuild "$mode" --target-host "$target" --use-remote-sudo -I $sources -I "nixos-config=$PWD/hosts/$host/configuration.nix"
|
||||||
nix-copy-closure --to $target $system_drv
|
|
||||||
system=$(ssh $target "nix-store --realise $system_drv")
|
|
||||||
ssh $target "sudo nix-env -p /nix/var/nix/profiles/system -i $system && sudo /nix/var/nix/profiles/system/bin/switch-to-configuration $mode"
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
{ modulesPath, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
|
||||||
<nixos-hardware/raspberry-pi/4>
|
|
||||||
../../common
|
|
||||||
|
|
||||||
# services
|
|
||||||
../../shared-services/pulseaudio.nix
|
|
||||||
#../../shared-services/nfs-server.nix
|
|
||||||
../../shared-services/mpd.nix
|
|
||||||
../../shared-services/ympd.nix
|
|
||||||
../../shared-services/spotifyd.nix
|
|
||||||
../../shared-services/desktop.nix
|
|
||||||
../../shared-services/vnc.nix
|
|
||||||
../../shared-services/webserver.nix
|
|
||||||
];
|
|
||||||
users.users.c3h = {
|
|
||||||
isNormalUser = true;
|
|
||||||
password = "c3h";
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
packages = with pkgs; [ chromium firefox mpv youtube-dl ];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "bemmer";
|
|
||||||
networking.domain = "c3h";
|
|
||||||
|
|
||||||
networking.useDHCP = true;
|
|
||||||
|
|
||||||
nixpkgs.system = "aarch64-linux";
|
|
||||||
boot.initrd.availableKernelModules = lib.mkForce [ "vc4" "i2c_bcm2835" ];
|
|
||||||
boot.supportedFilesystems = lib.mkForce [ "ext4" "vfat" ];
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_rpi4;
|
|
||||||
documentation.enable = false;
|
|
||||||
|
|
||||||
hardware.raspberry-pi."4" = {
|
|
||||||
fkms-3d.enable = true;
|
|
||||||
#audio.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "21.05";
|
|
||||||
}
|
|
|
@ -3,18 +3,17 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
<nixos-hardware/common/cpu/intel>
|
|
||||||
../../common
|
../../common
|
||||||
|
|
||||||
# services
|
# services
|
||||||
../../shared-services/pulseaudio.nix
|
./pulseaudio.nix
|
||||||
../../shared-services/nfs-server.nix
|
./nfs-server.nix
|
||||||
../../shared-services/mpd.nix
|
./mpd.nix
|
||||||
../../shared-services/ympd.nix
|
./ympd.nix
|
||||||
../../shared-services/spotifyd.nix
|
./spotifyd.nix
|
||||||
../../shared-services/desktop.nix
|
./desktop.nix
|
||||||
../../shared-services/vnc.nix
|
./vnc.nix
|
||||||
../../shared-services/webserver.nix
|
./webserver.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "nuc";
|
networking.hostName = "nuc";
|
||||||
|
|
25
hosts/nuc/desktop.nix
Normal file
25
hosts/nuc/desktop.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
users.mutableUsers = false;
|
||||||
|
users.users.c3h = {
|
||||||
|
isNormalUser = true;
|
||||||
|
password = "c3h";
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
packages = with pkgs; [ chromium firefox mpv youtube-dl ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
layout = "de";
|
||||||
|
|
||||||
|
videoDrivers = [ "modesetting" ];
|
||||||
|
useGlamor = true;
|
||||||
|
|
||||||
|
displayManager.lightdm.enable = true;
|
||||||
|
displayManager.autoLogin.enable = true;
|
||||||
|
displayManager.autoLogin.user = "c3h";
|
||||||
|
|
||||||
|
desktopManager.mate.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -8,5 +8,4 @@
|
||||||
hardware.pulseaudio.package = pkgs.pulseaudio;
|
hardware.pulseaudio.package = pkgs.pulseaudio;
|
||||||
hardware.pulseaudio.tcp.enable = true;
|
hardware.pulseaudio.tcp.enable = true;
|
||||||
hardware.pulseaudio.tcp.anonymousClients.allowedIpRanges = [ "127.0.0.0/8" "::/64" "10.23.42.0/24" ];
|
hardware.pulseaudio.tcp.anonymousClients.allowedIpRanges = [ "127.0.0.0/8" "::/64" "10.23.42.0/24" ];
|
||||||
environment.variables.PULSE_SERVER = "127.0.0.1";
|
|
||||||
}
|
}
|
|
@ -11,28 +11,16 @@
|
||||||
"url": "https://github.com/nmattia/niv/archive/e0ca65c81a2d7a4d82a189f1e23a48d59ad42070.tar.gz",
|
"url": "https://github.com/nmattia/niv/archive/e0ca65c81a2d7a4d82a189f1e23a48d59ad42070.tar.gz",
|
||||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
|
||||||
"branch": "master",
|
|
||||||
"description": "A collection of NixOS modules covering hardware quirks.",
|
|
||||||
"homepage": "",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixos-hardware",
|
|
||||||
"rev": "3aabf78bfcae62f5f99474f2ebbbe418f1c6e54f",
|
|
||||||
"sha256": "10g240brgjz7qi20adwajxwqrqb5zxc79ii1mc20fasgqlf2a8sx",
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/NixOS/nixos-hardware/archive/3aabf78bfcae62f5f99474f2ebbbe418f1c6e54f.tar.gz",
|
|
||||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"branch": "nixos-unstable",
|
"branch": "nixos-21.05",
|
||||||
"description": "Nix Packages collection",
|
"description": "Nix Packages collection",
|
||||||
"homepage": "",
|
"homepage": "",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "34ad3ffe08adfca17fcb4e4a47bb5f3b113687be",
|
"rev": "70904d4a9927a4d6e05c72c4aaac4370e05107f3",
|
||||||
"sha256": "02li241rz5668nfyp88zfjilxf0mr9yansa93fbl38hjwkhf3ix6",
|
"sha256": "08vvir0npyrdx85ypiannwzvyryqdw3749bghffhdsq2dgz1cx8z",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/34ad3ffe08adfca17fcb4e4a47bb5f3b113687be.tar.gz",
|
"url": "https://github.com/NixOS/nixpkgs/archive/70904d4a9927a4d6e05c72c4aaac4370e05107f3.tar.gz",
|
||||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
users.mutableUsers = false;
|
|
||||||
users.users.c3h = {
|
|
||||||
isNormalUser = true;
|
|
||||||
password = "c3h";
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
packages = with pkgs; [ chromium firefox mpv youtube-dl ];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
layout = "de";
|
|
||||||
|
|
||||||
videoDrivers = [ "modesetting" ];
|
|
||||||
useGlamor = true;
|
|
||||||
|
|
||||||
displayManager.lightdm.enable = true;
|
|
||||||
displayManager.autoLogin.enable = true;
|
|
||||||
displayManager.autoLogin.user = "c3h";
|
|
||||||
|
|
||||||
desktopManager.mate.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.chromium = {
|
|
||||||
enable = true;
|
|
||||||
extensions = [
|
|
||||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin
|
|
||||||
];
|
|
||||||
extraOpts = {
|
|
||||||
DefaultSearchProviderEnabled = true;
|
|
||||||
DefaultSearchProviderName = "DuckDuckGo";
|
|
||||||
DefaultSearchProviderIconURL = "https://duckduckgo.com/favicon.ico";
|
|
||||||
DefaultSearchProviderSearchURL = "https://duckduckgo.com/?q={searchTerms}";
|
|
||||||
DefaultSearchProviderSuggestURL = "https://duckduckgo.com/ac/?q={searchTerms}&type=list";
|
|
||||||
|
|
||||||
DefaultBrowserSettingEnabled = false;
|
|
||||||
BlockThirdPartyCookies = true;
|
|
||||||
|
|
||||||
BrowserSignin = 0;
|
|
||||||
SyncDisabled = true;
|
|
||||||
PasswordManagerEnabled = false;
|
|
||||||
|
|
||||||
# Send less data to Google
|
|
||||||
SafeBrowsingProtectionLevel = 0;
|
|
||||||
UrlKeyedAnonymizedDataCollectionEnabled = false;
|
|
||||||
SafeBrowsingExtendedReportingEnabled = false;
|
|
||||||
SpellCheckServiceEnabled = false;
|
|
||||||
AdvancedProtectionAllowed = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue