style: format nix files
This commit is contained in:
parent
22f6f8b323
commit
4d3bda09b9
|
@ -1,9 +1,5 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ ./x11.nix ./gtk.nix ./gnome.nix ];
|
||||||
./x11.nix
|
|
||||||
./gtk.nix
|
|
||||||
./gnome.nix
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,9 @@ let
|
||||||
# the gschema doesn't seem to be installed properly (see dconf)
|
# the gschema doesn't seem to be installed properly (see dconf)
|
||||||
makeFlags = [ "INSTALLBASE=$(out)/share/gnome-shell/extensions" ];
|
makeFlags = [ "INSTALLBASE=$(out)/share/gnome-shell/extensions" ];
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
environment.systemPackages = with pkgs;
|
||||||
environment.systemPackages = with pkgs; with gnomeExtensions; [
|
with gnomeExtensions; [
|
||||||
gnome3.dconf-editor
|
gnome3.dconf-editor
|
||||||
gnome3.gnome-tweaks
|
gnome3.gnome-tweaks
|
||||||
gnome3.gnome-shell-extensions # required for user-theme
|
gnome3.gnome-shell-extensions # required for user-theme
|
||||||
|
|
27
flake.nix
27
flake.nix
|
@ -1,14 +1,14 @@
|
||||||
{
|
{
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
inputs.home-manager = {
|
inputs.home-manager = { url = "github:nix-community/home-manager/master"; };
|
||||||
url = "github:nix-community/home-manager/master";
|
|
||||||
};
|
|
||||||
|
|
||||||
inputs.nur.url = "github:nix-community/NUR/master";
|
inputs.nur.url = "github:nix-community/NUR/master";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, nur }: let
|
outputs = { self, nixpkgs, home-manager, nur }:
|
||||||
systemModule = { hostName, hardwareConfig, config }: ({ pkgs, ... }: {
|
let
|
||||||
|
systemModule = { hostName, hardwareConfig, config }:
|
||||||
|
({ pkgs, ... }: {
|
||||||
networking.hostName = hostName;
|
networking.hostName = hostName;
|
||||||
|
|
||||||
# Let 'nixos-version --json' know about the Git revision
|
# Let 'nixos-version --json' know about the Git revision
|
||||||
|
@ -17,22 +17,16 @@
|
||||||
|
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
nix.registry.nixpkgs.flake = nixpkgs;
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [ nur.overlay ];
|
||||||
nur.overlay
|
|
||||||
];
|
|
||||||
|
|
||||||
imports = [
|
imports =
|
||||||
hardwareConfig
|
[ hardwareConfig home-manager.nixosModules.home-manager config ];
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
config
|
|
||||||
];
|
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
|
|
||||||
nixosConfigurations.felix-nixos = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.felix-nixos = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules =
|
modules = [
|
||||||
[
|
|
||||||
nixpkgs.nixosModules.notDetected
|
nixpkgs.nixosModules.notDetected
|
||||||
(systemModule {
|
(systemModule {
|
||||||
hostName = "felix-nixos";
|
hostName = "felix-nixos";
|
||||||
|
@ -44,8 +38,7 @@
|
||||||
|
|
||||||
nixosConfigurations.pilot1 = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.pilot1 = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules =
|
modules = [
|
||||||
[
|
|
||||||
nixpkgs.nixosModules.notDetected
|
nixpkgs.nixosModules.notDetected
|
||||||
(systemModule {
|
(systemModule {
|
||||||
hostName = "pilot1";
|
hostName = "pilot1";
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ ./planck.nix ];
|
||||||
./planck.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.supportedFilesystems = [ "btrfs" ];
|
boot.supportedFilesystems = [ "btrfs" ];
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
@ -16,9 +14,7 @@
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.config = {
|
hardware.bluetooth.config = {
|
||||||
General = {
|
General = { Enable = "Source,Sink,Media,Socket"; };
|
||||||
Enable = "Source,Sink,Media,Socket";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Sound.
|
# Sound.
|
||||||
|
|
|
@ -1,40 +1,42 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/9ef41d63-a7ad-406d-8c2b-5ad3fb4c0ea6";
|
device = "/dev/disk/by-uuid/9ef41d63-a7ad-406d-8c2b-5ad3fb4c0ea6";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@" "compress-force=zstd" "noatime" ];
|
options = [ "subvol=@" "compress-force=zstd" "noatime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/6f4f3ce1-57fd-4ec3-bb9d-7847853d2dcf";
|
boot.initrd.luks.devices."enc".device =
|
||||||
|
"/dev/disk/by-uuid/6f4f3ce1-57fd-4ec3-bb9d-7847853d2dcf";
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-uuid/9ef41d63-a7ad-406d-8c2b-5ad3fb4c0ea6";
|
device = "/dev/disk/by-uuid/9ef41d63-a7ad-406d-8c2b-5ad3fb4c0ea6";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@home" "compress-force=zstd" "noatime" ];
|
options = [ "subvol=@home" "compress-force=zstd" "noatime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/disk/by-uuid/9ef41d63-a7ad-406d-8c2b-5ad3fb4c0ea6";
|
device = "/dev/disk/by-uuid/9ef41d63-a7ad-406d-8c2b-5ad3fb4c0ea6";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@swap" ];
|
options = [ "subvol=@swap" ];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/.snapshots" =
|
fileSystems."/.snapshots" = {
|
||||||
{ device = "/dev/disk/by-uuid/9ef41d63-a7ad-406d-8c2b-5ad3fb4c0ea6";
|
device = "/dev/disk/by-uuid/9ef41d63-a7ad-406d-8c2b-5ad3fb4c0ea6";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@snapshots" "compress-force=zstd" "noatime" ];
|
options = [ "subvol=@snapshots" "compress-force=zstd" "noatime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/5C20-4516";
|
device = "/dev/disk/by-uuid/5C20-4516";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,6 @@
|
||||||
|
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [ vaapiIntel vaapiVdpau libvdpau-va-gl ];
|
||||||
vaapiIntel
|
|
||||||
vaapiVdpau
|
|
||||||
libvdpau-va-gl
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,6 @@
|
||||||
|
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [ libvdpau-va-gl vaapiVdpau ];
|
||||||
libvdpau-va-gl
|
|
||||||
vaapiVdpau
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
with pkgs;
|
with pkgs; {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./shell
|
./shell
|
||||||
./editors
|
./editors
|
||||||
|
@ -20,9 +19,7 @@ with pkgs;
|
||||||
longitude = "10.4021562";
|
longitude = "10.4021562";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.ssh = {
|
programs.ssh = { enable = true; };
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -35,9 +32,7 @@ with pkgs;
|
||||||
|
|
||||||
programs.gpg.enable = true;
|
programs.gpg.enable = true;
|
||||||
|
|
||||||
programs.git = {
|
programs.git = { defaultProfile = "work"; };
|
||||||
defaultProfile = "work";
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."nixpkgs/config.nix".text = ''
|
xdg.configFile."nixpkgs/config.nix".text = ''
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.ssh = {
|
programs.ssh = { enable = true; };
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -39,9 +37,7 @@
|
||||||
|
|
||||||
programs.gpg.enable = true;
|
programs.gpg.enable = true;
|
||||||
|
|
||||||
programs.git = {
|
programs.git = { defaultProfile = "private"; };
|
||||||
defaultProfile = "private";
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."nixpkgs/config.nix".text = ''
|
xdg.configFile."nixpkgs/config.nix".text = ''
|
||||||
{
|
{
|
||||||
|
|
22
home/git.nix
22
home/git.nix
|
@ -1,9 +1,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ ./modules/git.nix ];
|
||||||
./modules/git.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -23,16 +21,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
ignores = [ ".direnv" ];
|
ignores = [ ".direnv" ];
|
||||||
signing = {
|
signing = { signByDefault = true; };
|
||||||
signByDefault = true;
|
|
||||||
};
|
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
init = {
|
init = { defaultBranch = "main"; };
|
||||||
defaultBranch = "main";
|
pull = { rebase = true; };
|
||||||
};
|
|
||||||
pull = {
|
|
||||||
rebase = true;
|
|
||||||
};
|
|
||||||
rebase = {
|
rebase = {
|
||||||
autoStash = true;
|
autoStash = true;
|
||||||
autoSquash = true;
|
autoSquash = true;
|
||||||
|
@ -41,8 +33,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
aliases = {
|
aliases = {
|
||||||
mr = "!sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -";
|
mr =
|
||||||
pr = "!sh -c 'git fetch $1 refs/pull/$2/head:pr/$1 && git checkout pr/$2'";
|
"!sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -";
|
||||||
|
pr =
|
||||||
|
"!sh -c 'git fetch $1 refs/pull/$2/head:pr/$1 && git checkout pr/$2'";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
home.packages = [ pkgs.keybase-gui ];
|
home.packages = [ pkgs.keybase-gui ];
|
||||||
|
|
||||||
xdg.configFile."autostart/keybase.desktop".text = with pkgs;
|
xdg.configFile."autostart/keybase.desktop".text = with pkgs;
|
||||||
builtins.replaceStrings
|
builtins.replaceStrings [ "${keybase-gui}" ]
|
||||||
["${keybase-gui}"] ["env KEYBASE_AUTOSTART=1 ${keybase-gui}"]
|
[ "env KEYBASE_AUTOSTART=1 ${keybase-gui}" ]
|
||||||
(builtins.readFile "${keybase-gui}/share/applications/keybase.desktop");
|
(builtins.readFile "${keybase-gui}/share/applications/keybase.desktop");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
with pkgs;
|
with pkgs; {
|
||||||
{
|
home.packages = [ wally-cli ];
|
||||||
home.packages = [
|
|
||||||
wally-cli
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,23 +2,21 @@
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
let
|
let
|
||||||
signal-desktop = runCommand "signal-desktop" {
|
signal-desktop =
|
||||||
buildInputs = [ makeWrapper ];
|
runCommand "signal-desktop" { buildInputs = [ makeWrapper ]; } ''
|
||||||
} ''
|
|
||||||
mkdir $out
|
mkdir $out
|
||||||
ln -s ${pkgs.signal-desktop}/* $out
|
ln -s ${pkgs.signal-desktop}/* $out
|
||||||
rm $out/bin
|
rm $out/bin
|
||||||
makeWrapper ${pkgs.signal-desktop}/bin/signal-desktop $out/bin/signal-desktop \
|
makeWrapper ${pkgs.signal-desktop}/bin/signal-desktop $out/bin/signal-desktop \
|
||||||
--add-flags "--use-tray-icon"
|
--add-flags "--use-tray-icon"
|
||||||
'';
|
'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
home.packages = [ signal-desktop ];
|
home.packages = [ signal-desktop ];
|
||||||
|
|
||||||
# TODO switch to overwritten `signal-desktop` when
|
# TODO switch to overwritten `signal-desktop` when
|
||||||
# desktop file is updated with correct exec path
|
# desktop file is updated with correct exec path
|
||||||
xdg.configFile."autostart/signal-desktop.desktop".text =
|
xdg.configFile."autostart/signal-desktop.desktop".text =
|
||||||
builtins.replaceStrings
|
builtins.replaceStrings [ "bin/signal-desktop" ]
|
||||||
["bin/signal-desktop"] ["bin/signal-desktop --start-in-tray"]
|
[ "bin/signal-desktop --start-in-tray" ] (builtins.readFile
|
||||||
(builtins.readFile "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop");
|
"${pkgs.signal-desktop}/share/applications/signal-desktop.desktop");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
with pkgs;
|
with pkgs; {
|
||||||
{
|
home.packages = with pkgs; [ mullvad-vpn ];
|
||||||
home.packages = with pkgs; [
|
|
||||||
mullvad-vpn
|
|
||||||
];
|
|
||||||
|
|
||||||
# autostart
|
# autostart
|
||||||
xdg.configFile."autostart/mullvad-vpn.desktop".source =
|
xdg.configFile."autostart/mullvad-vpn.desktop".source =
|
||||||
|
|
|
@ -1,18 +1,9 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ ./hardened.nix ./i18n.nix ./nix.nix ./vpn.nix ];
|
||||||
./hardened.nix
|
|
||||||
./i18n.nix
|
|
||||||
./nix.nix
|
|
||||||
./vpn.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [ wget curl neovim ];
|
||||||
wget
|
|
||||||
curl
|
|
||||||
neovim
|
|
||||||
];
|
|
||||||
|
|
||||||
fonts.fonts = with pkgs; [
|
fonts.fonts = with pkgs; [
|
||||||
fira-code
|
fira-code
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
# utilises some of the measures from
|
# utilises some of the measures from
|
||||||
# <nixpkgs/nixos/modules/profiles/hardened.nix>
|
# <nixpkgs/nixos/modules/profiles/hardened.nix>
|
||||||
with lib;
|
with lib; {
|
||||||
{
|
|
||||||
boot.loader.systemd-boot.editor = mkDefault false;
|
boot.loader.systemd-boot.editor = mkDefault false;
|
||||||
|
|
||||||
nix.allowedUsers = mkDefault [ "@users" ];
|
nix.allowedUsers = mkDefault [ "@users" ];
|
||||||
|
|
|
@ -2,15 +2,27 @@
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
let
|
let
|
||||||
dotnet-combined = with dotnetCorePackages; combinePackages [ sdk_3_1 sdk_2_1 ];
|
# preview
|
||||||
|
# buildDotnet = attrs: callPackage (import <nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix> attrs) {};
|
||||||
|
# buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; });
|
||||||
|
# buildNetCore = attrs: buildDotnet (attrs // { type = "netcore"; });
|
||||||
|
# buildNetCoreSdk = attrs: buildDotnet (attrs // { type = "sdk"; });
|
||||||
|
|
||||||
|
# sdk_5_0_rc_1 = buildNetCoreSdk {
|
||||||
|
# version = "5.0.100-rc.1.20452.10";
|
||||||
|
# sha512 = {
|
||||||
|
# x86_64-linux = "d7e709dacc4bb188c2380060d24bfb5b791240dc33af8499fb4a31e1885a9377dad1d1ebc76847432ea67d5e4ac832a31679dc293e09fa6dade28f5fbbe4db9b";
|
||||||
|
# aarch64-linux = "2d04890c71e845d1eb08f5dfbbb9c93024d7a52fb1cc3fd50bd51bc6bd44e455c5c82abc8f04eef23bd012984ae5f86143c600ceb49c4c733935d95d5b68785f";
|
||||||
|
# x86_64-darwin = "06bb40273071f3dd1e84ebf58abc7798795d5f1ac298f24bf7109d1597fd52ff31bcbf2b81f86d91d37ae293678d07f8da0469d7cbd318d19a8d718b6629dcac";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
dotnet-combined = with dotnetCorePackages; combinePackages [ sdk_3_1 ];
|
||||||
dotnetRoot = "${dotnet-combined}";
|
dotnetRoot = "${dotnet-combined}";
|
||||||
dotnetSdk = "${dotnet-combined}/sdk";
|
dotnetSdk = "${dotnet-combined}/sdk";
|
||||||
dotnetBinary = "${dotnetRoot}/bin/dotnet";
|
dotnetBinary = "${dotnetRoot}/bin/dotnet";
|
||||||
in
|
in {
|
||||||
{
|
home.packages = [ dotnet-combined ];
|
||||||
home.packages = [
|
|
||||||
dotnet-combined
|
|
||||||
];
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
DOTNET_ROOT = dotnetRoot;
|
DOTNET_ROOT = dotnetRoot;
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [ docker-compose ];
|
||||||
docker-compose
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation.docker = {
|
virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue