Add flake files for system, home config

This commit is contained in:
asonix 2023-01-31 11:47:02 -06:00
parent 2c6dbdd1ae
commit f480c9f072
8 changed files with 248 additions and 21 deletions

124
config/nixpkgs/flake.lock Normal file
View file

@ -0,0 +1,124 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1674440933,
"narHash": "sha256-CASRcD/rK3fn5vUCti3jzry7zi0GsqRsBohNq9wPgLs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "65c47ced082e3353113614f77b1bc18822dc731f",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-22.11",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1675154384,
"narHash": "sha256-gUXzyTS3WsO3g2Rz0qOYR2a26whkyL2UfTr1oPH9mm8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0218941ea68b4c625533bead7bbb94ccce52dceb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1675115703,
"narHash": "sha256-4zetAPSyY0D77x+Ww9QBe8RHn1akvIvHJ/kgg8kGDbk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2caf4ef5005ecc68141ecb4aac271079f7371c44",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"obs-scene-switcher": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1674699178,
"narHash": "sha256-L6YRJ3dHAUTGp0kvuBsIth1JAW+TLRiDlwF54cYQxMg=",
"ref": "refs/heads/main",
"rev": "9b299e7975e3099e86f8e7ddf9e59ac60abe53cf",
"revCount": 7,
"type": "git",
"url": "https://git.asonix.dog/asonix/nix-obs-scene-switcher"
},
"original": {
"type": "git",
"url": "https://git.asonix.dog/asonix/nix-obs-scene-switcher"
}
},
"obs-streamfx": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1674698913,
"narHash": "sha256-tooIielbexsKXo8kFqFbl0Zo2vCA3wTu8jL05xO2rs8=",
"ref": "refs/heads/main",
"rev": "d1df2d9ad343b198e7f3be026030d2a5ad81ff65",
"revCount": 5,
"type": "git",
"url": "https://git.asonix.dog/asonix/nix-obs-streamfx"
},
"original": {
"type": "git",
"url": "https://git.asonix.dog/asonix/nix-obs-streamfx"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"obs-scene-switcher": "obs-scene-switcher",
"obs-streamfx": "obs-streamfx"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

40
config/nixpkgs/flake.nix Normal file
View file

@ -0,0 +1,40 @@
{
description = "Home Manager configuration of Jane Doe";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-22.11";
inputs.nixpkgs.follows = "nixpkgs";
};
obs-scene-switcher = {
url = "git+https://git.asonix.dog/asonix/nix-obs-scene-switcher";
inputs.nixpkgs.follows = "nixpkgs";
};
obs-streamfx = {
url = "git+https://git.asonix.dog/asonix/nix-obs-streamfx";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... }@attrs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
homeConfigurations.asonix = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ./home.nix ];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = attrs;
};
};
}

View file

@ -1,7 +1,9 @@
{ config, pkgs, ... }:
{ config, pkgs, nixpkgs-unstable, obs-scene-switcher, obs-streamfx, ... }:
let
unstable = import <nixos-unstable> { };
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
};
in
{
imports = [ ./zsh.nix ./ssh.nix ];
@ -12,8 +14,8 @@ in
nixpkgs.overlays = [
(self: super: {
obs-studio-plugins = super.obs-studio-plugins // {
obs-scene-switcher = super.qt6Packages.callPackage ./obs-scene-switcher/obs-scene-switcher.nix { };
obs-streamfx = super.qt6Packages.callPackage ./obs-streamfx/obs-streamfx.nix { };
obs-scene-switcher = obs-scene-switcher.obs-scene-switcher;
obs-streamfx = obs-streamfx.obs-streamfx;
};
neovim = unstable.neovim;
nextcloud-client = unstable.nextcloud-client;
@ -30,10 +32,14 @@ in
starship
topgrade
carla
cura
freecad
gnome.dconf-editor
helvum
nextcloud-client
patchage
pavucontrol
tdesktop
vlc
@ -54,12 +60,15 @@ in
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
input-overlay
obs-backgroundremoval
obs-gstreamer
obs-move-transition
obs-multi-rtmp
obs-nvfbc
obs-pipewire-audio-capture
obs-scene-switcher
obs-source-record
obs-streamfx
obs-vkcapture
wlrobs

View file

@ -9,36 +9,37 @@ let
port = port;
proxyJump = if proxyJump then "router" else null;
});
in {
in
{
programs.ssh = {
enable = true;
matchBlocks = {
"github.com" = {
hostname = "github.com";
user = "git";
identitiesOnly = true;
identityFile = "/home/asonix/.ssh/github";
port = 22;
user = "git";
identitiesOnly = true;
identityFile = "/home/asonix/.ssh/github";
port = 22;
};
"gitlab.com" = {
hostname = "gitlab.com";
user = "git";
identitiesOnly = true;
identityFile = "/home/asonix/.ssh/gitlab";
port = 22;
user = "git";
identitiesOnly = true;
identityFile = "/home/asonix/.ssh/gitlab";
port = 22;
};
"git.asonix.dog" = {
hostname = "git.asonix.dog";
user = "git";
identitiesOnly = true;
identityFile = "/home/asonix/.ssh/gitea-key";
port = 22;
user = "git";
identitiesOnly = true;
identityFile = "/home/asonix/.ssh/gitea-key";
port = 22;
};
"router" = server {
hostname = "ssh.asonix.dog";
port = 3128;
proxyJump = false;
port = 3128;
proxyJump = false;
};
"mc1" = server { hostname = "192.168.20.100"; };
"build2" = server { hostname = "192.168.20.99"; };
@ -65,6 +66,7 @@ in {
"k8s10" = server { hostname = "192.168.20.34"; };
"q64b1" = server { hostname = "192.168.20.116"; };
"q64b2" = server { hostname = "192.168.20.119"; };
"k3s1" = server { hostname = "192.168.20.120"; };
};
};
}

View file

@ -12,6 +12,7 @@ pkgs.mkShell {
elmPackages.elm-optimize-level-2
elmPackages.elm-review
elmPackages.elm-test
elmPackages.nodejs
exiftool
fd
ffmpeg-full
@ -22,7 +23,6 @@ pkgs.mkShell {
libidn
librsvg
libwebp
nodejs
openssl
openssl_3
pkg-config
@ -39,6 +39,7 @@ pkgs.mkShell {
taplo-cli
tokei
tree-sitter
yarn
zig
zlib
zlib-ng

View file

@ -10,9 +10,12 @@
# Include the results of the hardware scan.
./hardware-configuration.nix
./wireguard.nix
<home-manager/nixos>
];
# Nix cache
# nix.extraOptions = ''
# secret-key-files = /etc/nix/cache-priv-key.pem
# '';
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -42,6 +45,8 @@
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
fileSystems = {
"/home/asonix/Development".options = [ "compress=zstd" ];
"/home/asonix/Diskimages".options = [ "compress=zstd" ];
@ -92,6 +97,9 @@
# Enable CUPS to print documents.
services.printing.enable = true;
services.avahi.enable = true;
services.avahi.openFirewall = true;
# services.ipp-usb.enable = true;
# Enable sound with pipewire.
sound.enable = true;
@ -208,6 +216,8 @@
# Or disable the firewall altogether.
# networking.firewall.enable = false;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

26
etc/nixos/flake.lock Normal file
View file

@ -0,0 +1,26 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1675154384,
"narHash": "sha256-gUXzyTS3WsO3g2Rz0qOYR2a26whkyL2UfTr1oPH9mm8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0218941ea68b4c625533bead7bbb94ccce52dceb",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.11",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

15
etc/nixos/flake.nix Normal file
View file

@ -0,0 +1,15 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.11";
};
outputs = { self, nixpkgs, ... }@attrs: {
nixosConfigurations.firestar = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [
./configuration.nix
];
};
};
}