diff --git a/README.md b/README.md
index 4811a92..ab03df0 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,8 @@
# NixOS Config
My personal NixOS Configuration Repository
+This Nix flake defines NixOS configurations for two machines: creatorforge-vm and creatorforge-framework. The flake imports various external repositories to provide additional functionality, such as Home Manager, sops-nix, and disko.
+
+Here is an overview of the flake:
+
[](https://builtwithnix.org)
diff --git a/flake.lock b/flake.lock
index b3d23d3..125b9d9 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,27 @@
{
"nodes": {
+ "devenv": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "nix": "nix",
+ "nixpkgs": "nixpkgs",
+ "pre-commit-hooks": "pre-commit-hooks"
+ },
+ "locked": {
+ "lastModified": 1678113758,
+ "narHash": "sha256-mD3SkN43b1s5CJ8Rx3l2oK3Dqgs+6Ze0FfWrdMcrrYk=",
+ "owner": "cachix",
+ "repo": "devenv",
+ "rev": "6455f319fc90e0be2071327093c5458f9afc61bf",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "ref": "latest",
+ "repo": "devenv",
+ "type": "github"
+ }
+ },
"disko": {
"inputs": {
"nixpkgs": [
@@ -20,6 +42,59 @@
"type": "github"
}
},
+ "flake-compat": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1673956053,
+ "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-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"
+ }
+ },
+ "gitignore": {
+ "inputs": {
+ "nixpkgs": [
+ "devenv",
+ "pre-commit-hooks",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1660459072,
+ "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -42,6 +117,46 @@
"type": "github"
}
},
+ "lowdown-src": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1633514407,
+ "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
+ "owner": "kristapsdz",
+ "repo": "lowdown",
+ "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
+ "type": "github"
+ },
+ "original": {
+ "owner": "kristapsdz",
+ "repo": "lowdown",
+ "type": "github"
+ }
+ },
+ "nix": {
+ "inputs": {
+ "lowdown-src": "lowdown-src",
+ "nixpkgs": [
+ "devenv",
+ "nixpkgs"
+ ],
+ "nixpkgs-regression": "nixpkgs-regression"
+ },
+ "locked": {
+ "lastModified": 1676545802,
+ "narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=",
+ "owner": "domenkozar",
+ "repo": "nix",
+ "rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f",
+ "type": "github"
+ },
+ "original": {
+ "owner": "domenkozar",
+ "ref": "relaxed-flakes",
+ "repo": "nix",
+ "type": "github"
+ }
+ },
"nixos-hardware": {
"locked": {
"lastModified": 1679765008,
@@ -60,11 +175,43 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1679710833,
- "narHash": "sha256-9yKVvGX1oAnlc8vTVvN2lRH35q6ETudQbM1w9ragMRU=",
+ "lastModified": 1677534593,
+ "narHash": "sha256-PuZSAHeq4/9pP/uYH1FcagQ3nLm/DrDrvKi/xC9glvw=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "83607dae4e05e1de755bbc7d7949b33fc1cfbbb9",
+ "rev": "3ad64d9e2d5bf80c877286102355b1625891ae9a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-regression": {
+ "locked": {
+ "lastModified": 1643052045,
+ "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
+ "type": "github"
+ }
+ },
+ "nixpkgs-stable": {
+ "locked": {
+ "lastModified": 1673800717,
+ "narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f",
"type": "github"
},
"original": {
@@ -74,7 +221,7 @@
"type": "github"
}
},
- "nixpkgs-stable": {
+ "nixpkgs-stable_2": {
"locked": {
"lastModified": 1679748960,
"narHash": "sha256-BP8XcYHyj1NxQi04RpyNW8e7KiXSoI+Fy1tXIK2GfdA=",
@@ -91,6 +238,22 @@
}
},
"nixpkgs_2": {
+ "locked": {
+ "lastModified": 1679710833,
+ "narHash": "sha256-9yKVvGX1oAnlc8vTVvN2lRH35q6ETudQbM1w9ragMRU=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "83607dae4e05e1de755bbc7d7949b33fc1cfbbb9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-22.11",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_3": {
"locked": {
"lastModified": 1679734080,
"narHash": "sha256-z846xfGLlon6t9lqUzlNtBOmsgQLQIZvR6Lt2dImk1M=",
@@ -106,19 +269,48 @@
"type": "github"
}
},
+ "pre-commit-hooks": {
+ "inputs": {
+ "flake-compat": [
+ "devenv",
+ "flake-compat"
+ ],
+ "flake-utils": "flake-utils",
+ "gitignore": "gitignore",
+ "nixpkgs": [
+ "devenv",
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": "nixpkgs-stable"
+ },
+ "locked": {
+ "lastModified": 1677160285,
+ "narHash": "sha256-tBzpCjMP+P3Y3nKLYvdBkXBg3KvTMo3gvi8tLQaqXVY=",
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "rev": "2bd861ab81469428d9c823ef72c4bb08372dd2c4",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "type": "github"
+ }
+ },
"root": {
"inputs": {
+ "devenv": "devenv",
"disko": "disko",
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
- "nixpkgs": "nixpkgs",
+ "nixpkgs": "nixpkgs_2",
"sops-nix": "sops-nix"
}
},
"sops-nix": {
"inputs": {
- "nixpkgs": "nixpkgs_2",
- "nixpkgs-stable": "nixpkgs-stable"
+ "nixpkgs": "nixpkgs_3",
+ "nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1679799335,
diff --git a/flake.nix b/flake.nix
index 515f8c2..06494e0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -18,27 +18,27 @@
};
# For Secrets Management #
sops-nix.url = github:Mic92/sops-nix;
+
+ devenv.url = "github:cachix/devenv/latest";
};
- outputs = { self, home-manager, nixos-hardware, disko, nixpkgs, sops-nix, ... }@inputs:
+ outputs = { self, home-manager, nixos-hardware, disko, nixpkgs, sops-nix, devenv, ... }@inputs:
let
- system = "x86_64-linux"; # Set the system architecture to x86_64-linux.
+ system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
-
- defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
+ defaultPackage.system = home-manager.defaultPackage.x86_64-linux;
defaultNixOptions = {
nix.settings.auto-optimise-store = true;
};
mkComputer = configurationNix: userName: extraModules: extraHomeModules: inputs.nixpkgs.lib.nixosSystem {
inherit system;
- specialArgs = { inherit system inputs pkgs nixos-hardware; };
+ specialArgs = { inherit system inputs self pkgs nixos-hardware; };
modules = [
#Secrets management
sops-nix.nixosModules.sops
-
#Machine config
configurationNix
defaultNixOptions
@@ -56,6 +56,7 @@
imports = [ (./. + "/users/${userName}/home.nix") ] ++ extraHomeModules;
};
};
+
}
] ++ extraModules;
};
@@ -87,4 +88,5 @@
[]; #extra modules to be loaded by home-manager
};
};
+
}
\ No newline at end of file
diff --git a/hosts/creatorforge.nix b/hosts/creatorforge.nix
index 048c316..eafe4e9 100644
--- a/hosts/creatorforge.nix
+++ b/hosts/creatorforge.nix
@@ -1,4 +1,4 @@
-{ modulesPath, config, pkgs, lib, ... }:
+{ modulesPath, config, pkgs, lib, self, ... }:
{
system.stateVersion = "22.11";
@@ -39,7 +39,8 @@
age-plugin-yubikey #plugin for rage to manage yubi-2fa
sops #file based secrets operations
direnv #used for development environments
- ];
+
+ ] ++ [self.inputs.devenv.packages.x86_64-linux.devenv];
networking = {
hostName = "creatorforge"; # Define your hostname.
diff --git a/users/speccon18/home.nix b/users/speccon18/home.nix
index 13c9abc..1da3007 100644
--- a/users/speccon18/home.nix
+++ b/users/speccon18/home.nix
@@ -1,4 +1,5 @@
-{ pkgs, config, lib, ... }: {
+{ pkgs, config, lib, ... }:
+{
home = {
username = "speccon18";
homeDirectory = "/home/speccon18";
@@ -16,6 +17,7 @@
asciinema
postman
gimp
+ obsidian
neofetch
vlc
remmina
@@ -99,28 +101,6 @@
"editor.inlineSuggest.enabled" = true;
"window.zoomLevel" = 1;
};
- languageSnippets = {
- svelte = {
- scaffold = {
- description = "scaffold a file";
- "prefix" = "!S";
- "body" = [
- ""
- ""
- ""
- ""
- ""
- ];
- };
- };
- };
- };
};
git = {
enable = true;
@@ -132,12 +112,15 @@
};
};
};
-
- dconf = {
- enable = true;
- settings = {
- "org/gnome/mutter" = {
- experimental-features = [ "x11-randr-fractional-scaling" "scale-monitor-framebuffer" ];
+ };
+ dconf = {
+ enable = true;
+ settings = {
+ "org/gnome/mutter" = {
+ experimental-features = [
+ "x11-randr-fractional-scaling"
+ "scale-monitor-framebuffer"
+ ];
};
};
};